| 4 | | |
| 5 | | == Device Drivers == |
| 6 | | |
| 7 | | === Overview === |
| 8 | | For testing some device drivers may be loaded or unloaded dynamically or a startup script may be used to automatically load the modules. |
| 9 | | |
| 10 | | ||'''Driver'''||'''Module Filename'''||'''Device Nodes'''||'''Depends on other modules'''|| |
| 11 | | ||Mainboard communications||mnbd-comm.ko||/dev/mnbd[[BR]]/dev/wt1 ..[[BR]][[BR]]/dev/wt10|||| |
| 12 | | ||USB Hub||isp1520.ko||||i2c-mcf, i2c-core|| |
| 13 | | ||Keypad/Beeper||max734x.ko||/dev/cardbeep||I2c-mcf, i2c-core|| |
| 14 | | |
| 15 | | Device driver operation may be tested from command line for some functions, for example: |
| 16 | | |
| 17 | | {{{ |
| 18 | | # echo “A,B,C” > /dev/cardbeep <CR> |
| 19 | | }}} |
| 20 | | Play notes A, B, and C on beeper. ''(refer to beeper section for more details)'' |
| 21 | | |
| 22 | | {{{ |
| 23 | | # echo “W” > /dev/wt1 <CR> |
| 24 | | }}} |
| 25 | | Request weight from scale one. |
| 26 | | |
| 27 | | {{{ |
| 28 | | # cat < /dev/wt1 <CR> |
| 29 | | }}} |
| 30 | | Display response to previous request from scale 1 as a weight structure converted to hexadecimal. |
| 31 | | |
| 32 | | {{{ |
| 33 | | #!Lineno |
| 34 | | #!c |
| 35 | | 01004812B682000000004812B6820003 |
| 36 | | |
| 37 | | struct mnbd_wt_struct |
| 38 | | { |
| 39 | | unsigned char interval; (01 – interval 1) |
| 40 | | unsigned char decimal; (00 – no decimal) |
| 41 | | float grosswt; (4812B682 – IEEE floating point value) |
| 42 | | float tarewt; (00000000 – IEEE floating point value–tare zero) |
| 43 | | float netwt; (4812B682 – IEEE floating point value) |
| 44 | | unsigned char units; (00 – units) |
| 45 | | unsigned char status; (03 – status) |
| 46 | | }; |
| 47 | | }}} |
| 48 | | |
| 49 | | [[Top]] |