Classes
fsl_lpuart.h File Reference
#include "fsl_common.h"
Include dependency graph for fsl_lpuart.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _lpuart_config
 LPUART configuration structure. More...
 
struct  _lpuart_handle
 LPUART handle structure. More...
 
struct  _lpuart_transfer
 LPUART transfer structure. More...
 

Functions

Initialization and deinitialization
void LPUART_Deinit (LPUART_Type *base)
 Deinitializes a LPUART instance. More...
 
void LPUART_GetDefaultConfig (lpuart_config_t *config)
 Gets the default configuration structure. More...
 
status_t LPUART_Init (LPUART_Type *base, const lpuart_config_t *config, uint32_t srcClock_Hz)
 Initializes an LPUART instance with the user configuration structure and the peripheral clock. More...
 
status_t LPUART_SetBaudRate (LPUART_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz)
 Sets the LPUART instance baudrate. More...
 
Status
status_t LPUART_ClearStatusFlags (LPUART_Type *base, uint32_t mask)
 Clears status flags with a provided mask. More...
 
uint32_t LPUART_GetStatusFlags (LPUART_Type *base)
 Gets LPUART status flags. More...
 
Interrupts
void LPUART_DisableInterrupts (LPUART_Type *base, uint32_t mask)
 Disables LPUART interrupts according to a provided mask. More...
 
void LPUART_EnableInterrupts (LPUART_Type *base, uint32_t mask)
 Enables LPUART interrupts according to a provided mask. More...
 
uint32_t LPUART_GetEnabledInterrupts (LPUART_Type *base)
 Gets enabled LPUART interrupts. More...
 
Bus Operations
static void LPUART_EnableRx (LPUART_Type *base, bool enable)
 Enables or disables the LPUART receiver. More...
 
static void LPUART_EnableTx (LPUART_Type *base, bool enable)
 Enables or disables the LPUART transmitter. More...
 
uint32_t LPUART_GetInstance (LPUART_Type *base)
 Get the LPUART instance from peripheral base address. More...
 
status_t LPUART_ReadBlocking (LPUART_Type *base, uint8_t *data, size_t length)
 Reads the receiver data register using a blocking method. More...
 
static uint8_t LPUART_ReadByte (LPUART_Type *base)
 Reads the receiver register. More...
 
status_t LPUART_WriteBlocking (LPUART_Type *base, const uint8_t *data, size_t length)
 Writes to the transmitter register using a blocking method. More...
 
static void LPUART_WriteByte (LPUART_Type *base, uint8_t data)
 Writes to the transmitter register. More...
 
Transactional
void LPUART_TransferAbortReceive (LPUART_Type *base, lpuart_handle_t *handle)
 Aborts the interrupt-driven data receiving. More...
 
void LPUART_TransferAbortSend (LPUART_Type *base, lpuart_handle_t *handle)
 Aborts the interrupt-driven data transmit. More...
 
void LPUART_TransferCreateHandle (LPUART_Type *base, lpuart_handle_t *handle, lpuart_transfer_callback_t callback, void *userData)
 Initializes the LPUART handle. More...
 
status_t LPUART_TransferGetReceiveCount (LPUART_Type *base, lpuart_handle_t *handle, uint32_t *count)
 Gets the number of bytes that have been received. More...
 
size_t LPUART_TransferGetRxRingBufferLength (LPUART_Type *base, lpuart_handle_t *handle)
 Get the length of received data in RX ring buffer. More...
 
status_t LPUART_TransferGetSendCount (LPUART_Type *base, lpuart_handle_t *handle, uint32_t *count)
 Gets the number of bytes that have been sent out to bus. More...
 
void LPUART_TransferHandleErrorIRQ (LPUART_Type *base, lpuart_handle_t *handle)
 LPUART Error IRQ handle function. More...
 
void LPUART_TransferHandleIRQ (LPUART_Type *base, lpuart_handle_t *handle)
 LPUART IRQ handle function. More...
 
status_t LPUART_TransferReceiveNonBlocking (LPUART_Type *base, lpuart_handle_t *handle, lpuart_transfer_t *xfer, size_t *receivedBytes)
 Receives a buffer of data using the interrupt method. More...
 
status_t LPUART_TransferSendNonBlocking (LPUART_Type *base, lpuart_handle_t *handle, lpuart_transfer_t *xfer)
 Transmits a buffer of data using the interrupt method. More...
 
void LPUART_TransferStartRingBuffer (LPUART_Type *base, lpuart_handle_t *handle, uint8_t *ringBuffer, size_t ringBufferSize)
 Sets up the RX ring buffer. More...
 
void LPUART_TransferStopRingBuffer (LPUART_Type *base, lpuart_handle_t *handle)
 Aborts the background transfer and uninstalls the ring buffer. More...
 

Driver version

enum  {
  kStatus_LPUART_TxBusy = MAKE_STATUS(kStatusGroup_LPUART, 0), kStatus_LPUART_RxBusy = MAKE_STATUS(kStatusGroup_LPUART, 1), kStatus_LPUART_TxIdle = MAKE_STATUS(kStatusGroup_LPUART, 2), kStatus_LPUART_RxIdle = MAKE_STATUS(kStatusGroup_LPUART, 3),
  kStatus_LPUART_TxWatermarkTooLarge = MAKE_STATUS(kStatusGroup_LPUART, 4), kStatus_LPUART_RxWatermarkTooLarge = MAKE_STATUS(kStatusGroup_LPUART, 5), kStatus_LPUART_FlagCannotClearManually = MAKE_STATUS(kStatusGroup_LPUART, 6), kStatus_LPUART_Error = MAKE_STATUS(kStatusGroup_LPUART, 7),
  kStatus_LPUART_RxRingBufferOverrun, kStatus_LPUART_RxHardwareOverrun = MAKE_STATUS(kStatusGroup_LPUART, 9), kStatus_LPUART_NoiseError = MAKE_STATUS(kStatusGroup_LPUART, 10), kStatus_LPUART_FramingError = MAKE_STATUS(kStatusGroup_LPUART, 11),
  kStatus_LPUART_ParityError = MAKE_STATUS(kStatusGroup_LPUART, 12), kStatus_LPUART_BaudrateNotSupport, kStatus_LPUART_IdleLineDetected = MAKE_STATUS(kStatusGroup_LPUART, 14), kStatus_LPUART_Timeout = MAKE_STATUS(kStatusGroup_LPUART, 15)
}
 Error codes for the LPUART driver. More...
 
enum  _lpuart_data_bits { kLPUART_EightDataBits = 0x0U }
 LPUART data bits count. More...
 
enum  _lpuart_flags {
  kLPUART_TxDataRegEmptyFlag, kLPUART_TransmissionCompleteFlag, kLPUART_RxDataRegFullFlag, kLPUART_IdleLineFlag = (LPUART_STAT_IDLE_MASK),
  kLPUART_RxOverrunFlag = (LPUART_STAT_OR_MASK), kLPUART_NoiseErrorFlag = (LPUART_STAT_NF_MASK), kLPUART_FramingErrorFlag, kLPUART_ParityErrorFlag = (LPUART_STAT_PF_MASK),
  kLPUART_RxActiveEdgeFlag, kLPUART_RxActiveFlag
}
 LPUART status flags. More...
 
enum  _lpuart_idle_config {
  kLPUART_IdleCharacter1 = 0U, kLPUART_IdleCharacter2 = 1U, kLPUART_IdleCharacter4 = 2U, kLPUART_IdleCharacter8 = 3U,
  kLPUART_IdleCharacter16 = 4U, kLPUART_IdleCharacter32 = 5U, kLPUART_IdleCharacter64 = 6U, kLPUART_IdleCharacter128 = 7U
}
 LPUART idle detected configuration. This structure defines the number of idle characters that must be received before the IDLE flag is set. More...
 
enum  _lpuart_idle_type_select { kLPUART_IdleTypeStartBit = 0U, kLPUART_IdleTypeStopBit = 1U }
 LPUART idle flag type defines when the receiver starts counting. More...
 
enum  _lpuart_interrupt_enable {
  kLPUART_RxActiveEdgeInterruptEnable = (LPUART_BAUD_RXEDGIE_MASK >> 8), kLPUART_TxDataRegEmptyInterruptEnable = (LPUART_CTRL_TIE_MASK), kLPUART_TransmissionCompleteInterruptEnable = (LPUART_CTRL_TCIE_MASK), kLPUART_RxDataRegFullInterruptEnable = (LPUART_CTRL_RIE_MASK),
  kLPUART_IdleLineInterruptEnable = (LPUART_CTRL_ILIE_MASK), kLPUART_RxOverrunInterruptEnable = (LPUART_CTRL_ORIE_MASK), kLPUART_NoiseErrorInterruptEnable = (LPUART_CTRL_NEIE_MASK), kLPUART_FramingErrorInterruptEnable = (LPUART_CTRL_FEIE_MASK),
  kLPUART_ParityErrorInterruptEnable = (LPUART_CTRL_PEIE_MASK)
}
 LPUART interrupt configuration structure, default settings all disabled. More...
 
enum  _lpuart_parity_mode { kLPUART_ParityDisabled = 0x0U, kLPUART_ParityEven = 0x2U, kLPUART_ParityOdd = 0x3U }
 LPUART parity mode. More...
 
enum  _lpuart_stop_bit_count { kLPUART_OneStopBit = 0U, kLPUART_TwoStopBit = 1U }
 LPUART stop bit count. More...
 
#define FSL_LPUART_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))
 LPUART driver version 2.3.0. More...
 
typedef struct _lpuart_config lpuart_config_t
 LPUART configuration structure. More...
 
typedef enum _lpuart_data_bits lpuart_data_bits_t
 LPUART data bits count. More...
 
typedef struct _lpuart_handle lpuart_handle_t
 
typedef enum _lpuart_idle_config lpuart_idle_config_t
 LPUART idle detected configuration. This structure defines the number of idle characters that must be received before the IDLE flag is set. More...
 
typedef enum _lpuart_idle_type_select lpuart_idle_type_select_t
 LPUART idle flag type defines when the receiver starts counting. More...
 
typedef enum _lpuart_parity_mode lpuart_parity_mode_t
 LPUART parity mode. More...
 
typedef enum _lpuart_stop_bit_count lpuart_stop_bit_count_t
 LPUART stop bit count. More...
 
typedef void(* lpuart_transfer_callback_t) (LPUART_Type *base, lpuart_handle_t *handle, status_t status, void *userData)
 LPUART transfer callback function. More...
 
typedef struct _lpuart_transfer lpuart_transfer_t
 LPUART transfer structure. More...
 
#define UART_RETRY_TIMES   0U /* Defining to zero means to keep waiting for the flag until it is assert/deassert. */
 Retry times for waiting flag. More...
 


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57