| ||||||
Files | |
| file | mindsensors-rcxsensorsmux.h |
Mindsensors MSRXMUX RCX Sensor MUX Sensor driver. | |
Defines | |
| #define | MSRXMUX_I2C_ADDR 0x7E |
| #define | MSRXMUX_CHAN1 0xFE |
| #define | MSRXMUX_CHAN2 0xFD |
| #define | MSRXMUX_CHAN3 0xFB |
| #define | MSRXMUX_CHAN4 0xF7 |
| #define | MSRXMUX_NONE 0xFF |
Functions | |
| void | MSRXMUXsetupChan (tSensors link, ubyte chan, TSensorTypes chantype, TSensorModes chanmode, ubyte delay) |
| int | MSRXMUXreadChan (tSensors link, byte chan) |
Variables | |
| tByteArray | MSRXMUX_I2CRequest |
| TSensorTypes | RCXSensorTypes [4][4] |
| TSensorModes | RCXSensorModes [4][4] |
| ubyte | RCXSensorDelays [4][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}} |
RCX Sensor MUX
| #define MSRXMUX_CHAN1 0xFE |
Select MUX channel 1
Definition at line 43 of file mindsensors-rcxsensorsmux.h.
| #define MSRXMUX_CHAN2 0xFD |
Select MUX channel 2
Definition at line 44 of file mindsensors-rcxsensorsmux.h.
| #define MSRXMUX_CHAN3 0xFB |
Select MUX channel 3
Definition at line 45 of file mindsensors-rcxsensorsmux.h.
| #define MSRXMUX_CHAN4 0xF7 |
Select MUX channel 4
Definition at line 46 of file mindsensors-rcxsensorsmux.h.
| #define MSRXMUX_I2C_ADDR 0x7E |
I2C address for sensor
Definition at line 42 of file mindsensors-rcxsensorsmux.h.
| #define MSRXMUX_NONE 0xFF |
Deselect all MUX channels
Definition at line 47 of file mindsensors-rcxsensorsmux.h.
| int MSRXMUXreadChan | ( | tSensors | link, |
| byte | chan | ||
| ) |
Definition at line 81 of file mindsensors-rcxsensorsmux.h.
| void MSRXMUXsetupChan | ( | tSensors | link, |
| ubyte | chan, | ||
| TSensorTypes | chantype, | ||
| TSensorModes | chanmode, | ||
| ubyte | delay | ||
| ) |
Send a direct command to the MUX sensor
Note: this is an internal command and should not be called directly.
| link | the PFMate port number |
| chan | the channel to be configured |
| chantype | the sensor type connected to the channel |
| chanmode | the sensor mode of the sensor |
| delay | the initialisation delay time |
Definition at line 72 of file mindsensors-rcxsensorsmux.h.
Array to hold I2C command data
Definition at line 49 of file mindsensors-rcxsensorsmux.h.
| ubyte RCXSensorDelays[4][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}} |
Definition at line 59 of file mindsensors-rcxsensorsmux.h.
| TSensorModes RCXSensorModes[4][4] |
{{modeRaw, modeRaw, modeRaw, modeRaw},
{modeRaw, modeRaw, modeRaw, modeRaw},
{modeRaw, modeRaw, modeRaw, modeRaw},
{modeRaw, modeRaw, modeRaw, modeRaw}}
Definition at line 55 of file mindsensors-rcxsensorsmux.h.
| TSensorTypes RCXSensorTypes[4][4] |
{{sensorNone, sensorNone, sensorNone, sensorNone},
{sensorNone, sensorNone, sensorNone, sensorNone},
{sensorNone, sensorNone, sensorNone, sensorNone},
{sensorNone, sensorNone, sensorNone, sensorNone}}
Definition at line 51 of file mindsensors-rcxsensorsmux.h.
1.7.2