S32 SDK
lpuart_driver.h File Reference
#include <stddef.h>
#include "lpuart_hal.h"
#include "clock_manager.h"
#include "interrupt_manager.h"
#include "osif.h"
#include "edma_driver.h"

Go to the source code of this file.

Data Structures

struct  lpuart_state_t
 Runtime state of the LPUART driver. More...
 
struct  lpuart_user_config_t
 LPUART configuration structure. More...
 

Typedefs

typedef void(* lpuart_rx_callback_t) (uint32_t instance, void *lpuartState)
 LPUART receive callback function type. More...
 
typedef void(* lpuart_tx_callback_t) (uint32_t instance, void *lpuartState)
 LPUART transmit callback function type. More...
 

Enumerations

enum  lpuart_transfer_type_t { LPUART_USING_DMA = 0, LPUART_USING_INTERRUPTS }
 Type of LPUART transfer (based on interrupts or DMA). More...
 

Functions

LPUART Driver
status_t LPUART_DRV_Init (uint32_t instance, lpuart_state_t *lpuartStatePtr, const lpuart_user_config_t *lpuartUserConfig)
 Initializes an LPUART operation instance. More...
 
status_t LPUART_DRV_Deinit (uint32_t instance)
 Shuts down the LPUART by disabling interrupts and transmitter/receiver. More...
 
lpuart_rx_callback_t LPUART_DRV_InstallRxCallback (uint32_t instance, lpuart_rx_callback_t function, void *callbackParam)
 Installs callback function for the LPUART receive. More...
 
lpuart_tx_callback_t LPUART_DRV_InstallTxCallback (uint32_t instance, lpuart_tx_callback_t function, void *callbackParam)
 Installs callback function for the LPUART transmit. More...
 
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. More...
 
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 for transmitting data. When used with a non-blocking receive, the LPUART can perform a full duplex operation. Non-blocking means that the function returns immediately. The application has to get the transmit status to know when the transmit is complete. More...
 
status_t LPUART_DRV_GetTransmitStatus (uint32_t instance, uint32_t *bytesRemaining)
 Returns whether the previous transmit is complete. More...
 
status_t LPUART_DRV_AbortSendingData (uint32_t instance)
 Terminates a non-blocking transmission early. More...
 
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 not return until the receive is complete. More...
 
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 receiving data. When used with a non-blocking transmission, the LPUART can perform a full duplex operation. Non-blocking means that the function returns immediately. The application has to get the receive status to know when the receive is complete. More...
 
status_t LPUART_DRV_GetReceiveStatus (uint32_t instance, uint32_t *bytesRemaining)
 Returns whether the previous receive is complete. More...
 
status_t LPUART_DRV_AbortReceivingData (uint32_t instance)
 Terminates a non-blocking receive early. More...
 

Variables

LPUART_Type *const g_lpuartBase [LPUART_INSTANCE_COUNT]
 Table of base addresses for LPUART instances. More...
 
const IRQn_Type g_lpuartRxTxIrqId [LPUART_INSTANCE_COUNT]
 Table to save LPUART IRQ enumeration numbers defined in the CMSIS header file. More...
 
const clock_names_t g_lpuartClkNames [LPUART_INSTANCE_COUNT]
 Table to save LPUART indexes in PCC register map for clock configuration. More...