Microchip® Advanced Software Framework

st_lin_message Struct Reference

This structure allows to handle a LIN message and, at the end of the received/transmitted message, allows to call a function associated to this message, the update or the capture of "signals".

#include <lin.h>

Data Fields

enum_lin_cmd l_cmd
 Select an action for a specific message. More...
 
U8 l_dlc
 Length of the LIN message, it is the number of data bytes of the LIN response. More...
 
U8 l_id
 LIN message ID (in case of LIN 1.3 - without lenght) More...
 
U8l_pt_data
 Pointer on the data buffer, the data buffer where the bytes of the LIN response are stored. More...
 
void(* l_pt_function )(U8 *)
 Pointer on the function which handles the data. More...
 
U8 l_status
 Status of the last communication: More...
 

enum_lin_cmd st_lin_message::l_cmd

Select an action for a specific message.

U8 st_lin_message::l_dlc

Length of the LIN message, it is the number of data bytes of the LIN response.

U8 st_lin_message::l_id

LIN message ID (in case of LIN 1.3 - without lenght)

Referenced by lin_tx_header_and_response().

U8* st_lin_message::l_pt_data

Pointer on the data buffer, the data buffer where the bytes of the LIN response are stored.

void(* st_lin_message::l_pt_function)(U8 *)

Pointer on the function which handles the data.

This has as parameter 'l_pt_data'. This function could update the received 'signals' and could capture and store signals for the next transmission.

Referenced by lin_pdca_int_rx_handler_node0(), and lin_pdca_int_tx_handler_node0().

U8 st_lin_message::l_status

Status of the last communication:

  • == 0x00: RXOK or TXOK
  • != 0x00: LINERR, content of LIN Error Register 'LINERR'

Referenced by lin_int_handler_node0().