Functions | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_Read (CySCB_Type const *base) |
Reads a single data element from the SPI RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_ReadArray (CySCB_Type const *base, void *buffer, uint32_t size) |
Reads an array of data out of the SPI RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_Write (CySCB_Type *base, uint32_t data) |
Places a single data element in the SPI TX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_WriteArray (CySCB_Type *base, void *buffer, uint32_t size) |
Places an array of data in the SPI TX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_SPI_WriteArrayBlocking (CySCB_Type *base, void *buffer, uint32_t size) |
Places an array of data in the SPI TX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_GetTxFifoStatus (CySCB_Type const *base) |
Returns the current status of the TX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_SPI_ClearTxFifoStatus (CySCB_Type *base, uint32_t clearMask) |
Clears the selected statuses of the TX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_GetRxFifoStatus (CySCB_Type const *base) |
Returns the current status of the RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_SPI_ClearRxFifoStatus (CySCB_Type *base, uint32_t clearMask) |
Clears the selected statuses of the RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_GetSlaveMasterStatus (CySCB_Type const *base) |
Returns the current status of either the slave or the master, depending on the configured SPI mode. More... | |
__STATIC_INLINE void | Cy_SCB_SPI_ClearSlaveMasterStatus (CySCB_Type *base, uint32_t clearMask) |
Clears the selected statuses of either the slave or the master. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_GetNumInTxFifo (CySCB_Type const *base) |
Returns the number of data elements in the SPI TX FIFO. More... | |
__STATIC_INLINE bool | Cy_SCB_SPI_IsTxComplete (CySCB_Type const *base) |
Checks whether the TX FIFO and Shifter are empty and there is no more data to send. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_SPI_GetNumInRxFifo (CySCB_Type const *base) |
Returns the number of data elements in the SPI RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_SPI_ClearRxFifo (CySCB_Type *base) |
Clears all data out of the SPI RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_SPI_ClearTxFifo (CySCB_Type *base) |
Clears all data out of the SPI TX FIFO. More... | |
__STATIC_INLINE uint32_t Cy_SCB_SPI_Read | ( | CySCB_Type const * | base | ) |
Reads a single data element from the SPI RX FIFO.
This function does not check whether the RX FIFO has data before reading it. If the RX FIFO is empty, the function returns CY_SCB_SPI_RX_NO_DATA.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_ReadArray | ( | CySCB_Type const * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Reads an array of data out of the SPI RX FIFO.
This function does not block. It returns how many data elements were read from the RX FIFO.
base | The pointer to the SPI SCB instance. |
buffer | The pointer to the location to place data read from the RX FIFO. The element size is defined by the data type, which depends on the configured RX data width. |
size | The number of data elements to read from the RX FIFO. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_Write | ( | CySCB_Type * | base, |
uint32_t | data | ||
) |
Places a single data element in the SPI TX FIFO.
This function does not block. It returns how many data elements were placed in the TX FIFO.
base | The pointer to the SPI SCB instance. |
data | Data to put in the TX FIFO. The element size is defined by the data type, which depends on the configured TX data width. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_WriteArray | ( | CySCB_Type * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Places an array of data in the SPI TX FIFO.
This function does not block. It returns how many data elements were placed in the TX FIFO.
base | The pointer to the SPI SCB instance. |
buffer | The pointer to the data to place in the TX FIFO. The element size is defined by the data type, which depends on the configured TX data width. |
size | The number of data elements to transmit. |
__STATIC_INLINE void Cy_SCB_SPI_WriteArrayBlocking | ( | CySCB_Type * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Places an array of data in the SPI TX FIFO.
This function blocks until the number of data elements specified by size is placed in the SPI TX FIFO.
base | The pointer to the SPI SCB instance. |
buffer | The pointer to data to place in the TX FIFO. The element size is defined by the data type, which depends on the configured TX data width. |
size | The number of data elements to write into the TX FIFO. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_GetTxFifoStatus | ( | CySCB_Type const * | base | ) |
Returns the current status of the TX FIFO.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE void Cy_SCB_SPI_ClearTxFifoStatus | ( | CySCB_Type * | base, |
uint32_t | clearMask | ||
) |
Clears the selected statuses of the TX FIFO.
base | The pointer to the SPI SCB instance. |
clearMask | The mask of which statuses to clear. See SPI TX FIFO Statuses for the set of constants. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_GetRxFifoStatus | ( | CySCB_Type const * | base | ) |
Returns the current status of the RX FIFO.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE void Cy_SCB_SPI_ClearRxFifoStatus | ( | CySCB_Type * | base, |
uint32_t | clearMask | ||
) |
Clears the selected statuses of the RX FIFO.
base | The pointer to the SPI SCB instance. |
clearMask | The mask of which statuses to clear. See SPI RX FIFO Statuses for the set of constants. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_GetSlaveMasterStatus | ( | CySCB_Type const * | base | ) |
Returns the current status of either the slave or the master, depending on the configured SPI mode.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE void Cy_SCB_SPI_ClearSlaveMasterStatus | ( | CySCB_Type * | base, |
uint32_t | clearMask | ||
) |
Clears the selected statuses of either the slave or the master.
base | The pointer to the SPI SCB instance. |
clearMask | The mask of which statuses to clear. See SPI Master and Slave Statuses for the set of constants. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_GetNumInTxFifo | ( | CySCB_Type const * | base | ) |
Returns the number of data elements in the SPI TX FIFO.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE bool Cy_SCB_SPI_IsTxComplete | ( | CySCB_Type const * | base | ) |
Checks whether the TX FIFO and Shifter are empty and there is no more data to send.
base | Pointer to the SPI SCB instance. |
__STATIC_INLINE uint32_t Cy_SCB_SPI_GetNumInRxFifo | ( | CySCB_Type const * | base | ) |
Returns the number of data elements in the SPI RX FIFO.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE void Cy_SCB_SPI_ClearRxFifo | ( | CySCB_Type * | base | ) |
Clears all data out of the SPI RX FIFO.
base | The pointer to the SPI SCB instance. |
__STATIC_INLINE void Cy_SCB_SPI_ClearTxFifo | ( | CySCB_Type * | base | ) |
Clears all data out of the SPI TX FIFO.
base | The pointer to the SPI SCB instance. |