S32 SDK
lpuart_driver.h File Reference
#include <stddef.h>
#include "device_registers.h"
#include "status.h"
#include "interrupt_manager.h"
#include "osif.h"
#include "callbacks.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...
 

Enumerations

enum  lpuart_transfer_type_t { LPUART_USING_DMA = 0, LPUART_USING_INTERRUPTS }
 Type of LPUART transfer (based on interrupts or DMA). More...
 
enum  lpuart_bit_count_per_char_t { LPUART_8_BITS_PER_CHAR = 0x0U, LPUART_9_BITS_PER_CHAR = 0x1U, LPUART_10_BITS_PER_CHAR = 0x2U }
 LPUART number of bits in a character. More...
 
enum  lpuart_parity_mode_t { LPUART_PARITY_DISABLED = 0x0U, LPUART_PARITY_EVEN = 0x2U, LPUART_PARITY_ODD = 0x3U }
 LPUART parity mode. More...
 
enum  lpuart_stop_bit_count_t { LPUART_ONE_STOP_BIT = 0x0U, LPUART_TWO_STOP_BIT = 0x1U }
 LPUART number of stop bits. 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...
 
uart_callback_t LPUART_DRV_InstallRxCallback (uint32_t instance, uart_callback_t function, void *callbackParam)
 Installs callback function for the LPUART receive. More...
 
uart_callback_t LPUART_DRV_InstallTxCallback (uint32_t instance, uart_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...
 
void LPUART_DRV_SendDataPolling (uint32_t instance, const uint8_t *txBuff, uint32_t txSize)
 Send out multiple bytes of data using polling 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_ReceiveDataPolling (uint32_t instance, uint8_t *rxBuff, uint32_t rxSize)
 Receive multiple bytes of data using polling method. 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...
 
status_t LPUART_DRV_SetBaudRate (uint32_t instance, uint32_t desiredBaudRate)
 Configures the LPUART baud rate. More...
 
void LPUART_DRV_GetBaudRate (uint32_t instance, uint32_t *configuredBaudRate)
 Returns the LPUART baud rate. More...