MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Functions | |
static bool | LIN_LPUART_GetRxDataPolarity (const LPUART_Type *base) |
Initializes an LIN_LPUART instance for LIN Network. More... | |
lin_status_t | LIN_LPUART_Deinit (LPUART_Type *base) |
Shuts down the LIN_LPUART by disabling interrupts and transmitter/receiver. More... | |
lin_status_t | LIN_LPUART_SendFrameDataBlocking (LPUART_Type *base, const uint8_t *txBuff, uint8_t txSize, uint32_t timeoutMSec) |
Sends Frame data out through the LIN_LPUART module using blocking method. More... | |
lin_status_t | LIN_LPUART_SendFrameData (LPUART_Type *base, const uint8_t *txBuff, uint8_t txSize) |
Sends frame data out through the LIN_LPUART module using non-blocking method. More... | |
lin_status_t | LIN_LPUART_GetTransmitStatus (LPUART_Type *base, uint8_t *bytesRemaining) |
Get status of an on-going non-blocking transmission While sending frame data using non-blocking method, users can use this function to get status of that transmission. More... | |
lin_status_t | LIN_LPUART_RecvFrmDataBlocking (LPUART_Type *base, uint8_t *rxBuff, uint8_t rxSize, uint32_t timeoutMSec) |
Receives frame data through the LIN_LPUART module using blocking method. More... | |
lin_status_t | LIN_LPUART_RecvFrmData (LPUART_Type *base, uint8_t *rxBuff, uint8_t rxSize) |
Receives frame data through the LIN_LPUART module using non- blocking method. More... | |
lin_status_t | LIN_LPUART_AbortTransferData (LPUART_Type *base) |
Aborts an on-going non-blocking transmission/reception. More... | |
lin_status_t | LIN_LPUART_GetReceiveStatus (LPUART_Type *base, uint8_t *bytesRemaining) |
Get status of an on-going non-blocking reception While receiving frame data using non-blocking method, users can use this function to get status of that receiving. More... | |
lin_status_t | LIN_LPUART_GoToSleepMode (LPUART_Type *base) |
This function puts current node to sleep mode This function changes current node state to LIN_NODE_STATE_SLEEP_MODE. More... | |
lin_status_t | LIN_LPUART_GotoIdleState (LPUART_Type *base) |
Puts current LIN node to Idle state This function changes current node state to LIN_NODE_STATE_IDLE. More... | |
lin_status_t | LIN_LPUART_SendWakeupSignal (LPUART_Type *base) |
Sends a wakeup signal through the LIN_LPUART interface. More... | |
lin_status_t | LIN_LPUART_MasterSendHeader (LPUART_Type *base, uint8_t id) |
Sends frame header out through the LIN_LPUART module using a non-blocking method. More... | |
lin_status_t | LIN_LPUART_EnableIRQ (LPUART_Type *base) |
Enables LIN_LPUART hardware interrupts. More... | |
lin_status_t | LIN_LPUART_DisableIRQ (LPUART_Type *base) |
Disables LIN_LPUART hardware interrupts. More... | |
lin_status_t | LIN_LPUART_AutoBaudCapture (uint32_t instance) |
This function capture bits time to detect break char, calculate baudrate from sync bits and enable transceiver if autobaud successful. More... | |
void | LIN_LPUART_IRQHandler (LPUART_Type *base) |
LIN_LPUART RX TX interrupt handler. More... | |
enum _lin_lpuart_flags |
enum _lin_lpuart_status |
|
inlinestatic |
The caller provides memory for the driver state structures during initialization. The user must select the LIN_LPUART clock source in the application to initialize the LIN_LPUART. This function initializes a LPUART instance for operation. This function will initialize the run-time state structure to keep track of the on-going transfers, initialize the module to user defined settings and default settings, set break field length to be 13 bit times minimum, enable the break detect interrupt, Rx complete interrupt, frame error detect interrupt, and enable the LPUART module transmitter and receiver
instance | LIN_LPUART instance number |
linUserConfig | user configuration structure of type lin_user_config_t |
linCurrentState | pointer to the LIN_LPUART driver state structure |
lin_status_t LIN_LPUART_Deinit | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_SendFrameDataBlocking | ( | LPUART_Type * | base, |
const uint8_t * | txBuff, | ||
uint8_t | txSize, | ||
uint32_t | timeoutMSec | ||
) |
This function will calculate the checksum byte and send it with the frame data. Blocking means that the function does not return until the transmission is complete.
instance | LIN_LPUART instance number |
txBuff | source buffer containing 8-bit data chars to send |
txSize | the number of bytes to send |
timeoutMSec | timeout value in milli seconds |
lin_status_t LIN_LPUART_SendFrameData | ( | LPUART_Type * | base, |
const uint8_t * | txBuff, | ||
uint8_t | txSize | ||
) |
This enables an a-sync method for transmitting data. Non-blocking means that the function returns immediately. The application has to get the transmit status to know when the transmit is complete. This function will calculate the checksum byte and send it with the frame data.
instance | LIN_LPUART instance number |
txBuff | source buffer containing 8-bit data chars to send |
txSize | the number of bytes to send |
lin_status_t LIN_LPUART_GetTransmitStatus | ( | LPUART_Type * | base, |
uint8_t * | bytesRemaining | ||
) |
This function return LIN_TX_BUSY while sending, or LIN_TIMEOUT if timeout has occurred, or return LIN_SUCCESS when the transmission is complete. The bytesRemaining shows number of bytes that still needed to transmit.
instance | LIN_LPUART instance number |
bytesRemaining | Number of bytes still needed to transmit |
lin_status_t LIN_LPUART_RecvFrmDataBlocking | ( | LPUART_Type * | base, |
uint8_t * | rxBuff, | ||
uint8_t | rxSize, | ||
uint32_t | timeoutMSec | ||
) |
This function will check the checksum byte. If the checksum is correct, it will receive the frame data. Blocking means that the function does not return until the reception is complete.
instance | LIN_LPUART instance number |
rxBuff | buffer containing 8-bit received data |
rxSize | the number of bytes to receive |
timeoutMSec | timeout value in milli seconds |
lin_status_t LIN_LPUART_RecvFrmData | ( | LPUART_Type * | base, |
uint8_t * | rxBuff, | ||
uint8_t | rxSize | ||
) |
This function will check the checksum byte. If the checksum is correct, it will receive it with the frame data. Non-blocking means that the function returns immediately. The application has to get the receive status to know when the reception is complete.
instance | LIN_LPUART instance number |
rxBuff | buffer containing 8-bit received data |
rxSize | the number of bytes to receive |
lin_status_t LIN_LPUART_AbortTransferData | ( | LPUART_Type * | base | ) |
While performing a non-blocking transferring data, users can call this function to terminate immediately the transferring.
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_GetReceiveStatus | ( | LPUART_Type * | base, |
uint8_t * | bytesRemaining | ||
) |
This function return the current event ID, LIN_RX_BUSY while receiving and return LIN_SUCCESS, or timeout (LIN_TIMEOUT) when the reception is complete. The bytesRemaining shows number of bytes that still needed to receive.
instance | LIN_LPUART instance number |
bytesRemaining | Number of bytes still needed to receive |
lin_status_t LIN_LPUART_GoToSleepMode | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_GotoIdleState | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_SendWakeupSignal | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_MasterSendHeader | ( | LPUART_Type * | base, |
uint8_t | id | ||
) |
This function sends LIN Break field, sync field then the ID with correct parity.
instance | LIN_LPUART instance number |
id | Frame Identifier |
lin_status_t LIN_LPUART_EnableIRQ | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_DisableIRQ | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |
lin_status_t LIN_LPUART_AutoBaudCapture | ( | uint32_t | instance | ) |
This function should only be used in Slave. The timer should be in mode input capture of both rising and falling edges. The timer input capture pin should be externally connected to RXD pin.
instance | LPUART instance |
void LIN_LPUART_IRQHandler | ( | LPUART_Type * | base | ) |
instance | LIN_LPUART instance number |