Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
Internal functions used by ca821x-api to handle messages going to and from the CA-821x. More...
Functions | |
ca_error | DISPATCH_ToCA821x (const uint8_t *buf, u8_t *response, struct ca821x_dev *pDeviceRef) |
Send Request to CA-821x over SPI. More... | |
ca_error | DISPATCH_FromCA821x (struct ca821x_dev *pDeviceRef) |
process and dispatch on any received SPI messages from the ca821x More... | |
void | DISPATCH_ReadCA821x (struct ca821x_dev *pDeviceRef) |
Read SPI messages from the ca821x. More... | |
Internal functions used by ca821x-api to handle messages going to and from the CA-821x.
ca_error DISPATCH_FromCA821x | ( | struct ca821x_dev * | pDeviceRef | ) |
process and dispatch on any received SPI messages from the ca821x
This function is not re-entrant - i.e. you cannot call DISPATCH_FromCA821x while already in a callback that DISPATCH_FromCA821x has called. If you try to do this, the function will fail the second call and return CA_ERROR_INVALID_STATE
CMB_SUCCESS,CA_ERROR_INVALID_STATE |
void DISPATCH_ReadCA821x | ( | struct ca821x_dev * | pDeviceRef | ) |
Read SPI messages from the ca821x.
This function should be called by the BSP on the falling edge of the RFIRQ signal from the CA821x.
ca_error DISPATCH_ToCA821x | ( | const uint8_t * | buf, |
u8_t * | response, | ||
struct ca821x_dev * | pDeviceRef | ||
) |
Send Request to CA-821x over SPI.
This function is the system-specific definition of ca821x_api_downstream. It transmits a SAP command and if applicable, waits for a synchronous confirm and stores it in the 'response' buffer.
buf | - Message to transmit, length is encoded in Cascoda TLV format |
response | - Buffer to fill with response |
pDeviceRef | - Pointer to initialised ca821x_dev struct |