Changeset 482

Show
Ignore:
Timestamp:
06/16/99 07:40:35 (14 years ago)
Author:
phil
Message:

(Phil) It works! So, I'll commit it. Here's the skinny:

There is only one file 'disp'. To send bytes (like chars to be displayed)
you send a series of unsigned base-10 values separated by spaces.
For example:

echo "hi there" | perl -e \

'$_=<STDIN>; while (/(.)/gc) { print ord($1)," "; }' \
> /proc/sys/dev/sensors/matorb*/disp

This is equivelent to doing:

echo "104 105 32 116 104 101 114 101" > /proc/sys/dev/sensors/matorb*/disp

I was going to create more files for doing things like clearing the screen,
but it is easier and probably better to do this in user-space. For example,
to clean the screen, you can do:

echo "254 88" > /proc/sys/dev/sensors/matorb*/disp

(As documented in the manual from Matrix-Orbital)

If the folks at Matrix-Orbital added device ID on a read (we talked about
this), then I will add an ID file to indicate that info.

TODO: finish detection. Right now it looks for a device at a particular
address and assumes it is a display.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/chips/matorb.c

    r473 r482  
    304304               int *nrels_mag, long *results) 
    305305{ 
     306int i; 
     307 
    306308  if (operation == SENSORS_PROC_REAL_INFO) 
    307309    *nrels_mag = 0; 
     
    311313    *nrels_mag = 3; 
    312314  } else if (operation == SENSORS_PROC_REAL_WRITE) { 
    313     if (*nrels_mag >= 1) { 
    314       matorb_write_value(client,0,results[0]); 
     315    for (i=1; i<=*nrels_mag;i++) { 
     316      matorb_write_value(client,0,results[i-1]); 
    315317    } 
    316318  }