RevPi Core modules contain LEDs of which one shows the device status and two can be used as desired:
|Power||on, green||RevPi Core is running|
|on, red||The piControl driver resets, the modules connected to the PiBridge are reinitialised.|
|A1||off||In the “RevPiLED” byte, bits 0 and 1 are set to 0.|
|on, green||In the “RevPiLED” byte, bit 0 is set to 1 and the bit 1 is set to 0.|
|on, red||In the “RevPiLED” byte, bit 0 is set to 0 and the bit 1 is set to 1.|
|on, orange||In the “RevPiLED” byte, bits 0 and 1 are set to 1.|
|A2||off||In the “RevPiLED” byte, bits 2 and 3 are set to 0.|
|on, green||In the “RevPiLED” byte, bit 2 is set to 1 and bit 3 is set to 0.|
|on, red||In the “RevPiLED” byte, bit 2 is set to 0 and bit 3 is set to 1|
|on, orange||In the “RevPiLED” byte, bits 2 and 3 are set to 1|
In the directory /home/pi/demo there is the piControl.h header file in which PICONTROL_LED_A… is defined. A little sample programme follows below.
The “RevPiStatus” byte is given the status of the piControl driver. Please remember that the I/O-Modulen (DIO, DI, DO, AIO, …) and piGate modules are differentiated between.
|0, 0x01||piControl driver is running|
|1, 0x02||There is at least one connected I/O module that has not been configured with PiCtory.|
|2, 0x04||There is at least one I/O module that has been configured with PiCtory. The bit is also set when a piGate is configured.|
|3, 0x08||A I/O module occupies more or less byte in the process image than stated in the PiCtory configuration. This can only happen when the version of the configuration file or the used device description files respectively do not match the firmware in the I/O module. Get yourself a PiCtory update.|
|4, 0x10||A piGate module is connected to the left of RevPi.|
|5, 0x20||A piGate module is connected to the right of RevPi.|
The piTest -d programme details which modules are connected and whether they have been configured in PiCtory or not.