PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Functions
Interrupt
PDL API Reference » SCB (Serial Communication Block) » UART (SCB) » Functions

## General Description

## Functions
void | Cy_SCB_UART_Interrupt (CySCB_Type *base, cy_stc_scb_uart_context_t *context)
| This is the interrupt function for the SCB configured in the UART mode. More...
__STATIC_INLINE void | Cy_SCB_UART_RegisterCallback (CySCB_Type const *base, cy_cb_scb_uart_handle_events_t callback, cy_stc_scb_uart_context_t *context)
| Registers a callback function that notifies that UART Callback Events occurred in the Cy_SCB_UART_Interrupt. More...
__STATIC_INLINE uint32_t | Cy_SCB_UART_GetBaudRateCount (CySCB_Type const *base)
| Reads an amount of peripheral clock periods that constitute the transmission of a 0x55 data frame. More...
__STATIC_INLINE bool | Cy_SCB_UART_EnableLINMode (CySCB_Type *base)
| Enables the LIN (Local Interconnect Network) mode for the UART. More...
__STATIC_INLINE void | Cy_SCB_UART_DisableLINMode (CySCB_Type *base)
| Disables the LIN (Local Interconnect Network) mode for the UART. More...

## Function Documentation

## ◆ Cy_SCB_UART_Interrupt()

void Cy_SCB_UART_Interrupt | ( | CySCB_Type * | base,
|  | cy_stc_scb_uart_context_t * | context
| ) |  |

This is the interrupt function for the SCB configured in the UART mode.

This function must be called inside a user-defined interrupt service routine to make Cy_SCB_UART_Transmit and Cy_SCB_UART_Receive work. The ring buffer operation that enabled by calling Cy_SCB_UART_StartRingBuffer also requires interrupt processing.

Parameters

  base | The pointer to the UART SCB instance.
  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.

## ◆ Cy_SCB_UART_RegisterCallback()

__STATIC_INLINE void Cy_SCB_UART_RegisterCallback | ( | CySCB_Type const * | base,
|  | cy_cb_scb_uart_handle_events_t | callback,
|  | cy_stc_scb_uart_context_t * | context
| ) |  |

Registers a callback function that notifies that UART Callback Events occurred in the Cy_SCB_UART_Interrupt.

Parameters

  base | The pointer to the UART SCB instance.
  callback | The pointer to the callback function. See cy_cb_scb_uart_handle_events_t for the function prototype.
  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 should not modify anything in this structure.

Note
  To remove the callback, pass NULL as the pointer to the callback function.

## ◆ Cy_SCB_UART_GetBaudRateCount()

__STATIC_INLINE uint32_t Cy_SCB_UART_GetBaudRateCount | ( | CySCB_Type const * | base | ) |

Reads an amount of peripheral clock periods that constitute the transmission of a 0x55 data frame.

Parameters

  base | The pointer to the UART SCB instance.

Returns
  Amount of peripheral clock periods that constitute the transmission of a 0x55 data frame.

Note
  This function return the valid data when interrupt CY_SCB_UART_RECEIVE_BAUD_DETECT triggered and LIN_MODE is enabled.
  Only applicable for LIN protocol.

## ◆ Cy_SCB_UART_EnableLINMode()

__STATIC_INLINE bool Cy_SCB_UART_EnableLINMode | ( | CySCB_Type * | base | ) |

Enables the LIN (Local Interconnect Network) mode for the UART.

Parameters

  base | The pointer to the UART SCB instance.

Returns
  If true, LIN mode is enabled. If false, LIN mode is not enabled.

Note
  LIN protocol operation is only supported in STANDARD UART mode

## ◆ Cy_SCB_UART_DisableLINMode()

__STATIC_INLINE void Cy_SCB_UART_DisableLINMode | ( | CySCB_Type * | base | ) |

Disables the LIN (Local Interconnect Network) mode for the UART.

Parameters

  base | The pointer to the UART SCB instance.