LIN Middleware
Initialization

General Description

Functions

mtb_lin_status_t l_sys_init (const mtb_stc_lin_config_t *config, mtb_stc_lin_context_t *context, cy_israddress comm_isr, l_u32 comm_isr_priority, cy_israddress inactivity_isr)
 Initializes the LIN core. More...
 

Function Documentation

◆ l_sys_init()

mtb_lin_status_t l_sys_init ( const mtb_stc_lin_config_t config,
mtb_stc_lin_context_t context,
cy_israddress  comm_isr,
l_u32  comm_isr_priority,
cy_israddress  inactivity_isr 
)

Initializes the LIN core.

Initializes context with the:

  • the pointer to the configuration structure
  • the pointer to the communication and inactivity interrupt service routine (ISR)
  • the priority of the communication interrupt
  • the calculated peripheral clock divider
Parameters
configThe pointer to the LIN Slave configuration structure. See mtb_stc_lin_config_t.
contextThe pointer to the context structure mtb_stc_lin_context_t allocated by the user. This structure is used during LIN Slave operation for internal configuration and data retention. The user must not modify anything in this structure.
comm_isrThe pointer to the communication ISR.
comm_isr_priorityThe interrupt priority number for the communication interrupt handler.
inactivity_isrThe pointer to the inactivity ISR.
Returns
See mtb_lin_status_t.

The sanity check of LIN configuration