GPIO State (0xA0,0x03)

Description

Indicates the state of all of the user GPIO pins.

Notes

This message can be used to correlate external signals with the device time or other data quantities. It should generally be used with slow GPIO signals as brief pulses shorter than the scheduled data rate will be missed.

To synchronize with faster signals and pulses, or for more accurate timestamping, utilize the event system and set the GPIO feature to TIMESTAMP in the 3DM GPIO Configuration command (0x0C,0x41).

These GPIO states are sampled within one base period of the system data descriptor set.

To obtain valid readings, the desired pin(s) must be configured to the GPIO feature (either input or output behavior) using the 3DM GPIO Configuration command (0x0C,0x41). Other gpio features may work on some devices but this is not guaranteed. Consult the factory before producing a design relying on reading pins configured to other feature types.

Parameter Name Data Type Description
Field Length u8 3
Descriptor u8 0x03
States u8 Bitfield containing the states for each GPIO pin.
Bit 0 (0x01): pin 1
Bit 1 (0x02): pin 2
Bit 2 (0x04): pin 3
Bit 3 (0x08): pin 4
Bits for pins that don't exist will read as 0.