19 #ifndef LPUART_DRIVER_H__
20 #define LPUART_DRIVER_H__
27 #if FEATURE_LPUART_HAS_DMA_ENABLE
108 #if FEATURE_LPUART_HAS_DMA_ENABLE
142 #if defined(__cplusplus)
189 void * callbackParam);
205 void * callbackParam);
222 const uint8_t * txBuff,
241 const uint8_t * txBuff,
332 #if defined(__cplusplus)
status_t LPUART_DRV_AbortSendingData(uint32_t instance)
Terminates a non-blocking transmission early.
status_t LPUART_DRV_SendDataBlocking(uint32_t instance, const uint8_t *txBuff, uint32_t txSize, uint32_t timeout)
Sends data out through the LPUART module using a blocking method.
status_t LPUART_DRV_Deinit(uint32_t instance)
Shuts down the LPUART by disabling interrupts and transmitter/receiver.
const clock_names_t g_lpuartClkNames[LPUART_INSTANCE_COUNT]
Table to save LPUART indexes in PCC register map for clock configuration.
status_t LPUART_DRV_SendData(uint32_t instance, const uint8_t *txBuff, uint32_t txSize)
Sends data out through the LPUART module using a non-blocking method. This enables an a-sync method f...
volatile bool isRxBlocking
status_t LPUART_DRV_AbortReceivingData(uint32_t instance)
Terminates a non-blocking receive early.
void(* lpuart_rx_callback_t)(uint32_t instance, void *lpuartState)
LPUART receive callback function type.
lpuart_tx_callback_t LPUART_DRV_InstallTxCallback(uint32_t instance, lpuart_tx_callback_t function, void *callbackParam)
Installs callback function for the LPUART transmit.
void(* lpuart_tx_callback_t)(uint32_t instance, void *lpuartState)
LPUART transmit callback function type.
lpuart_tx_callback_t txCallback
IRQn_Type
Defines the Interrupt Numbers definitions.
lpuart_bit_count_per_char_t bitCountPerChar
lpuart_transfer_type_t transferType
lpuart_parity_mode_t parityMode
lpuart_rx_callback_t LPUART_DRV_InstallRxCallback(uint32_t instance, lpuart_rx_callback_t function, void *callbackParam)
Installs callback function for the LPUART receive.
status_t LPUART_DRV_ReceiveData(uint32_t instance, uint8_t *rxBuff, uint32_t rxSize)
Gets data from the LPUART module by using a non-blocking method. This enables an a-sync method for re...
lpuart_transfer_type_t
Type of LPUART transfer (based on interrupts or DMA).
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
lpuart_parity_mode_t
LPUART parity mode.
lpuart_bit_count_per_char_t
LPUART number of bits in a character.
status_t LPUART_DRV_Init(uint32_t instance, lpuart_state_t *lpuartStatePtr, const lpuart_user_config_t *lpuartUserConfig)
Initializes an LPUART operation instance.
lpuart_rx_callback_t rxCallback
LPUART_Type *const g_lpuartBase[LPUART_INSTANCE_COUNT]
Table of base addresses for LPUART instances.
const IRQn_Type g_lpuartRxTxIrqId[LPUART_INSTANCE_COUNT]
Table to save LPUART IRQ enumeration numbers defined in the CMSIS header file.
volatile status_t transmitStatus
clock_names_t
Clock names.
status_t LPUART_DRV_ReceiveDataBlocking(uint32_t instance, uint8_t *rxBuff, uint32_t rxSize, uint32_t timeout)
Gets data from the LPUART module by using a blocking method. Blocking means that the function does no...
volatile bool isTxBlocking
LPUART configuration structure.
#define LPUART_INSTANCE_COUNT
status_t LPUART_DRV_GetTransmitStatus(uint32_t instance, uint32_t *bytesRemaining)
Returns whether the previous transmit is complete.
lpuart_transfer_type_t transferType
lpuart_bit_count_per_char_t bitCountPerChar
volatile status_t receiveStatus
Runtime state of the LPUART driver.
status_t LPUART_DRV_GetReceiveStatus(uint32_t instance, uint32_t *bytesRemaining)
Returns whether the previous receive is complete.
lpuart_stop_bit_count_t
LPUART number of stop bits.
lpuart_stop_bit_count_t stopBitCount