CCxxxx Driver
0.0.1
|
CCX Basic API definitions. See Basic CCxxxx API. More...
Go to the source code of this file.
Macros | |
#define | CCX_STATUS_LOG(_STATUS) _CCX_STATUS_LOG(_STATUS, __FILE__, __LINE__) |
Macro called to log errors. More... | |
#define | __CCX_STATUS_LOG(_STATUS, F, L) ccxErrorLog(_STATUS, F, #L) |
Hacky middle-man to get string line number. More... | |
#define | _CCX_STATUS_LOG(_STATUS, F, L) __CCX_STATUS_LOG(_STATUS, F, L) |
Hacky middle-man to get string line number. More... | |
#define | CCX_STATUS_CHECK(_STATEMENT, _STATUS) |
Convenience error handling function. Returns from current function with evaluated error code. More... | |
#define | CCX_STATUS_CHECK_CLEANUP(_STATEMENT, _STATUS, _CLEANUP) |
Convenience error handling function. In the event of an error attempts cleanup. More... | |
Enumerations | |
enum | CcxStatus { CCX_OK, CCX_ERROR_API, CCX_ERROR_INTERNAL, CCX_ERROR_TIMEOUT, CCX_ERROR_SPI, CCX_ERROR_RX_CRC, CCX_ERROR_STATE, CCX_ERROR_FIFO, CCX_ERROR_ASSERT } |
List of possible error return codes. More... | |
Functions | |
void | ccxErrorLog (uint8_t status, char *file, char *line) |
Optional error logging function. More... | |
uint8_t | ccxWriteByte (uint8_t address, uint8_t value) |
Write a single byte (octet) to the CCxxxx. More... | |
uint8_t | ccxWriteBytes (uint8_t address, const uint8_t *writeBuffer, uint8_t writeBufferLength) |
Write multiple bytes (oxtets) to the CCxxxx. More... | |
uint8_t | ccxStrobe (uint8_t strobeAddress) |
Send a strobe to the CCxxx. More... | |
uint8_t | ccxReadByte (uint8_t address, uint8_t *readByte) |
Read a single byte from specified register. More... | |
uint8_t | ccxReadBytes (uint8_t startAddress, uint8_t *readBuffer, uint8_t readBufferLength) |
Read multiple bytes beginning at the specified register. More... | |
uint8_t | ccxReadStatusRegister (uint8_t address, uint8_t *readStatus) |
Read a single byte from a status register. More... | |
uint8_t | ccxDelay25us (void) |
Initiate a busy, blocking wait of 25 us. More... | |
uint8_t | ccxReset (void) |
Initiate a software reset of the radio. More... | |
uint8_t | ccxInit (void) |
Initialise the ccx module. This must be called prior to using any other function in this library. More... | |
uint8_t | ccxShutdown (void) |
Shutdown the module. Can optionally be called when finished with using the module. More... | |
uint8_t | ccxRunTests (void) |
Run basic sanity tests to ensure communications between MCU and CCxxxx module are operating as expected. More... | |
CCX Basic API definitions. See Basic CCxxxx API.