LIN Function Documentation

 

Sys_LIN_GPIOConfig

void Sys_LIN_GPIOConfig(const LIN_Type * lin, uint32_t config, uint32_t tx, uint32_t rx)

 

Configure two GPIOs for the specified LIN interface.

 

Location: lin.h:50

 

Parameters

Direction Name Description

in

lin

Pointer to the LIN instance

in

config

GPIO pin configuration for the LIN pads

in

tx

GPIO to use as the LIN transmit pad; use an integer

in

rx

GPIO to use as the LIN receive pad; use an integer

 

 

Example Code for Sys_LIN_GPIOConfig

    // Configure GPIO2 and GPIO3 for the LIN interface

    Sys_LIN_GPIOConfig(LIN, GPIO_6X_DRIVE | GPIO_LPF_DISABLE | GPIO_STRONG_PULL_UP,

                       2, 3)

 

Sys_LIN_Enable

void Sys_LIN_Enable(LIN_Type * lin)

 

Enable/Wake the connected transceiver, enable LIN.

 

Location: lin.h:77

 

Parameters

Direction Name Description

in

lin

Pointer to the LIN instance

 

Assumptions

None

 

Example Code for Sys_LIN_Enable

    // Disable the LIN interface

    Sys_LIN_Enable(LIN)

 

Sys_LIN_Disable

void Sys_LIN_Disable(LIN_Type * lin)

 

Disable the connected transceiver, disable LIN.

 

Location: lin.h:91

 

Parameters

Direction Name Description

in

lin

Pointer to the LIN instance

 

 

Example Code for Sys_LIN_Disable

    // Disable the LIN interface

    Sys_LIN_Disable(LIN)

 

Sys_LIN_ClearErrors

void Sys_LIN_ClearErrors(LIN_Type * lin)

 

Clear all error flags.

 

Location: lin.h:104

 

Parameters

Direction Name Description

in

lin

Pointer to the LIN instance

 

 

Example Code for Sys_LIN_ClearErrors

    // Clear any errors generated by the LIN interface

    Sys_LIN_ClearErrors(LIN)