53 #define SPI_T_TIMEOUT 500
54 #define SPI_T_BACKOFF 10
55 #define SPI_T_HOLD_8210 100
56 #define SPI_T_CSHOLD 50
58 #define SPI_RX_FIFO_SIZE 7
59 #define SPI_RX_FIFO_RESV 4
61 #if !(SPI_RX_FIFO_RESV < SPI_RX_FIFO_SIZE)
62 #error "SPI_RX_FIFO_RESV must be less than SPI_RX_FIFO_SIZE"
232 #if CASCODA_EXTERNAL_FLASHCHIP_PRESENT
247 ca_error SPI_SetExternallyInUseStatus(
bool status,
void (*callback)(
void));
The main ca821x-api include file.
Type definitions used by Cascoda baremetal drivers.
unsigned char u8_t
Definition: cascoda_types.h:46
bool SPI_GetExternallyInUseStatus(void)
Checks if the SPI is being used by something other than the RF chip.
Definition: cascoda_spi.c:607
struct MAC_Message * SPI_PeekFullBuf(void)
Get a MAC_Message buffer containing a received SPI Message.
Definition: cascoda_spi.c:218
void SPI_Initialise(void)
Initialise SPI buffers and call BSP SPI init.
Definition: cascoda_spi.c:598
bool SPI_IsSyncChainInFlight(void)
Query whether the SPI driver is currently locked in a Sync chain.
Definition: cascoda_spi.c:146
void SPI_StopSyncChain(struct ca821x_dev *pDeviceRef)
Stop the sync chain after starting with SPI_StartSyncChain.
Definition: cascoda_spi.c:161
void SPI_StartSyncChain(struct ca821x_dev *pDeviceRef)
Start a 'Sync Chain' For more efficient and safer chains of sync message communication with the CA821...
Definition: cascoda_spi.c:151
bool SPI_IsFifoFull(void)
Query whether the SPI message FIFO is full or not.
Definition: cascoda_spi.c:83
bool SPI_IsExchangeWithCA821xInProgress(void)
Query whether an SPI exchange operation with the CA821x is currently in progress.
Definition: cascoda_spi.c:141
ca_error SPI_Exchange(const struct MAC_Message *pTxBuffer, struct ca821x_dev *pDeviceRef)
Exchange Messages across SPI.
Definition: cascoda_spi.c:416
bool SPI_IsFifoEmpty(void)
Query whether the SPI message FIFO is empty or not.
Definition: cascoda_spi.c:94
void SPI_DequeueFullBuf(void)
Remove a processed Full Buffer from the SPI Queue.
Definition: cascoda_spi.c:230
bool SPI_IsFifoAlmostFull(void)
Query whether the SPI message FIFO is almost full or not.
Definition: cascoda_spi.c:123
ca_error SPI_Send(const uint8_t *buf, u8_t *response, struct ca821x_dev *pDeviceRef)
Send Request over SPI.
Definition: cascoda_spi.c:529
void SPI_ExchangeComplete(void)
Function to be called from the BSP when an exchange operation has been completed.
Definition: cascoda_spi.c:581
ca_error
Cascoda error type.
Definition: ca821x_error.h:51
Definitions relating to MLME and MCPS API messages.
SPI Message Format Typedef.
Definition: mac_messages.h:1017
CA-821x Device reference struct.
Definition: ca821x_api.h:123