Serial¶
Serial callback. Primarily used for receiving data from GPS/INS attached to sensor.
Types¶
-
typedef void (*
FpCeptonSerialReceiveCallback
)(CeptonSensorHandle handle, const char *str, void *user_data)¶ Callback for receiving serial data (e.g. NMEA).
- Parameters
handle
: Sensor handle.str
: Serial line string. Owned by SDK.user_data
: User instance pointer.
Methods¶
-
CeptonSensorErrorCode
cepton_sdk_listen_serial_lines
(FpCeptonSerialReceiveCallback cb, void *const user_data)¶ Sets serial line callback.
Useful for listening to NMEA data from GPS attached to sensor. Each callback contains 1 line of serial data (including newline characters).
Returns error if callback already registered.
- Parameters
cb
: Callback.user_data
: User instance pointer.
-
CeptonSensorErrorCode
cepton_sdk_unlisten_serial_lines
(void)¶ Clears serial line callback.