Infineon MOTIX™ MCU TLE987x Device Family SDK
Macros | Functions
lin.h File Reference

Go to the source code of this file.

Detailed Description

LIN low level access library.

Version
V0.2.1
Date
02. Jan 2025

Include Graph

Include dependency graph for lin.h:

Macros

#define LIN_MODE_SLEEP   (0u)
 LIN MODE, SLEEP MODE. More...
 
#define LIN_MODE_RCV_ONLY   (1u)
 LIN MODE, RCV ONLY MODE. More...
 
#define LIN_MODE_NORMAL   (3u)
 LIN MODE, NORMAL MODE. More...
 
#define LIN_GET_MODE_SLEEP   (1u)
 LIN MODE READ, SLEEP MODE. More...
 
#define LIN_GET_MODE_RCV_ONLY   (5u)
 LIN MODE READ, RCV ONLY MODE. More...
 
#define LIN_GET_MODE_NORMAL   (7u)
 LIN MODE READ, NORMAL MODE. More...
 
#define LIN_SLOPE_NORMAL   (0u)
 LIN SLOPE MODE, NORMAL SLOPE. More...
 
#define LIN_SLOPE_FAST   (1u)
 LIN SLOPE MODE, FAST SLOPE. More...
 
#define LIN_SLOPE_LOW   (2u)
 LIN SLOPE MODE, LOW SLOPE. More...
 
#define LIN_SLOPE_FLASH   (3u)
 LIN SLOPE MODE, FLASH SLOPE. More...
 

Functions

INLINE uint8 LIN_End_Of_Sync_Sts (void)
 reads End of SYN Byte Interrupt Status. More...
 
INLINE uint8 LIN_Err_In_Sync_Sts (void)
 reads SYN Byte Error Interrupt Status. More...
 
INLINE uint8 LIN_Break_Sts (void)
 reads Break Field Status. More...
 
INLINE void LIN_Break_Detect_En (void)
 enables Baud Rate Detection. More...
 
INLINE void LIN_Break_Detect_Dis (void)
 disables Baud Rate Detection. More...
 
INLINE void LIN_BaudRate_Range_Sel (uint8 a)
 selects Baud Rate Detection. More...
 
INLINE void LIN_Over_Curr_Int_Clr (void)
 clears LIN Receiver Overcurrent interrupt flag. More...
 
INLINE void LIN_Over_Temp_Int_Clr (void)
 clears LIN Receiver Overtemperature interrupt flag. More...
 
INLINE void LIN_Time_Out_Int_Clr (void)
 clears LIN TXD time-out interrupt flag. More...
 
INLINE void LIN_End_Of_Sync_Int_Clr (void)
 clears End of SYN Byte interrupt flag. More...
 
INLINE void LIN_Err_In_Sync_Int_Clr (void)
 clears SYN Byte Error interrupt flag. More...
 
INLINE void LIN_Break_Int_Clr (void)
 clears Break Field flag. More...
 
INLINE void LIN_Over_Curr_Int_En (void)
 enables LIN Transceiver Overcurrent interrupt. More...
 
INLINE void LIN_Over_Curr_Int_Dis (void)
 disables LIN Transceiver Overcurrent interrupt. More...
 
INLINE void LIN_Over_Temp_Int_En (void)
 enables LIN Transceiver Overtemperature interrupt. More...
 
INLINE void LIN_Over_Temp_Int_Dis (void)
 disables LIN Transceiver Overtemperature interrupt. More...
 
INLINE void LIN_Time_Out_Int_En (void)
 enables LIN Transceiver TxD-Timeout interrupt. More...
 
INLINE void LIN_Time_Out_Int_Dis (void)
 disables LIN Transceiver TxD-Timeout interrupt. More...
 
INLINE void LIN_Sync_Int_En (void)
 enables End of SYN Byte and SYN Byte Error interrupt. More...
 
INLINE void LIN_Sync_Int_Dis (void)
 disables End of SYN Byte and SYN Byte Error interrupt. More...
 
void LIN_Init (void)
 Initializes the LIN based on the Config Wizard for MOTIX MCU configuration. More...
 
INLINE void LIN_Set_Mode (uint8 Mode)
 Sets LIN Trx. Mode. More...
 
INLINE uint32 LIN_Get_Mode (void)
 Gets LIN Trx. Mode. More...
 
INLINE void LIN_Set_Slope (uint8 SlopeMode)
 Sets LIN Trx. Slope Mode. More...
 

Macro Definition Documentation

◆ LIN_GET_MODE_NORMAL

#define LIN_GET_MODE_NORMAL   (7u)

LIN MODE READ, NORMAL MODE.

◆ LIN_GET_MODE_RCV_ONLY

#define LIN_GET_MODE_RCV_ONLY   (5u)

LIN MODE READ, RCV ONLY MODE.

◆ LIN_GET_MODE_SLEEP

#define LIN_GET_MODE_SLEEP   (1u)

LIN MODE READ, SLEEP MODE.

◆ LIN_MODE_NORMAL

#define LIN_MODE_NORMAL   (3u)

LIN MODE, NORMAL MODE.

◆ LIN_MODE_RCV_ONLY

#define LIN_MODE_RCV_ONLY   (1u)

LIN MODE, RCV ONLY MODE.

◆ LIN_MODE_SLEEP

#define LIN_MODE_SLEEP   (0u)

LIN MODE, SLEEP MODE.

◆ LIN_SLOPE_FAST

#define LIN_SLOPE_FAST   (1u)

LIN SLOPE MODE, FAST SLOPE.

◆ LIN_SLOPE_FLASH

#define LIN_SLOPE_FLASH   (3u)

LIN SLOPE MODE, FLASH SLOPE.

◆ LIN_SLOPE_LOW

#define LIN_SLOPE_LOW   (2u)

LIN SLOPE MODE, LOW SLOPE.

◆ LIN_SLOPE_NORMAL

#define LIN_SLOPE_NORMAL   (0u)

LIN SLOPE MODE, NORMAL SLOPE.

Function Documentation

◆ LIN_BaudRate_Range_Sel()

INLINE void LIN_BaudRate_Range_Sel ( uint8  a)

selects Baud Rate Detection.

Parameters
aBGSEL Value (2 bits)

Example

This example selects the first range of the Baud Rate Detection.

void Example_Function(void)
{
}
INLINE void LIN_BaudRate_Range_Sel(uint8 a)
selects Baud Rate Detection.
Definition: lin.h:216

◆ LIN_Break_Detect_Dis()

INLINE void LIN_Break_Detect_Dis ( void  )

disables Baud Rate Detection.

Example

This example disables Baud Rate Detection.

void Example_Function(void)
{
}
INLINE void LIN_Break_Detect_Dis(void)
disables Baud Rate Detection.
Definition: lin.h:197

◆ LIN_Break_Detect_En()

INLINE void LIN_Break_Detect_En ( void  )

enables Baud Rate Detection.

Example

This example enables Baud Rate Detection.

void Example_Function(void)
{
}
INLINE void LIN_Break_Detect_En(void)
enables Baud Rate Detection.
Definition: lin.h:180

◆ LIN_Break_Int_Clr()

INLINE void LIN_Break_Int_Clr ( void  )

clears Break Field flag.

Example

This example clears Break Field flag.

void Example_Function(void)
{
}
INLINE void LIN_Break_Int_Clr(void)
clears Break Field flag.
Definition: lin.h:343

◆ LIN_Break_Sts()

INLINE uint8 LIN_Break_Sts ( void  )

reads Break Field Status.

Returns
Break Field Status

Example

This example reads Break Field Status.

void Example_Function(void)
{
uint8 status;
status = LIN_Break_Sts();
}
INLINE uint8 LIN_Break_Sts(void)
reads Break Field Status.
Definition: lin.h:163
uint8_t uint8
8 bit unsigned value
Definition: types.h:137

◆ LIN_End_Of_Sync_Int_Clr()

INLINE void LIN_End_Of_Sync_Int_Clr ( void  )

clears End of SYN Byte interrupt flag.

Example

This example treats the LIN End of SYN Byte interrupt.

void Example_Function(void)
{
{
LIN_EOF_CALLBACK();
}
}
INLINE void LIN_End_Of_Sync_Int_Clr(void)
clears End of SYN Byte interrupt flag.
Definition: lin.h:304
INLINE uint8 LIN_End_Of_Sync_Sts(void)
reads End of SYN Byte Interrupt Status.
Definition: lin.h:118
INLINE void LIN_Sync_Int_En(void)
enables End of SYN Byte and SYN Byte Error interrupt.
Definition: lin.h:500

◆ LIN_End_Of_Sync_Sts()

INLINE uint8 LIN_End_Of_Sync_Sts ( void  )

reads End of SYN Byte Interrupt Status.

Returns
End of SYN Byte Interrupt Status

Example

This example treats the LIN End of SYN Byte interrupt.

void Example_Function(void)
{
{
LIN_EOF_CALLBACK();
}
}

◆ LIN_Err_In_Sync_Int_Clr()

INLINE void LIN_Err_In_Sync_Int_Clr ( void  )

clears SYN Byte Error interrupt flag.

Example

This example threats the SYN Byte Error interrupt.

void Example_Function(void)
{
{
LIN_ERR_CALLBACK();
}
}
INLINE void LIN_Err_In_Sync_Int_Clr(void)
clears SYN Byte Error interrupt flag.
Definition: lin.h:326
INLINE uint8 LIN_Err_In_Sync_Sts(void)
reads SYN Byte Error Interrupt Status.
Definition: lin.h:142

◆ LIN_Err_In_Sync_Sts()

INLINE uint8 LIN_Err_In_Sync_Sts ( void  )

reads SYN Byte Error Interrupt Status.

Returns
SYN Byte Error Interrupt Status

Example

This example threats the SYN Byte Error interrupt.

void Example_Function(void)
{
{
LIN_ERR_CALLBACK();
}
}

◆ LIN_Get_Mode()

INLINE uint32 LIN_Get_Mode ( void  )

Gets LIN Trx. Mode.

Returns
Lin Trx Mode

Example

This example reads LIN Transmitter Mode.

void Example_Function(void)
{
uint32 mode;
mode = LIN_Get_Mode();
}
INLINE uint32 LIN_Get_Mode(void)
Gets LIN Trx. Mode.
Definition: lin.h:583
uint32_t uint32
32 bit unsigned value
Definition: types.h:139

◆ LIN_Init()

void LIN_Init ( void  )

Initializes the LIN based on the Config Wizard for MOTIX MCU configuration.

◆ LIN_Over_Curr_Int_Clr()

INLINE void LIN_Over_Curr_Int_Clr ( void  )

clears LIN Receiver Overcurrent interrupt flag.

Example

This example treats the LIN Receiver Overcurrent interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.OC_STS == (uint8)1)
{
LIN_OC_CALLBACK();
}
}
#define LIN
Definition: tle987x.h:6066
INLINE void LIN_Over_Curr_Int_En(void)
enables LIN Transceiver Overcurrent interrupt.
Definition: lin.h:365
INLINE void LIN_Over_Curr_Int_Clr(void)
clears LIN Receiver Overcurrent interrupt flag.
Definition: lin.h:238

◆ LIN_Over_Curr_Int_Dis()

INLINE void LIN_Over_Curr_Int_Dis ( void  )

disables LIN Transceiver Overcurrent interrupt.

Example

This example treats the LIN Receiver Overcurrent interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.OC_STS == (uint8)1)
{
LIN_OC_CALLBACK();
}
}
INLINE void LIN_Over_Curr_Int_Dis(void)
disables LIN Transceiver Overcurrent interrupt.
Definition: lin.h:388

◆ LIN_Over_Curr_Int_En()

INLINE void LIN_Over_Curr_Int_En ( void  )

enables LIN Transceiver Overcurrent interrupt.

Example

This example treats the LIN Receiver Overcurrent interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.OC_STS == (uint8)1)
{
LIN_OC_CALLBACK();
}
}

◆ LIN_Over_Temp_Int_Clr()

INLINE void LIN_Over_Temp_Int_Clr ( void  )

clears LIN Receiver Overtemperature interrupt flag.

Example

This example treats the LIN Receiver Overtemperature interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.OT_STS == (uint8)1)
{
LIN_OT_CALLBACK();
}
}
INLINE void LIN_Over_Temp_Int_En(void)
enables LIN Transceiver Overtemperature interrupt.
Definition: lin.h:410
INLINE void LIN_Over_Temp_Int_Clr(void)
clears LIN Receiver Overtemperature interrupt flag.
Definition: lin.h:260

◆ LIN_Over_Temp_Int_Dis()

INLINE void LIN_Over_Temp_Int_Dis ( void  )

disables LIN Transceiver Overtemperature interrupt.

Example

This example treats the LIN Receiver Overtemperature interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.OT_STS == (uint8)1)
{
LIN_OT_CALLBACK();
}
}
INLINE void LIN_Over_Temp_Int_Dis(void)
disables LIN Transceiver Overtemperature interrupt.
Definition: lin.h:433

◆ LIN_Over_Temp_Int_En()

INLINE void LIN_Over_Temp_Int_En ( void  )

enables LIN Transceiver Overtemperature interrupt.

Example

This example treats the LIN Receiver Overtemperature interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.OT_STS == (uint8)1)
{
LIN_OT_CALLBACK();
}
}

◆ LIN_Set_Mode()

INLINE void LIN_Set_Mode ( uint8  Mode)

Sets LIN Trx. Mode.

Parameters
ModeLIN Mode Selection

Example

This example sets LIN Transmitter Sleep Mode as Transceiver power mode.

void Example_Function(void)
{
LIN_Set_Mode(0x00);
}
INLINE void LIN_Set_Mode(uint8 Mode)
Sets LIN Trx. Mode.
Definition: lin.h:561

◆ LIN_Set_Slope()

INLINE void LIN_Set_Slope ( uint8  SlopeMode)

Sets LIN Trx. Slope Mode.

Parameters
SlopeModeLIN Trx Slope Mode Selection

Example

This example sets LIN Normal Mode as Transmitter Slope mode.

void Example_Function(void)
{
}
INLINE void LIN_Set_Slope(uint8 SlopeMode)
Sets LIN Trx. Slope Mode.
Definition: lin.h:602

◆ LIN_Sync_Int_Dis()

INLINE void LIN_Sync_Int_Dis ( void  )

disables End of SYN Byte and SYN Byte Error interrupt.

Example

This example treats the LIN End of SYN Byte interrupt.

void Example_Function(void)
{
{
LIN_EOF_CALLBACK();
}
}
INLINE void LIN_Sync_Int_Dis(void)
disables End of SYN Byte and SYN Byte Error interrupt.
Definition: lin.h:523

◆ LIN_Sync_Int_En()

INLINE void LIN_Sync_Int_En ( void  )

enables End of SYN Byte and SYN Byte Error interrupt.

Example

This example treats the LIN End of SYN Byte interrupt.

void Example_Function(void)
{
{
LIN_EOF_CALLBACK();
}
}

◆ LIN_Time_Out_Int_Clr()

INLINE void LIN_Time_Out_Int_Clr ( void  )

clears LIN TXD time-out interrupt flag.

Example

This example treats the LIN TXD time-out interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.TXD_TMOUT_STS == (uint8)1)
{
LIN_TMOUT_CALLBACK();
}
}
INLINE void LIN_Time_Out_Int_En(void)
enables LIN Transceiver TxD-Timeout interrupt.
Definition: lin.h:455
INLINE void LIN_Time_Out_Int_Clr(void)
clears LIN TXD time-out interrupt flag.
Definition: lin.h:282

◆ LIN_Time_Out_Int_Dis()

INLINE void LIN_Time_Out_Int_Dis ( void  )

disables LIN Transceiver TxD-Timeout interrupt.

Example

This example treats the LIN TXD time-out interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.TXD_TMOUT_STS == (uint8)1)
{
LIN_TMOUT_CALLBACK();
}
}
INLINE void LIN_Time_Out_Int_Dis(void)
disables LIN Transceiver TxD-Timeout interrupt.
Definition: lin.h:478

◆ LIN_Time_Out_Int_En()

INLINE void LIN_Time_Out_Int_En ( void  )

enables LIN Transceiver TxD-Timeout interrupt.

Example

This example treats the LIN TXD time-out interrupt.

void Example_Function(void)
{
if ((uint8)LIN->CTRL_STS.bit.TXD_TMOUT_STS == (uint8)1)
{
LIN_TMOUT_CALLBACK();
}
}