This file contains the prototype of LIN driver APIs.
Go to the source code of this file.
Macros | |
#define | LIN_IO_DFT_KEY (0xAU) |
LIN IO DFT Key which when written in IODFTENA enables the User and Previledge mode Writes. More... | |
#define | LIN_WAKEUP_KEY (0xF0U) |
LIN/SCI Wakeup signal is sent by sending an byte with value 0xF0. More... | |
Lin Parity ID Masks | |
#define | LIN_ID0 (0x1U) |
#define | LIN_ID1 (0x2U) |
#define | LIN_ID2 (0x4U) |
#define | LIN_ID3 (0x8U) |
#define | LIN_ID4 (0x10U) |
#define | LIN_ID5 (0x20U) |
Lin Interrupt Flag Parameters | |
Note: Definition for the intFlags parameter of LIN_enableInterrupt(), LIN_disableInterrupt(), LIN_clearInterruptStatus(), LIN_setInterruptLevel0() and LIN_setInterruptLevel1(). | |
#define | LIN_INT_WAKEUP (0x00000002U) /* Wakeup */ |
#define | LIN_INT_TO (0x00000010U) /* Time out */ |
#define | LIN_INT_TOAWUS (0x00000040U) /* Time out after wakeup signal */ |
#define | LIN_INT_TOA3WUS (0x00000080U) /* Time out after 3 wakeup signals */ |
#define | LIN_INT_TX (0x00000100U) /* Transmit buffer ready */ |
#define | LIN_INT_RX (0x00000200U) /* Receive buffer ready */ |
#define | LIN_INT_ID (0x00002000U) /* Received matching identifier */ |
#define | LIN_INT_PE (0x01000000U) /* Parity error */ |
#define | LIN_INT_OE (0x02000000U) /* Overrun error */ |
#define | LIN_INT_FE (0x04000000U) /* Framing error */ |
#define | LIN_INT_NRE (0x08000000U) /* No response error */ |
#define | LIN_INT_ISFE (0x10000000U) /* Inconsistent sync field error */ |
#define | LIN_INT_CE (0x20000000U) /* Checksum error */ |
#define | LIN_INT_PBE (0x40000000U) /* Physical bus error */ |
#define | LIN_INT_BE (0x80000000U) /* Bit error */ |
#define | LIN_INT_ALL (0xFF0023D2U) /* All interrupts */ |
Lin Get Interrupt Flag | |
Note: Definitions for the return value of LIN_getInterruptStatus(). | |
#define | LIN_FLAG_BREAK (CSL_LIN_SCIFLR_BRKDT_MASK) |
#define | LIN_FLAG_WAKEUP (CSL_LIN_SCIFLR_WAKEUP_MASK) |
#define | LIN_FLAG_IDLE (CSL_LIN_SCIFLR_IDLE_MASK) |
#define | LIN_FLAG_BUSY (CSL_LIN_SCIFLR_BUSY_MASK) |
#define | LIN_FLAG_TO (CSL_LIN_SCIFLR_TIMEOUT_MASK) |
#define | LIN_FLAG_TOAWUS (CSL_LIN_SCIFLR_TOAWUS_MASK) |
#define | LIN_FLAG_TOA3WUS (CSL_LIN_SCIFLR_TOA3WUS_MASK) |
#define | LIN_FLAG_TXRDY (CSL_LIN_SCIFLR_TXRDY_MASK) |
#define | LIN_FLAG_RXRDY (CSL_LIN_SCIFLR_RXRDY_MASK) |
#define | LIN_FLAG_TXWAKE (CSL_LIN_SCIFLR_TXWAKE_MASK) |
#define | LIN_FLAG_TXEMPTY (CSL_LIN_SCIFLR_TXEMPTY_MASK) |
#define | LIN_FLAG_RXWAKE (CSL_LIN_SCIFLR_RXWAKE_MASK) |
#define | LIN_FLAG_TXID (CSL_LIN_SCIFLR_IDTXFLAG_MASK) |
#define | LIN_FLAG_RXID (CSL_LIN_SCIFLR_IDRXFLAG_MASK) |
#define | LIN_FLAG_PE (CSL_LIN_SCIFLR_PE_MASK) |
#define | LIN_FLAG_OE (CSL_LIN_SCIFLR_OE_MASK) |
#define | LIN_FLAG_FE (CSL_LIN_SCIFLR_FE_MASK) |
#define | LIN_FLAG_NRE (CSL_LIN_SCIFLR_NRE_MASK) |
#define | LIN_FLAG_ISFE (CSL_LIN_SCIFLR_ISFE_MASK) |
#define | LIN_FLAG_CE (CSL_LIN_SCIFLR_CE_MASK) |
#define | LIN_FLAG_PBE (CSL_LIN_SCIFLR_PBE_MASK) |
#define | LIN_FLAG_BE (CSL_LIN_SCIFLR_BE_MASK) |
Lin Interrupt Offset | |
Note: Definitions for the return value of LIN_getInterruptLine0Offset() and LIN_getInterruptLine1Offset(). | |
#define | LIN_VECT_NONE (0x00) |
#define | LIN_VECT_WAKEUP (0x01) |
#define | LIN_VECT_ISFE (0x02) |
#define | LIN_VECT_PE (0x03) |
#define | LIN_VECT_ID (0x04) |
#define | LIN_VECT_PBE (0x05) |
#define | LIN_VECT_FE (0x06) |
#define | LIN_VECT_BREAK (0x07) |
#define | LIN_VECT_CE (0x08) |
#define | LIN_VECT_OE (0x09) |
#define | LIN_VECT_BE (0x0A) |
#define | LIN_VECT_RX (0x0B) |
#define | LIN_VECT_TX (0x0C) |
#define | LIN_VECT_NRE (0x0D) |
#define | LIN_VECT_TOAWUS (0x0E) |
#define | LIN_VECT_TOA3WUS (0x0F) |
#define | LIN_VECT_TO (0x10) |
Lin Error Defination | |
Note: Definitions for the LIN errors parameter of LIN_enableModuleErrors() and LIN_disableModuleErrors(). | |
#define | LIN_ALL_ERRORS (0xF0000000U) |
#define | LIN_BIT_ERROR (0x80000000U) |
#define | LIN_BUS_ERROR (0x40000000U) |
#define | LIN_CHECKSUM_ERROR (0x20000000U) |
#define | LIN_ISF_ERROR (0x10000000U) |
Lin Serial Communication Interface Error Defination | |
Note: Definitions for the intFlags parameter of LIN_enableSCIInterrupt(), LIN_disableSCIInterrupt(), LIN_clearSCIInterruptStatus(), LIN_setSCIInterruptLevel0() and LIN_setSCIInterruptLevel1(). | |
#define | LIN_SCI_ALL_ERRORS (0x7000000U) |
#define | LIN_SCI_FRAME_ERROR (0x4000000U) |
#define | LIN_SCI_PARITY_ERROR (0x2000000U) |
#define | LIN_SCI_BREAK_ERROR (0x1000000U) |
#define | LIN_SCI_INT_BREAK (0x1U) |
#define | LIN_SCI_INT_WAKEUP (0x2U) |
#define | LIN_SCI_INT_TX (0x100U) |
#define | LIN_SCI_INT_RX (0x200U) |
#define | LIN_SCI_INT_TX_DMA (0x10000U) |
#define | LIN_SCI_INT_RX_DMA (0x20000U) |
#define | LIN_SCI_INT_PARITY (0x1000000U) |
#define | LIN_SCI_INT_OVERRUN (0x2000000U) |
#define | LIN_SCI_INT_FRAME (0x4000000U) |
#define | LIN_SCI_INT_ALL (0x7000303U) |
Enumerations | |
enum | LIN_LoopbackType { LIN_LOOPBACK_DIGITAL = 0U, LIN_LOOPBACK_ANALOG = 1U } |
The following are defines for the type parameter of the LIN_enableExtLoopback() function. More... | |
enum | LIN_AnalogLoopback { LIN_ANALOG_LOOP_NONE = 0U, LIN_ANALOG_LOOP_TX = 0U, LIN_ANALOG_LOOP_RX = 1U } |
The following are defines for the path parameter of the LIN_enableExtLoopback() function. More... | |
enum | LIN_CommMode { LIN_COMM_LIN_USELENGTHVAL = 0x0000U, LIN_COMM_LIN_ID4ID5LENCTL = 0x0001U } |
The following are defines for the mode parameter of the LIN_setCommMode() function. More... | |
enum | LIN_SCICommMode { LIN_COMM_SCI_IDLELINE = 0x0000U, LIN_COMM_SCI_ADDRBIT = 0x0001U } |
The following are defines for the mode parameter of the LIN_setSCICommMode() function. More... | |
enum | LIN_LINMode { LIN_MODE_LIN_RESPONDER = 0x0U, LIN_MODE_LIN_COMMANDER = 0x1U } |
The following are defines for the mode parameter of the LIN_setLINMode() function. More... | |
enum | LIN_InterruptLine { LIN_INTERRUPT_LINE0 = 0x0U, LIN_INTERRUPT_LINE1 = 0x1U } |
The following are defines for the line parameter of the LIN_enableGlobalInterrupt(), LIN_disableGlobalInterrupt(), LIN_clearGlobalInterruptStatus(), and LIN_getGlobalInterruptStatus() functions. More... | |
enum | LIN_MessageFilter { LIN_MSG_FILTER_IDBYTE = 0x0U, LIN_MSG_FILTER_IDRESPONDER = 0x1U } |
The following are defines for the type parameter of the LIN_setMessageFiltering() function. More... | |
enum | LIN_ChecksumType { LIN_CHECKSUM_CLASSIC = 0x0U, LIN_CHECKSUM_ENHANCED = 0x1U } |
The following are defines for the type parameter of the LIN_setChecksumType() function. More... | |
enum | LIN_DebugMode { LIN_DEBUG_FROZEN = 0x0U, LIN_DEBUG_COMPLETE = 0x1U } |
The following are defines for the mode parameter of the LIN_setDebugSuspendMode() function. More... | |
enum | LIN_PinSampleMask { LIN_PINMASK_NONE = 0x0U, LIN_PINMASK_CENTER = 0x1U, LIN_PINMASK_CENTER_SCLK = 0x2U, LIN_PINMASK_CENTER_2SCLK = 0x3U } |
The following are defines for the mask parameter of the LIN_setPinSampleMask() function. More... | |
enum | LIN_SCIParityType { LIN_SCI_PAR_ODD = 0x0U, LIN_SCI_PAR_EVEN = 0x1U } |
The following are defines for the parity parameter of the LIN_enableSCIParity() function. More... | |
enum | LIN_SCIStopBits { LIN_SCI_STOP_ONE = 0x0U, LIN_SCI_STOP_TWO = 0x1U } |
The following are defines for the number parameter of the LIN_setSCIStopBits() function. More... | |
enum | LIN_PinType { LIN_PINTYPE_TX = 0x4U, LIN_PINTYPE_RX = 0x2U } |
The following are defines for the pin parameter of the LIN_getPinStatus() function. More... | |
Functions | |
void | LIN_initModule (uint32_t base) |
This function initializes the LIN module. More... | |
void | LIN_getData (uint32_t base, uint16_t *const data) |
This function reads the received data. More... | |
void | LIN_sendData (uint32_t base, uint16_t *data) |
This function sends the data. More... | |
static Bool | LIN_isBaseValid (uint32_t base) |
Checks a LIN base address. More... | |
static void | LIN_setLINMode (uint32_t base, LIN_LINMode mode) |
Sets the LIN mode. More... | |
static void | LIN_setMaximumBaudRate (uint32_t base, uint32_t clock) |
Set Maximum Baud Rate Prescaler. More... | |
static void | LIN_setMessageFiltering (uint32_t base, LIN_MessageFilter type) |
Set Message filtering Type. More... | |
static void | LIN_enableParity (uint32_t base) |
Enable Parity mode. More... | |
static void | LIN_disableParity (uint32_t base) |
Disable Parity mode. More... | |
static uint16_t | LIN_generateParityID (uint16_t identifier) |
Generate Parity Identifier. More... | |
static void | LIN_setIDByte (uint32_t base, uint16_t identifier) |
Set ID Byte. More... | |
static void | LIN_setIDResponderTask (uint32_t base, uint16_t identifier) |
Set ID-ResponderTask. More... | |
static void | LIN_sendWakeupSignal (uint32_t base) |
Send LIN wakeup signal. More... | |
static void | LIN_enterSleep (uint32_t base) |
Entering LIN sleep signal. More... | |
static void | LIN_sendChecksum (uint32_t base) |
Send Checksum Byte. More... | |
static void | LIN_triggerChecksumCompare (uint32_t base) |
Trigger Checksum Compare. More... | |
static Bool | LIN_isTxReady (uint32_t base) |
Check Tx buffer ready flag. More... | |
static void | LIN_setFrameLength (uint32_t base, uint16_t length) |
Set LIN Frame Length. More... | |
static void | LIN_setCommMode (uint32_t base, LIN_CommMode mode) |
Set LIN communication mode. More... | |
static void | LIN_setTxMask (uint32_t base, uint16_t mask) |
Sets the transmit ID mask. More... | |
static void | LIN_setRxMask (uint32_t base, uint16_t mask) |
Sets the receive ID mask. More... | |
static uint16_t | LIN_getTxMask (uint32_t base) |
Gets the transmit ID mask. More... | |
static uint16_t | LIN_getRxMask (uint32_t base) |
Gets the receive ID mask. More... | |
static Bool | LIN_isRxReady (uint32_t base) |
Gets the receive ID mask. More... | |
static uint16_t | LIN_getRxIdentifier (uint32_t base) |
Get last received identifier. More... | |
static Bool | LIN_isTxMatch (uint32_t base) |
Checks for Tx ID Match Received. More... | |
static Bool | LIN_isRxMatch (uint32_t base) |
Checks for Rx ID Match Received. More... | |
static void | LIN_enableInterrupt (uint32_t base, uint32_t intFlags) |
Enable interrupts. More... | |
static void | LIN_disableInterrupt (uint32_t base, uint32_t intFlags) |
Disable interrupts. More... | |
static void | LIN_clearInterruptStatus (uint32_t base, uint32_t intFlags) |
Clear interrupt status. More... | |
static void | LIN_setInterruptLevel0 (uint32_t base, uint32_t intFlags) |
Set interrupt level to 0. More... | |
static void | LIN_setInterruptLevel1 (uint32_t base, uint32_t intFlags) |
Set interrupt level to 1. More... | |
static void | LIN_enableModuleErrors (uint32_t base, uint32_t errors) |
Enable Module Errors for Testing. More... | |
static void | LIN_disableModuleErrors (uint32_t base, uint32_t errors) |
Disable Module Errors for Testing. More... | |
static void | LIN_enableAutomaticBaudrate (uint32_t base) |
Enable Automatic Baudrate Adjustment. More... | |
static void | LIN_disableAutomaticBaudrate (uint32_t base) |
Disable Automatic Baudrate Adjustment. More... | |
static void | LIN_stopExtendedFrame (uint32_t base) |
Stops LIN Extended Frame Communication. More... | |
static void | LIN_setChecksumType (uint32_t base, LIN_ChecksumType type) |
Set Checksum Type. More... | |
static void | LIN_setSyncFields (uint32_t base, uint16_t syncBreak, uint16_t delimiter) |
Set Sync Break Extend and Delimiter. More... | |
static void | LIN_enableSCIMode (uint32_t base) |
Enable SCI Mode. More... | |
static void | LIN_disableSCIMode (uint32_t base) |
Disable SCI Mode. More... | |
static void | LIN_setSCICommMode (uint32_t base, LIN_SCICommMode mode) |
Set SCI communication mode. More... | |
static void | LIN_enableSCIParity (uint32_t base, LIN_SCIParityType parity) |
Enable SCI Parity mode. More... | |
static void | LIN_disableSCIParity (uint32_t base) |
Disable SCI Parity mode. More... | |
static void | LIN_setSCIStopBits (uint32_t base, LIN_SCIStopBits number) |
Set the number of stop bits for SCI. More... | |
static void | LIN_enableSCISleepMode (uint32_t base) |
Enable SCI Sleep mode. More... | |
static void | LIN_disableSCISleepMode (uint32_t base) |
Disable SCI Sleep mode. More... | |
static void | LIN_enterSCILowPower (uint32_t base) |
Enter SCI Local Low-Power Mode. More... | |
static void | LIN_exitSCILowPower (uint32_t base) |
Exit SCI Local Low-Power Mode. More... | |
static void | LIN_setSCICharLength (uint32_t base, uint16_t numBits) |
Set SCI character length. More... | |
static void | LIN_setSCIFrameLength (uint32_t base, uint16_t length) |
Set SCI Frame Length. More... | |
static Bool | LIN_isSCIDataAvailable (uint32_t base) |
Check if new SCI data is ready to be read. More... | |
static Bool | LIN_isSCISpaceAvailable (uint32_t base) |
Check if Space is available in SCI Transmit Buffer. More... | |
static uint16_t | LIN_readSCICharNonBlocking (uint32_t base, Bool emulation) |
Reads a SCI character without Blocking. More... | |
static uint16_t | LIN_readSCICharBlocking (uint32_t base, Bool emulation) |
Reads a SCI character with Blocking. More... | |
static void | LIN_writeSCICharNonBlocking (uint32_t base, uint16_t data) |
Sends a SCI character without Blocking. More... | |
static void | LIN_writeSCICharBlocking (uint32_t base, uint16_t data) |
Sends a SCI character with blocking. More... | |
static void | LIN_enableSCIModuleErrors (uint32_t base, uint32_t errors) |
Enable SCI Module Errors for Testing. More... | |
static void | LIN_disableSCIModuleErrors (uint32_t base, uint32_t errors) |
Disable SCI Module Errors for Testing. More... | |
static void | LIN_enableSCIInterrupt (uint32_t base, uint32_t intFlags) |
Enable SCI interrupts. More... | |
static void | LIN_disableSCIInterrupt (uint32_t base, uint32_t intFlags) |
Disable SCI interrupts. More... | |
static void | LIN_clearSCIInterruptStatus (uint32_t base, uint32_t intFlags) |
Clear SCI interrupt status. More... | |
static void | LIN_setSCIInterruptLevel0 (uint32_t base, uint32_t intFlags) |
Set interrupt level to 0. More... | |
static void | LIN_setSCIInterruptLevel1 (uint32_t base, uint32_t intFlags) |
Set interrupt level to 1. More... | |
static Bool | LIN_isSCIReceiverIdle (uint32_t base) |
Check if SCI Receiver is Idle. More... | |
static Bool | LIN_getSCITxFrameType (uint32_t base) |
Gets the SCI Transmit Frame Type. More... | |
static Bool | LIN_getSCIRxFrameType (uint32_t base) |
Gets the SCI Receiver Frame Type. More... | |
static Bool | LIN_isSCIBreakDetected (uint32_t base) |
Check if SCI Detected a Break Condition. More... | |
static void | LIN_enableModule (uint32_t base) |
Enables the LIN module. More... | |
static void | LIN_disableModule (uint32_t base) |
Disable the LIN module. More... | |
static void | LIN_setBaudRatePrescaler (uint32_t base, uint32_t prescaler, uint32_t divider) |
Set Baud Rate Prescaler. More... | |
static void | LIN_enableDataTransmitter (uint32_t base) |
Enable Transmit Data Transfer. More... | |
static void | LIN_disableDataTransmitter (uint32_t base) |
Disable Transmit Data Transfer. More... | |
static void | LIN_enableDataReceiver (uint32_t base) |
Enable Receive Data Transfer. More... | |
static void | LIN_disableDataReceiver (uint32_t base) |
Disable Receive Data Transfer. More... | |
static void | LIN_performSoftwareReset (uint32_t base) |
Perform software reset. More... | |
static void | LIN_enterSoftwareReset (uint32_t base) |
Put LIN into its reset state. More... | |
static void | LIN_exitSoftwareReset (uint32_t base) |
Put LIN into its ready state. More... | |
static Bool | LIN_isBusBusy (uint32_t base) |
Check if Bus is Busy. More... | |
static Bool | LIN_isTxBufferEmpty (uint32_t base) |
Check if the Transmit Buffer is Empty. More... | |
static void | LIN_enableExtLoopback (uint32_t base, LIN_LoopbackType loopbackType, LIN_AnalogLoopback path) |
Enable External Loopback mode for self test. More... | |
static void | LIN_disableExtLoopback (uint32_t base) |
Disable External Loopback mode for self test. More... | |
static void | LIN_enableIntLoopback (uint32_t base) |
Enable Internal Loopback mode for self test. More... | |
static void | LIN_disableIntLoopback (uint32_t base) |
Disable Internal Loopback mode for self test. More... | |
static uint32_t | LIN_getInterruptStatus (uint32_t base) |
Get Interrupt Flags Status. More... | |
static uint32_t | LIN_getInterruptLevel (uint32_t base) |
Get the Interrupt Level. More... | |
static uint16_t | LIN_getInterruptLine0Offset (uint32_t base) |
Gets the Interrupt Vector Offset for Line 0. More... | |
static uint16_t | LIN_getInterruptLine1Offset (uint32_t base) |
Gets the Interrupt Vector Offset for Line 1. More... | |
static void | LIN_enableMultibufferMode (uint32_t base) |
Enable Multi-buffer Mode. More... | |
static void | LIN_disableMultibufferMode (uint32_t base) |
Disable Multi-buffer Mode. More... | |
static void | LIN_setTransmitDelay (uint32_t base, uint16_t delay) |
Set Transmit Pin Delay. More... | |
static void | LIN_setPinSampleMask (uint32_t base, LIN_PinSampleMask mask) |
Set Pin Sample Mask. More... | |
static void | LIN_setDebugSuspendMode (uint32_t base, LIN_DebugMode mode) |
Set the Debug Suspended Mode. More... | |
static void | LIN_enableGlobalInterrupt (uint32_t base, LIN_InterruptLine line) |
Enables a LIN global interrupt. More... | |
static void | LIN_disableGlobalInterrupt (uint32_t base, LIN_InterruptLine line) |
Disables a LIN global interrupt. More... | |
static void | LIN_clearGlobalInterruptStatus (uint32_t base, LIN_InterruptLine line) |
Clears a LIN global interrupt flag. More... | |
static Bool | LIN_getGlobalInterruptStatus (uint32_t base, LIN_InterruptLine line) |
Returns a LIN global interrupt flag status. More... | |
static Bool | LIN_getPinStatus (uint32_t base, LIN_PinType pin) |
Get the Status of LIN TX/RX Pin status. More... | |