Status values are used throughout the LINX API to track and handle errors and warning. Most users do not have to worry about these status as they are translated into LabVIEW errors. However the status codes listed below will be useful for developing and debugging LINX packets and the LINX firmware.

Common Statuses

Common Statuses
Status Macro Description
0x00 L_OK Ok (no error)
0x01 L_FUNCTION_NOT_SUPPORTED Function not supported on this device
0x02 L_REQUEST_RESEND Request resend previous packet
0x03 L_UNKNOWN_ERROR An unknown error has occurred
0x04 L_DISCONNECT The connection has been lost
0x05 - 0x7F - Reserved for future common statuses
0x80 - 0xFF - Peripheral specific statuses

Peripheral Statuses

The following status values have different meanings depending on the peripheral that returns the status value.

Status Macro Description
0x80 LI2C_SADDR Unable to use the specified slave address
0x81 LI2C_EOF Specified EOF value not supported
0x82 LI2C_WRITE_FAIL Failed to write all bytes
0x83 LI2C_READ_FAIL Failed to read all bytes
0x84 LI2C_CLOSE_FAIL Failed to close the specified I2C channel
0x85 LI2C_OPEN_FAIL Failed to open the specified I2C channel

Status Macro Description

Status Macro Description
0x80 LUART_OPEN_FAIL Unable to open the specified UART channel
0x81 LUART_SET_BAUD_FAIL Unable to set the UART baud rate
0x82 LUART_AVAILABLE_FAIL Unable to get the number of bytes available
0x83 LUART_READ_FAIL Unable to get the number of bytes available
0x84 LUART_WRITE_FAIL Unable to write to the specified UART channel
0x85 LUART_CLOSE_FAIL Unable to close the specified UART channel