Functions | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_Put (CySCB_Type *base, uint32_t data) |
Places a single data element in the UART TX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_PutArray (CySCB_Type *base, void *buffer, uint32_t size) |
Places an array of data in the UART TX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_PutArrayBlocking (CySCB_Type *base, void *buffer, uint32_t size) |
Places an array of data in the UART TX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_PutString (CySCB_Type *base, char_t const string[]) |
Places a NULL terminated string in the UART TX FIFO. More... | |
void | Cy_SCB_UART_SendBreakBlocking (CySCB_Type *base, uint32_t breakWidth) |
Sends a break condition (logic low) of specified width on UART TX line. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_Get (CySCB_Type const *base) |
Reads a single data element from the UART RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetArray (CySCB_Type const *base, void *buffer, uint32_t size) |
Reads an array of data out of the UART RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_GetArrayBlocking (CySCB_Type const *base, void *buffer, uint32_t size) |
Reads an array of data out of the UART RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetTxFifoStatus (CySCB_Type const *base) |
Returns the current status of the TX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_ClearTxFifoStatus (CySCB_Type *base, uint32_t clearMask) |
Clears the selected statuses of the TX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetRxFifoStatus (CySCB_Type const *base) |
Returns the current status of the RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_ClearRxFifoStatus (CySCB_Type *base, uint32_t clearMask) |
Clears the selected statuses of the RX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetNumInTxFifo (CySCB_Type const *base) |
Returns the number of data elements in the UART TX FIFO. More... | |
__STATIC_INLINE bool | Cy_SCB_UART_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_UART_GetNumInRxFifo (CySCB_Type const *base) |
Returns the number of data elements in the UART RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_ClearRxFifo (CySCB_Type *base) |
Clears all data out of the UART RX FIFO. More... | |
__STATIC_INLINE void | Cy_SCB_UART_ClearTxFifo (CySCB_Type *base) |
Clears all data out of the UART TX FIFO. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetOverSample (CySCB_Type const *base) |
Returns the value of oversample. More... | |
cy_en_scb_uart_status_t | Cy_SCB_UART_SetOverSample (CySCB_Type *base, uint32_t overSample, cy_stc_scb_uart_context_t *context) |
Sets oversample bits of UART. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetDataWidth (CySCB_Type const *base) |
Returns the value of datawidth. More... | |
void | Cy_SCB_UART_SetDataWidth (CySCB_Type *base, uint32_t dataWidth) |
Sets datawidth for UART transaction. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetParity (CySCB_Type const *base) |
Returns the value of parity. More... | |
void | Cy_SCB_UART_SetParity (CySCB_Type *base, cy_en_scb_uart_parity_t parity) |
Sets parity for UART transaction. More... | |
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetStopBits (CySCB_Type const *base) |
Returns the value of stop bits. More... | |
void | Cy_SCB_UART_SetStopBits (CySCB_Type *base, cy_en_scb_uart_stop_bits_t stopBits) |
Sets stop bits for UART transaction. More... | |
__STATIC_INLINE bool | Cy_SCB_UART_GetDropOnParityError (CySCB_Type const *base) |
Returns the value of SetDropOnParityError. More... | |
void | Cy_SCB_UART_SetDropOnParityError (CySCB_Type *base, bool dropOnParityError) |
Sets SetDropOnParityError for UART transaction. More... | |
__STATIC_INLINE bool | Cy_SCB_UART_GetEnableMsbFirst (CySCB_Type const *base) |
Returns the value of enableMsbFirst. More... | |
void | Cy_SCB_UART_SetEnableMsbFirst (CySCB_Type *base, bool enableMsbFirst) |
Sets enableMsbFirst for UART transaction. More... | |
__STATIC_INLINE uint32_t Cy_SCB_UART_Put | ( | CySCB_Type * | base, |
uint32_t | data | ||
) |
Places a single data element in the UART TX FIFO.
This function does not block and returns how many data elements were placed in the TX FIFO.
base | The pointer to the UART SCB instance. |
data | Data to put in the TX FIFO. The element size is defined by the data type, which depends on the configured data width. |
__STATIC_INLINE uint32_t Cy_SCB_UART_PutArray | ( | CySCB_Type * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Places an array of data in the UART TX FIFO.
This function does not block. It returns how many data elements were placed in the TX FIFO.
base | The pointer to the UART 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 TX. |
__STATIC_INLINE void Cy_SCB_UART_PutArrayBlocking | ( | CySCB_Type * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Places an array of data in the UART TX FIFO.
This function blocks until the number of data elements specified by the size is placed in the TX FIFO.
base | The pointer to the UART 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 data width. |
size | The number of data elements to write into the TX FIFO. |
__STATIC_INLINE void Cy_SCB_UART_PutString | ( | CySCB_Type * | base, |
char_t const | string[] | ||
) |
Places a NULL terminated string in the UART TX FIFO.
This function blocks until the entire string is placed in the TX FIFO.
base | The pointer to the UART SCB instance. |
string | The pointer to the null terminated string array. |
void Cy_SCB_UART_SendBreakBlocking | ( | CySCB_Type * | base, |
uint32_t | breakWidth | ||
) |
Sends a break condition (logic low) of specified width on UART TX line.
Blocks until break is completed. Only call this function when UART TX FIFO and shifter are empty.
base | The pointer to the UART SCB instance. |
breakWidth | Width of break condition. Valid range is the TX data width (4 to 16 bits) |
__STATIC_INLINE uint32_t Cy_SCB_UART_Get | ( | CySCB_Type const * | base | ) |
Reads a single data element from the UART 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_UART_RX_NO_DATA.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetArray | ( | CySCB_Type const * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Reads an array of data out of the UART RX FIFO.
This function does not block. It returns how many data elements were read from the RX FIFO.
base | The pointer to the UART SCB instance. |
buffer | The pointer to the location to place the data read from the RX FIFO. The element size is defined by the data type, which depends on the configured data width. |
size | The number of data elements to read from the RX FIFO. |
__STATIC_INLINE void Cy_SCB_UART_GetArrayBlocking | ( | CySCB_Type const * | base, |
void * | buffer, | ||
uint32_t | size | ||
) |
Reads an array of data out of the UART RX FIFO.
This function blocks until the number of data elements specified by the size has been read from the RX FIFO.
base | The pointer to the UART SCB instance. |
buffer | The pointer to the location to place the data read from the RX FIFO. The element size is defined by the data type, which depends on the configured data width. |
size | The number of data elements to read from the RX FIFO. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetTxFifoStatus | ( | CySCB_Type const * | base | ) |
Returns the current status of the TX FIFO.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE void Cy_SCB_UART_ClearTxFifoStatus | ( | CySCB_Type * | base, |
uint32_t | clearMask | ||
) |
Clears the selected statuses of the TX FIFO.
base | The pointer to the UART SCB instance. |
clearMask | The mask whose statuses to clear. See UART TX FIFO Statuses for the set of constants. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetRxFifoStatus | ( | CySCB_Type const * | base | ) |
Returns the current status of the RX FIFO.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE void Cy_SCB_UART_ClearRxFifoStatus | ( | CySCB_Type * | base, |
uint32_t | clearMask | ||
) |
Clears the selected statuses of the RX FIFO.
base | The pointer to the UART SCB instance. |
clearMask | The mask whose statuses to clear. See UART RX FIFO status. for the set of constants. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetNumInTxFifo | ( | CySCB_Type const * | base | ) |
Returns the number of data elements in the UART TX FIFO.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE bool Cy_SCB_UART_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 UART SCB instance. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetNumInRxFifo | ( | CySCB_Type const * | base | ) |
Returns the number of data elements in the UART RX FIFO.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE void Cy_SCB_UART_ClearRxFifo | ( | CySCB_Type * | base | ) |
Clears all data out of the UART RX FIFO.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE void Cy_SCB_UART_ClearTxFifo | ( | CySCB_Type * | base | ) |
Clears all data out of the UART TX FIFO.
base | The pointer to the UART SCB instance. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetOverSample | ( | CySCB_Type const * | base | ) |
Returns the value of oversample.
base | The pointer to the UART SCB instance. |
cy_en_scb_uart_status_t Cy_SCB_UART_SetOverSample | ( | CySCB_Type * | base, |
uint32_t | overSample, | ||
cy_stc_scb_uart_context_t * | context | ||
) |
Sets oversample bits of UART.
base | The pointer to the UART SCB instance. |
overSample | Value of oversample to be set. |
context | The pointer to the context structure cy_stc_scb_uart_context_t allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure. User should not pass NULL as pointer to context. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetDataWidth | ( | CySCB_Type const * | base | ) |
Returns the value of datawidth.
base | The pointer to the UART SCB instance. |
void Cy_SCB_UART_SetDataWidth | ( | CySCB_Type * | base, |
uint32_t | dataWidth | ||
) |
Sets datawidth for UART transaction.
base | The pointer to the UART SCB instance. |
dataWidth | The width of UART data in the UART transaction. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetParity | ( | CySCB_Type const * | base | ) |
Returns the value of parity.
base | The pointer to the UART SCB instance. |
void Cy_SCB_UART_SetParity | ( | CySCB_Type * | base, |
cy_en_scb_uart_parity_t | parity | ||
) |
Sets parity for UART transaction.
base | The pointer to the UART SCB instance. |
parity | The UART parity bit in the UART transaction. |
__STATIC_INLINE uint32_t Cy_SCB_UART_GetStopBits | ( | CySCB_Type const * | base | ) |
Returns the value of stop bits.
base | The pointer to the UART SCB instance. |
void Cy_SCB_UART_SetStopBits | ( | CySCB_Type * | base, |
cy_en_scb_uart_stop_bits_t | stopBits | ||
) |
Sets stop bits for UART transaction.
base | The pointer to the UART SCB instance. |
stopBits | The number of stop bits in the UART transaction. |
__STATIC_INLINE bool Cy_SCB_UART_GetDropOnParityError | ( | CySCB_Type const * | base | ) |
Returns the value of SetDropOnParityError.
base | The pointer to the UART SCB instance. |
void Cy_SCB_UART_SetDropOnParityError | ( | CySCB_Type * | base, |
bool | dropOnParityError | ||
) |
Sets SetDropOnParityError for UART transaction.
base | The pointer to the UART SCB instance. |
dropOnParityError | To enable the hardware to drop data in the RX FIFO when a parity error is detected in the UART transaction. |
__STATIC_INLINE bool Cy_SCB_UART_GetEnableMsbFirst | ( | CySCB_Type const * | base | ) |
Returns the value of enableMsbFirst.
base | The pointer to the UART SCB instance. |
void Cy_SCB_UART_SetEnableMsbFirst | ( | CySCB_Type * | base, |
bool | enableMsbFirst | ||
) |
Sets enableMsbFirst for UART transaction.
base | The pointer to the UART SCB instance. |
enableMsbFirst | Enables the hardware to shift out data element MSB first; otherwise, LSB first in the UART transaction. |