65 #define IS_FIFO_THR(VAL) (VAL<=128) 137 s_assert_param(IS_FIFO_THR(cThrRxFifo));
141 tmp &= ~RX_AFTHR_REGMASK;
162 return (tmp & RX_AFTHR_REGMASK);
177 s_assert_param(IS_FIFO_THR(cThrRxFifo));
181 tmp &= ~RX_AETHR_REGMASK;
200 return (tmp & RX_AETHR_REGMASK);
217 s_assert_param(IS_FIFO_THR(cThrTxFifo));
221 tmp &= ~TX_AFTHR_REGMASK;
242 return (tmp & TX_AFTHR_REGMASK);
257 s_assert_param(IS_FIFO_THR(cThrTxFifo));
262 tmp &= ~TX_AETHR_REGMASK;
282 return (tmp & TX_AETHR_REGMASK);
296 s_assert_param(IS_SFUNCTIONAL_STATE(xNewState));
300 if(xNewState == S_ENABLE) {
301 tmp |= FIFO_GPIO_OUT_MUX_SEL_REGMASK;
303 tmp &= ~FIFO_GPIO_OUT_MUX_SEL_REGMASK;
uint8_t S2LPFifoGetAlmostFullThresholdRx(void)
Return the almost full threshold for RX FIFO.
#define PROTOCOL2_ADDR
PROTOCOL2 register.
void S2LPFifoSetAlmostFullThresholdRx(uint8_t cThrRxFifo)
Set the almost full threshold for the Rx FIFO. When the number of elements in RX FIFO reaches this va...
SFunctionalState
S2LP Functional state. Used to enable or disable a specific option.
void S2LPFifoSetAlmostEmptyThresholdRx(uint8_t cThrRxFifo)
Set the almost empty threshold for the Rx FIFO. When the number of elements in RX FIFO reaches this v...
#define RX_FIFO_STATUS_ADDR
RX_FIFO_STATUS register.
uint8_t S2LPFifoGetAlmostFullThresholdTx(void)
Return the almost full threshold for Tx FIFO.
Configuration and management of S2-LP Fifo.
uint8_t S2LPFifoReadNumberBytesRxFifo(void)
Return the number of elements in the Rx FIFO.
#define FIFO_CONFIG2_ADDR
FIFO_CONFIG2 register.
volatile S2LPStatus g_xStatus
S2LP Status global variable. This global variable of S2LPStatus type is updated on every SPI transact...
uint8_t S2LPFifoReadNumberBytesTxFifo(void)
Return the number of elements in the Tx FIFO.
void S2LPFifoSetAlmostFullThresholdTx(uint8_t cThrTxFifo)
Set the almost full threshold for the Tx FIFO. When the number of elements in TX FIFO reaches this va...
#define TX_FIFO_STATUS_ADDR
TX_FIFO_STATUS register.
Header file for low level S2LP SPI driver.
#define FIFO_CONFIG1_ADDR
FIFO_CONFIG1 register.
uint8_t S2LPFifoGetAlmostEmptyThresholdTx(void)
Return the almost empty threshold for Tx FIFO.
#define FIFO_CONFIG3_ADDR
FIFO_CONFIG3 register.
#define FIFO_CONFIG0_ADDR
FIFO_CONFIG0 register.
uint8_t S2LPFifoGetAlmostEmptyThresholdRx(void)
Return the almost empty threshold for Rx FIFO.
void S2LPFifoSetAlmostEmptyThresholdTx(uint8_t cThrTxFifo)
Set the almost empty threshold for the Tx FIFO. When the number of elements in Tx FIFO reaches this v...
void S2LPFifoMuxRxFifoIrqEnable(SFunctionalState xNewState)
Enable the Mux for the Rx FIFO IRQ. To be enabled when RX FIFO THRESHOLD is used.