![]() |
S32 SDK
|
Go to the source code of this file.
Data Structures | |
struct | lpuart_idle_line_config_t |
Structure for idle line configuration settings. More... | |
Macros | |
#define | LPUART_SHIFT (16U) |
#define | LPUART_BAUD_REG_ID (1U) |
#define | LPUART_STAT_REG_ID (2U) |
#define | LPUART_CTRL_REG_ID (3U) |
#define | LPUART_DATA_REG_ID (4U) |
#define | LPUART_MATCH_REG_ID (5U) |
#define | LPUART_MODIR_REG_ID (6U) |
#define | LPUART_FIFO_REG_ID (7U) |
#define | LPUART_WATER_REG_ID (8U) |
Functions | |
LPUART Common Configurations | |
void | LPUART_HAL_Init (LPUART_Type *base) |
Initializes the LPUART controller. More... | |
static void | LPUART_HAL_SetTransmitterCmd (LPUART_Type *base, bool enable) |
Enable/Disable the LPUART transmitter. More... | |
static bool | LPUART_HAL_GetTransmitterCmd (const LPUART_Type *base) |
Gets the LPUART transmitter enabled/disabled configuration. More... | |
static void | LPUART_HAL_SetReceiverCmd (LPUART_Type *base, bool enable) |
Enable/Disable the LPUART receiver. More... | |
static bool | LPUART_HAL_GetReceiverCmd (const LPUART_Type *base) |
Gets the LPUART receiver enabled/disabled configuration. More... | |
status_t | LPUART_HAL_SetBaudRate (LPUART_Type *base, uint32_t sourceClockInHz, uint32_t desiredBaudRate) |
Configures the LPUART baud rate. More... | |
static void | LPUART_HAL_SetBaudRateDivisor (LPUART_Type *base, uint32_t baudRateDivisor) |
Sets the LPUART baud rate modulo divisor. More... | |
static void | LPUART_HAL_SetOversamplingRatio (LPUART_Type *base, uint32_t overSamplingRatio) |
Sets the LPUART baud rate oversampling ratio. More... | |
static void | LPUART_HAL_SetBothEdgeSamplingCmd (LPUART_Type *base, bool enable) |
Configures the LPUART baud rate both edge sampling. More... | |
static bool | LPUART_HAL_GetRxDataPolarity (const LPUART_Type *base) |
Returns whether the receive data is inverted or not. More... | |
static void | LPUART_HAL_SetRxDataPolarity (LPUART_Type *base, bool polarity) |
Sets whether the recevie data is inverted or not. More... | |
void | LPUART_HAL_SetBitCountPerChar (LPUART_Type *base, lpuart_bit_count_per_char_t bitCountPerChar) |
Configures the number of bits per character in the LPUART controller. More... | |
void | LPUART_HAL_SetParityMode (LPUART_Type *base, lpuart_parity_mode_t parityModeType) |
Configures parity mode in the LPUART controller. More... | |
static void | LPUART_HAL_SetStopBitCount (LPUART_Type *base, lpuart_stop_bit_count_t stopBitCount) |
Configures the number of stop bits in the LPUART controller. More... | |
static const volatile void * | LPUART_HAL_GetDataRegAddr (const LPUART_Type *base) |
Get LPUART tx/rx data register address. More... | |
LPUART Interrupts and DMA | |
void | LPUART_HAL_SetIntMode (LPUART_Type *base, lpuart_interrupt_t intSrc, bool enable) |
Configures the LPUART module interrupts. More... | |
bool | LPUART_HAL_GetIntMode (const LPUART_Type *base, lpuart_interrupt_t intSrc) |
Returns LPUART module interrupts state. More... | |
static void | LPUART_HAL_SetTxDmaCmd (LPUART_Type *base, bool enable) |
Configures DMA requests. More... | |
static void | LPUART_HAL_SetRxDmaCmd (LPUART_Type *base, bool enable) |
Configures DMA requests. More... | |
static bool | LPUART_HAL_IsTxDmaEnabled (const LPUART_Type *base) |
Gets the LPUART DMA request configuration. More... | |
static bool | LPUART_HAL_IsRxDmaEnabled (const LPUART_Type *base) |
Gets the LPUART DMA request configuration. More... | |
LPUART Transfer Functions | |
static void | LPUART_HAL_Putchar (LPUART_Type *base, uint8_t data) |
Sends the LPUART 8-bit character. More... | |
void | LPUART_HAL_Putchar9 (LPUART_Type *base, uint16_t data) |
Sends the LPUART 9-bit character. More... | |
void | LPUART_HAL_Putchar10 (LPUART_Type *base, uint16_t data) |
Sends the LPUART 10-bit character (Note: Feature available on select LPUART instances). More... | |
static void | LPUART_HAL_Getchar (const LPUART_Type *base, uint8_t *readData) |
Gets the LPUART 8-bit character. More... | |
void | LPUART_HAL_Getchar9 (const LPUART_Type *base, uint16_t *readData) |
Gets the LPUART 9-bit character. More... | |
void | LPUART_HAL_Getchar10 (const LPUART_Type *base, uint16_t *readData) |
Gets the LPUART 10-bit character. More... | |
void | LPUART_HAL_SendDataPolling (LPUART_Type *base, const uint8_t *txBuff, uint32_t txSize) |
Send out multiple bytes of data using polling method. More... | |
status_t | LPUART_HAL_ReceiveDataPolling (LPUART_Type *base, uint8_t *rxBuff, uint32_t rxSize) |
Receive multiple bytes of data using polling method. More... | |
LPUART Status Flags | |
bool | LPUART_HAL_GetStatusFlag (const LPUART_Type *base, lpuart_status_flag_t statusFlag) |
LPUART get status flag. More... | |
status_t | LPUART_HAL_ClearStatusFlag (LPUART_Type *base, lpuart_status_flag_t statusFlag) |
LPUART clears an individual status flag. More... | |
LPUART Special Feature Configurations | |
static void | LPUART_HAL_SetIdleChar (LPUART_Type *base, lpuart_idle_char_t idleConfig) |
Configures the number of idle characters. More... | |
static lpuart_idle_char_t | LPUART_HAL_GetIdleChar (const LPUART_Type *base) |
Gets the number of idle characters for IDLE flag. More... | |
static bool | LPUART_HAL_IsCurrentDataWithNoise (const LPUART_Type *base) |
Checks whether the current data word was received with noise. More... | |
static bool | LPUART_HAL_IsCurrentDataWithFrameError (const LPUART_Type *base) |
Checks whether the current data word was received with frame error. More... | |
static void | LPUART_HAL_SetTxSpecialChar (LPUART_Type *base, uint8_t specialChar) |
Indicates a special character is to be transmitted. More... | |
static bool | LPUART_HAL_IsCurrentDataWithParityError (const LPUART_Type *base) |
Checks whether the current data word was received with parity error. More... | |
static bool | LPUART_HAL_IsReceiveBufferEmpty (const LPUART_Type *base) |
Checks whether the receive buffer is empty. More... | |
static bool | LPUART_HAL_WasPreviousReceiverStateIdle (const LPUART_Type *base) |
Checks whether the previous BUS state was idle before this byte is received. More... | |
static void | LPUART_HAL_SetWaitModeOperation (LPUART_Type *base, lpuart_operation_config_t mode) |
Configures the LPUART operation in wait mode (operates or stops operations in wait mode). More... | |
static lpuart_operation_config_t | LPUART_HAL_GetWaitModeOperation (const LPUART_Type *base) |
Gets the LPUART operation in wait mode. More... | |
void | LPUART_HAL_SetLoopbackCmd (LPUART_Type *base, bool enable) |
Configures the LPUART loopback operation (enable/disable loopback operation) More... | |
void | LPUART_HAL_SetSingleWireCmd (LPUART_Type *base, bool enable) |
Configures the LPUART single-wire operation (enable/disable single-wire mode). More... | |
static void | LPUART_HAL_SetTxdirInSinglewireMode (LPUART_Type *base, lpuart_singlewire_txdir_t direction) |
Configures the LPUART transmit direction while in single-wire mode. More... | |
status_t | LPUART_HAL_SetReceiverInStandbyMode (LPUART_Type *base) |
Places the LPUART receiver in standby mode. More... | |
static void | LPUART_HAL_PutReceiverInNormalMode (LPUART_Type *base) |
Places the LPUART receiver in a normal mode. More... | |
static bool | LPUART_HAL_IsReceiverInStandby (const LPUART_Type *base) |
Checks whether the LPUART receiver is in a standby mode. More... | |
static void | LPUART_HAL_SetReceiverWakeupMode (LPUART_Type *base, lpuart_wakeup_method_t method) |
Sets the LPUART receiver wakeup method from standby mode. More... | |
static lpuart_wakeup_method_t | LPUART_HAL_GetReceiverWakeupMode (const LPUART_Type *base) |
Gets the LPUART receiver wakeup method from standby mode. More... | |
void | LPUART_HAL_SetIdleLineDetect (LPUART_Type *base, const lpuart_idle_line_config_t *config) |
LPUART idle-line detect operation configuration. More... | |
static void | LPUART_HAL_SetBreakCharTransmitLength (LPUART_Type *base, lpuart_break_char_length_t length) |
LPUART break character transmit length configuration. More... | |
static void | LPUART_HAL_SetBreakCharDetectLength (LPUART_Type *base, lpuart_break_char_length_t length) |
LPUART break character detect length configuration. More... | |
static void | LPUART_HAL_QueueBreakField (LPUART_Type *base) |
LPUART transmit sends break character configuration. More... | |
static void | LPUART_HAL_SetMatchAddressMode (LPUART_Type *base, lpuart_match_config_t config) |
Configures match address mode control. More... | |
void | LPUART_HAL_SetMatchAddressReg1 (LPUART_Type *base, bool enable, uint8_t value) |
Configures address match register 1. More... | |
void | LPUART_HAL_SetMatchAddressReg2 (LPUART_Type *base, bool enable, uint8_t value) |
Configures address match register 2. More... | |
static void | LPUART_HAL_SetSendMsbFirstCmd (LPUART_Type *base, bool enable) |
LPUART sends the MSB first configuration. More... | |
static void | LPUART_HAL_SetReceiveResyncCmd (LPUART_Type *base, bool enable) |
LPUART enable/disable re-sync of received data configuration. More... | |
static void | LPUART_HAL_SetCtsSource (LPUART_Type *base, lpuart_cts_source_t source) |
Transmits the CTS source configuration. More... | |
static void | LPUART_HAL_SetCtsMode (LPUART_Type *base, lpuart_cts_config_t mode) |
Transmits the CTS configuration. More... | |
static void | LPUART_HAL_SetTxCtsCmd (LPUART_Type *base, bool enable) |
Enable/Disable the transmitter clear-to-send. More... | |
static void | LPUART_HAL_SetRxRtsCmd (LPUART_Type *base, bool enable) |
Enable/Disable the receiver request-to-send. More... | |
static void | LPUART_HAL_SetTxRtsCmd (LPUART_Type *base, bool enable) |
Enable/Disable the transmitter request-to-send. More... | |
static void | LPUART_HAL_SetTxRtsPolarityMode (LPUART_Type *base, bool polarity) |
Configures the transmitter RTS polarity. More... | |
static void | LPUART_HAL_SetTxFIFOCmd (LPUART_Type *base, bool enable) |
Enable/Disable the transmitter FIFO. More... | |
static void | LPUART_HAL_SetRxFIFOCmd (LPUART_Type *base, bool enable) |
Enable/Disable the receiver FIFO. More... | |
static void | LPUART_HAL_SetRxIdleEmptyDuration (LPUART_Type *base, uint8_t duration) |
Enables the assertion of RDRF when the receiver is idle. More... | |
static void | LPUART_HAL_FlushTxFifoBuffer (LPUART_Type *base) |
Flush tx FIFO buffer. More... | |
static void | LPUART_HAL_FlushRxFifoBuffer (LPUART_Type *base) |
Flush rx FIFO buffer. More... | |
static void | LPUART_HAL_SetTxWatermark (LPUART_Type *base, uint8_t txWater) |
Sets the tx watermark. More... | |
static void | LPUART_HAL_SetRxWatermark (LPUART_Type *base, uint8_t rxWater) |
Sets the rx watermark. More... | |
void | LPUART_HAL_SetInfrared (LPUART_Type *base, bool enable, lpuart_ir_tx_pulsewidth_t pulseWidth) |
Configures the LPUART infrared operation. More... | |