Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
Platform abstraction for core SDK functionality, see Baremetal platform abstraction for extended functionality. More...
Functions | |
void | BSP_WaitUs (u32_t us) |
Wait for specified Time in Microseconds (max. More... | |
void | BSP_Waiting (void) |
This function will be called repeatedly when the Baremetal drivers are blocking & waiting (eg. More... | |
u32_t | BSP_ReadAbsoluteTime (void) |
Get the number of milliseconds since program start. More... | |
void | BSP_WaitTicks (u32_t ticks) |
Wait for specified Time in Milliseconds. More... | |
void | BSP_ResetRF (u8_t ms) |
Reset CAX RF Chip. More... | |
u8_t | BSP_SenseRFIRQ (void) |
Sense whether SPI IRQ is high or low. More... | |
void | BSP_DisableRFIRQ (void) |
Inhibit SPI IRQ, suppresses interrupt but still latches it. More... | |
void | BSP_EnableRFIRQ (void) |
Allow SPI IRQ, re-enabling interrupt after BSP_DisableRFIRQ() More... | |
void | BSP_SetRFSSBHigh (void) |
Put SPI Select (SSB) Pin high. More... | |
void | BSP_SetRFSSBLow (void) |
Put SPI Select (SSB) Pin low. More... | |
void | BSP_SPIInit (void) |
Initialise GPIO and SPI Pins for Comms with CA-821X. More... | |
void | BSP_SPIExchange (u8_t *RxBuf, const u8_t *TxBuf, u8_t RxLen, u8_t TxLen) |
Exchange bytes over SPI, receiving into RxBuf and transferring from TxBuf. More... | |
bool | BSP_IsInsideInterrupt (void) |
Is the code running in an interrupt context? More... | |
void | BSP_SetSPIMOSIOutput (void) |
Connect MOSI port to SPI MOSI and disable pull-up. More... | |
void | BSP_SetSPIMOSITristate (void) |
Disconnect MOSI port from SPI MOSI and put to tristate with pull-up. More... | |
void | BSP_MicroTimerStart (void) |
start microseconds timer More... | |
u32_t | BSP_MicroTimerStop (void) |
stop microseconds timer More... | |
u32_t | BSP_MicroTimerGet (void) |
get microseconds timer while running More... | |
bool | BSP_IsCommsInterfaceEnabled (void) |
check if comms interface is connected More... | |
Platform abstraction for core SDK functionality, see Baremetal platform abstraction for extended functionality.
void BSP_DisableRFIRQ | ( | void | ) |
Inhibit SPI IRQ, suppresses interrupt but still latches it.
void BSP_EnableRFIRQ | ( | void | ) |
Allow SPI IRQ, re-enabling interrupt after BSP_DisableRFIRQ()
bool BSP_IsCommsInterfaceEnabled | ( | void | ) |
check if comms interface is connected
bool BSP_IsInsideInterrupt | ( | void | ) |
Is the code running in an interrupt context?
u32_t BSP_MicroTimerGet | ( | void | ) |
get microseconds timer while running
void BSP_MicroTimerStart | ( | void | ) |
start microseconds timer
u32_t BSP_MicroTimerStop | ( | void | ) |
stop microseconds timer
u32_t BSP_ReadAbsoluteTime | ( | void | ) |
Get the number of milliseconds since program start.
void BSP_ResetRF | ( | u8_t | ms | ) |
Reset CAX RF Chip.
ms | - Reset Low Time in [ms] |
u8_t BSP_SenseRFIRQ | ( | void | ) |
Sense whether SPI IRQ is high or low.
void BSP_SetRFSSBHigh | ( | void | ) |
Put SPI Select (SSB) Pin high.
void BSP_SetRFSSBLow | ( | void | ) |
Put SPI Select (SSB) Pin low.
void BSP_SetSPIMOSIOutput | ( | void | ) |
Connect MOSI port to SPI MOSI and disable pull-up.
void BSP_SetSPIMOSITristate | ( | void | ) |
Disconnect MOSI port from SPI MOSI and put to tristate with pull-up.
Exchange bytes over SPI, receiving into RxBuf and transferring from TxBuf.
Any bytes received after a count of RxLen MUST be discarded. Any bytes sent after a count of TxLen MUST have the value 0xFF. A total of MAX(RxLen, TxLen) bytes MUST be exchanged. When the exchange is complete, the BSP MUST call the SPI_ExchangeComplete function.
RFIRQ will be disabled before this function is called.
RxBuf | Buffer to fill with received bytes. Must be at least RxLen big. |
TxBuf | Buffer to send bytes from. Must be at least TxLen big. |
RxLen | Count of bytes to receive before dumping all future bytes. |
TxLen | Count of bytes to transmit before sending all 0xFF bytes. |
void BSP_SPIInit | ( | void | ) |
Initialise GPIO and SPI Pins for Comms with CA-821X.
void BSP_Waiting | ( | void | ) |
This function will be called repeatedly when the Baremetal drivers are blocking & waiting (eg.
WAIT_ms or WAIT_Callback), in case the BSP needs to do any system maintenance or wants to reduce power consumption.
void BSP_WaitTicks | ( | u32_t | ticks | ) |
Wait for specified Time in Milliseconds.
ticks | - Time in milliseconds |
void BSP_WaitUs | ( | u32_t | us | ) |
Wait for specified Time in Microseconds (max.
999)
us | - Time in microseconds |