MTB CAT5 Peripheral driver library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

General Description

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)
 
__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 BOOL8 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)
 
__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)
 
__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)
 
__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)
 
__STATIC_INLINE BOOL8 Cy_SCB_UART_GetDropOnParityError (CySCB_Type const *base)
 Returns the value of SetDropOnParityError. More...
 
void Cy_SCB_UART_SetDropOnParityError (CySCB_Type *base, BOOL8 dropOnParityError)
 
__STATIC_INLINE BOOL8 Cy_SCB_UART_GetEnableMsbFirst (CySCB_Type const *base)
 Returns the value of enableMsbFirst. More...
 
void Cy_SCB_UART_SetEnableMsbFirst (CySCB_Type *base, BOOL8 enableMsbFirst)
 

Function Documentation

__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.

Parameters
baseThe pointer to the UART SCB instance.
dataData to put in the TX FIFO. The element size is defined by the data type, which depends on the configured data width.
Returns
The number of data elements placed in the TX FIFO: 0 or 1.
__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.

Parameters
baseThe pointer to the UART SCB instance.
bufferThe 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.
sizeThe number of data elements to TX.
Returns
The number of data elements placed in the TX FIFO.
__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.

Parameters
baseThe pointer to the UART SCB instance.
bufferThe 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.
sizeThe 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.

Parameters
baseThe pointer to the UART SCB instance.
stringThe pointer to the null terminated string array.
__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.

Parameters
baseThe pointer to the UART SCB instance.
Returns
Data from the RX FIFO. The data element size is defined by the configured data width.
__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.

Parameters
baseThe pointer to the UART SCB instance.
bufferThe 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.
sizeThe number of data elements to read from the RX FIFO.
Returns
The number of data elements 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.

Parameters
baseThe pointer to the UART SCB instance.
bufferThe 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.
sizeThe 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.

Parameters
baseThe pointer to the UART SCB instance.
Returns
UART TX FIFO Statuses
__STATIC_INLINE void Cy_SCB_UART_ClearTxFifoStatus ( CySCB_Type base,
uint32_t  clearMask 
)

Clears the selected statuses of the TX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
clearMaskThe mask whose statuses to clear. See UART TX FIFO Statuses for the set of constants.
Note
__STATIC_INLINE uint32_t Cy_SCB_UART_GetRxFifoStatus ( CySCB_Type const *  base)

Returns the current status of the RX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
Returns
UART RX FIFO status.
__STATIC_INLINE void Cy_SCB_UART_ClearRxFifoStatus ( CySCB_Type base,
uint32_t  clearMask 
)

Clears the selected statuses of the RX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
clearMaskThe mask whose statuses to clear. See UART RX FIFO status. for the set of constants.
Note
__STATIC_INLINE uint32_t Cy_SCB_UART_GetNumInTxFifo ( CySCB_Type const *  base)

Returns the number of data elements in the UART TX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The number of data elements in the TX FIFO. The size of date element defined by the configured data width.
Note
This number does not include any data currently in the TX shifter.
__STATIC_INLINE BOOL8 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.

Parameters
basePointer to the UART SCB instance.
Returns
If TRUE, transmission complete. If FALSE, transmission is not complete.
__STATIC_INLINE uint32_t Cy_SCB_UART_GetNumInRxFifo ( CySCB_Type const *  base)

Returns the number of data elements in the UART RX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The number of data elements in the RX FIFO. The size of date element defined by the configured data width.
__STATIC_INLINE void Cy_SCB_UART_ClearRxFifo ( CySCB_Type base)

Clears all data out of the UART RX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
Side Effects
Any data currently in the shifter is cleared and lost.
__STATIC_INLINE void Cy_SCB_UART_ClearTxFifo ( CySCB_Type base)

Clears all data out of the UART TX FIFO.

Parameters
baseThe pointer to the UART SCB instance.
Side Effects
The TX FIFO clear operation also clears the shift register, so that the shifter could be cleared in the middle of a data element transfer, corrupting it. The data element corruption means that all bits that have not been transmitted are transmitted as 1s on the bus.
__STATIC_INLINE uint32_t Cy_SCB_UART_GetOverSample ( CySCB_Type const *  base)

Returns the value of oversample.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The value of oversample.
__STATIC_INLINE uint32_t Cy_SCB_UART_GetDataWidth ( CySCB_Type const *  base)

Returns the value of datawidth.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The value of datawidth.
Note
Values of Tx and Rx datawidth are same.
__STATIC_INLINE uint32_t Cy_SCB_UART_GetParity ( CySCB_Type const *  base)

Returns the value of parity.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The value of parity.
Note
Values of Tx and Rx parity are same.
__STATIC_INLINE uint32_t Cy_SCB_UART_GetStopBits ( CySCB_Type const *  base)

Returns the value of stop bits.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The value of stop bits.
Note
Values of Tx and Rx stop bits are same.
__STATIC_INLINE BOOL8 Cy_SCB_UART_GetDropOnParityError ( CySCB_Type const *  base)

Returns the value of SetDropOnParityError.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The value of SetDropOnParityError.
__STATIC_INLINE BOOL8 Cy_SCB_UART_GetEnableMsbFirst ( CySCB_Type const *  base)

Returns the value of enableMsbFirst.

Parameters
baseThe pointer to the UART SCB instance.
Returns
The value of enableMsbFirst.
Note
Values of Tx and Rx enableMsbFirst are same.