Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers

The error codes that are used as return values across the Cascoda SDK. More...

Collaboration diagram for Error codes:

Macros

#define ca_static_assert(x)   typedef char static_assertion[(x) ? 1 : -1]
 Static assert code. More...
 

Typedefs

typedef enum ca_error ca_error
 Cascoda error type. More...
 

Enumerations

enum  ca_error {
  CA_ERROR_SUCCESS = 0x00 , CA_ERROR_FAIL = 0x01 , CA_ERROR_UNKNOWN = 0x02 , CA_ERROR_INVALID = 0x03 ,
  CA_ERROR_NO_ACCESS = 0x04 , CA_ERROR_INVALID_STATE = 0x05 , CA_ERROR_BUSY = 0x06 , CA_ERROR_INVALID_ARGS = 0x07 ,
  CA_ERROR_NOT_HANDLED = 0x08 , CA_ERROR_NOT_FOUND = 0x09 , CA_ERROR_NO_BUFFER = 0x0A , CA_ERROR_TIMEOUT = 0x0B ,
  CA_ERROR_ALREADY = 0x0C , CA_ERROR_NOT_IMPLEMENTED = 0x0D , CA_ERROR_SPI_WAIT_TIMEOUT = 0xA0 , CA_ERROR_SPI_NACK_TIMEOUT = 0xA1 ,
  CA_ERROR_SPI_SCAN_IN_PROGRESS = 0xA2 , CA_ERROR_SPI_SEND_EXCHANGE_FAIL = 0xA3
}
 Cascoda error type. More...
 

Functions

const char * ca_error_str (ca_error aError)
 Return a string representation of a ca_error. More...
 

Detailed Description

The error codes that are used as return values across the Cascoda SDK.

Macro Definition Documentation

◆ ca_static_assert

#define ca_static_assert (   x)    typedef char static_assertion[(x) ? 1 : -1]

Static assert code.

Typedef Documentation

◆ ca_error

typedef enum ca_error ca_error

Cascoda error type.

Enumeration Type Documentation

◆ ca_error

enum ca_error

Cascoda error type.

Enumerator
CA_ERROR_SUCCESS 

Success.

CA_ERROR_FAIL 

Failed for miscellaneous reason.

CA_ERROR_UNKNOWN 

Request for unknown data.

CA_ERROR_INVALID 

Invalid request.

CA_ERROR_NO_ACCESS 

Cannot access requested resource.

CA_ERROR_INVALID_STATE 

Request cannot be processed in current state.

CA_ERROR_BUSY 

Busy, try again.

CA_ERROR_INVALID_ARGS 

Invalid arguments.

CA_ERROR_NOT_HANDLED 

Request has not been handled.

CA_ERROR_NOT_FOUND 

Requested resource not found.

CA_ERROR_NO_BUFFER 

No buffers currently available.

CA_ERROR_TIMEOUT 

Operation timed out.

CA_ERROR_ALREADY 

Operation already executed.

CA_ERROR_NOT_IMPLEMENTED 

Functionality not implemented.

CA_ERROR_SPI_WAIT_TIMEOUT 

SPI Wait timed out.

CA_ERROR_SPI_NACK_TIMEOUT 

SPI NACKing for too long.

CA_ERROR_SPI_SCAN_IN_PROGRESS 

CA-821x is scanning and cannot be used.

CA_ERROR_SPI_SEND_EXCHANGE_FAIL 

SPI Message failed to send.

Function Documentation

◆ ca_error_str()

const char* ca_error_str ( ca_error  aError)

Return a string representation of a ca_error.

Parameters
aErrorThe ca_error code to be converted
Returns
A const pointer to a string representation of the ca_error