S32 SDK
lin.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
3  * Copyright 2016-2017 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
38 #ifndef LIN_H
39 #define LIN_H
40 
45 #include "lin_types.h"
46 #include "lin_cfg.h"
47 #include "lin_driver.h"
48 
49 
50 /*******************************************************************************
51  * Definitions
52  ******************************************************************************/
53 /* This macro is used only when transport layer is not used;
54 remove '#if' directive if needed it also when transport layer is enabled */
55 #if ((SUPPORT_TRANSPORT_LAYER != 1U) || (SUPPORT_DIAG_SERVICE != 1U))
56 #define UNUSED(x) (void)(x)
57 #endif /* end (SUPPORT_TRANSPORT_LAYER != 1U) */
58 
59 /* Define diagnostic services id */
60 #define SERVICE_ASSIGN_NAD 0xB0U
61 #define SERVICE_ASSIGN_FRAME_ID 0xB1U
62 #define SERVICE_READ_BY_IDENTIFY 0xB2U
63 #define SERVICE_CONDITIONAL_CHANGE_NAD 0xB3U
64 #define SERVICE_SAVE_CONFIGURATION 0xB6U
65 #define SERVICE_ASSIGN_FRAME_ID_RANGE 0xB7U
67 #define SERVICE_READ_DATA_BY_IDENTIFY 0x22U
68 #define SERVICE_WRITE_DATA_BY_IDENTIFY 0x2EU
69 #define SERVICE_SESSION_CONTROL 0x10U
70 #define SERVICE_IO_CONTROL_BY_IDENTIFY 0x2FU
71 #define SERVICE_FAULT_MEMORY_READ 0x19U
72 #define SERIVCE_FAULT_MEMORY_CLEAR 0x14U
74 /* Define PCI request services */
75 #define PCI_SAVE_CONFIGURATION 0x01U
77 /* Define PCI response's services */
78 #define PCI_RES_READ_BY_IDENTIFY 0x06U
79 #define PCI_RES_SAVE_CONFIGURATION 0x01U
80 #define PCI_RES_ASSIGN_FRAME_ID_RANGE 0x01U
82 /* Identifier user defined */
83 #define LIN_READ_USR_DEF_MIN 32U
84 #define LIN_READ_USR_DEF_MAX 63U
86 /* Identification */
87 #define LD_ID_NO_RESPONSE 0x52U
88 #define LD_NEGATIVE_RESPONSE 0x53U
89 #define LD_POSITIVE_RESPONSE 0x54U
91 /* Low level API return values */
92 #define LIN_LLD_OK 0x00U
93 #define LIN_LLD_ERROR 0xFFU
99 typedef l_u8 lin_tl_pdu_data_t[8];
100 
101 /*******************************************************************************
102  * LOW LEVEL DRIVER
103  ******************************************************************************/
104 
109 typedef enum
110 {
111  LIN_LLD_PID_OK = 0x00U,
114  LIN_LLD_PID_ERR = 0x03U,
121 
122 /*******************************************************************************
123  * Protocol
124  ******************************************************************************/
129 typedef enum
130 {
131  LIN_PROTOCOL_21 = 0x00U,
134 
139 typedef enum
140 {
145 
150 typedef struct
151 {
152  unsigned int error_in_res : 1;
153  unsigned int successful_transfer : 1;
154  unsigned int overrun : 1;
155  unsigned int go_to_sleep_flg : 1;
156  unsigned int bus_activity : 1;
157  unsigned int event_trigger_collision_flg : 1;
158  unsigned int save_config_flg : 1;
159  unsigned int reserved : 1;
160  unsigned int last_pid : 8;
162 
163 /*******************************************************************************
164  * Interfaces
165  ******************************************************************************/
167 #define LIN_SLAVE 0
168 #define LIN_MASTER 1
170 /*******************************************************************************
171  * General
172  ******************************************************************************/
173 
177 typedef struct
178 {
184 
189 typedef struct
190 {
197  l_signal_handle response_error;
201  const l_signal_handle *fault_state_signal_ptr;
210 
211 /*******************************************************************************
212  * Frame
213  ******************************************************************************/
218 typedef enum
219 {
220  LIN_FRM_UNCD = 0x00U,
221  LIN_FRM_EVNT = 0x01U,
222  LIN_FRM_SPRDC = 0x10U,
223  LIN_FRM_DIAG = 0x11U
225 
230 typedef enum
231 {
232  LIN_RES_PUB = 0x00U,
233  LIN_RES_SUB = 0x01U
235 
240 typedef struct
241 {
243  const l_frame_handle * associated_uncond_frame_ptr;
246 
251 typedef struct
252 {
260 } lin_frame_t;
261 
262 /*******************************************************************************
263  * Schedule table
264  ******************************************************************************/
269 typedef l_u8 lin_tl_queue_t[8];
270 
275 typedef enum
276 {
283 
288 typedef struct
289 {
290  l_frame_handle frm_id;
294 
299 typedef struct
300 {
305 
306 /*******************************************************************************
307  * Transport Layer / Diagnostic
308  ******************************************************************************/
313 typedef enum
314 {
315  DIAG_NONE = 0x00U,
317  DIAG_ONLY_MODE = 0x02U
319 
324 typedef enum
325 {
326  LD_SERVICE_BUSY = 0x00U,
328  LD_SERVICE_IDLE = 0x02U,
331 
336 typedef enum
337 {
338  LD_SUCCESS = 0x00U,
339  LD_NEGATIVE = 0x01U,
340  LD_NO_RESPONSE = 0x02U,
341  LD_OVERWRITTEN = 0x03U
343 
348 typedef enum
349 {
352  TL_TX_COMPLETED = 0x02U,
353  TL_RX_COMPLETED = 0x03U,
354  TL_ERROR = 0x04U,
359 
364 typedef enum
365 {
366  TL_ACTION_NONE = 0x00U,
369 
370 extern lin_tl_callback_return_t lin_tl_callback_handler(l_ifc_handle iii,
371  lin_tl_event_id_t tl_event_id,
372  l_u8 id);
373 
374 #define LIN_TL_CALLBACK_HANDLER(iii, tl_event_id, id) lin_tl_callback_handler((iii), (tl_event_id), (id))
375 /* ---------------------- Transport layer multi frames ---------------------- */
380 typedef enum
381 {
382  LD_NO_DATA = 0x00U,
385  LD_QUEUE_FULL = 0x03U,
387  LD_QUEUE_EMPTY = 0x05U,
391 
396 typedef enum
397 {
398  LD_NO_MSG = 0x00U,
399  LD_IN_PROGRESS = 0x01U,
400  LD_COMPLETED = 0x02U,
401  LD_FAILED = 0x03U,
402  LD_N_AS_TIMEOUT = 0x04U,
403  LD_N_CR_TIMEOUT = 0x05U,
404  LD_WRONG_SN = 0x06U
406 
411 typedef enum
412 {
413  LD_DIAG_IDLE = 0x01U,
414  LD_DIAG_TX_PHY = 0x02U,
417  LD_DIAG_RX_PHY = 0x05U,
421 
426 typedef enum
427 {
432 
437 typedef struct
438 {
446 
447 #define INTERLEAVE_MAX_TIMEOUT (l_u16)(1000000U/TIME_OUT_UNIT_US)
453 typedef enum
454 {
455  DIAG_NOT_START = 0x00U,
457  DIAG_RESPONSE = 0x02U
459 
464 typedef struct
465 {
466  /* Declaration for both Master and Slave interface */
470  /* Declaration only for Master interface */
471  /* message information in transmit queue */
475  /* message information in receive queue */
497  /* Pointer use to ld_receive_message funtion */
502 
503 /*******************************************************************************
504  * Configuration
505  ******************************************************************************/
510 typedef struct
511 {
515  bool function;
516  /* Protocol */
527  l_ifc_slave_handle slave_ifc_handle;
528  l_ifc_master_handle master_ifc_handle;
530 #if (SUPPORT_TRANSPORT_LAYER == 1U)
534 #endif /* end (SUPPORT_TRANSPORT_LAYER == 1U) */
536 
541 typedef struct
542 {
547  l_u8 master_data_buffer[8];
555 
560 typedef struct
561 {
562  /* LIN data pointer */
581 /* End of data definition */
582 
583 /*******************************************************************************
584  * Extern function
585  ******************************************************************************/
586 extern l_u8 ld_read_by_id_callout(l_ifc_handle iii,
587  l_u8 id,
588  l_u8 * data);
589 
590 /*******************************************************************************
591  * Extern variables
592  ******************************************************************************/
593 #if (SUPPORT_SLAVE_MODE == 1U)
594 extern const lin_node_attribute_t g_lin_node_attribute_array[LIN_NUM_OF_SLAVE_IFCS];
595 #endif /* End (SUPPORT_SLAVE_MODE == 1U) */
596 
597 #if (SUPPORT_MASTER_MODE == 1U)
598 extern lin_master_data_t g_lin_master_data_array[LIN_NUM_OF_MASTER_IFCS];
599 #endif /* End (SUPPORT_MASTER_MODE == 1U) */
600 
601 extern lin_tl_descriptor_t g_lin_tl_descriptor_array[LIN_NUM_OF_IFCS];
602 extern const lin_protocol_user_config_t g_lin_protocol_user_cfg_array[LIN_NUM_OF_IFCS];
603 extern lin_protocol_state_t g_lin_protocol_state_array[LIN_NUM_OF_IFCS];
604 extern l_u8 g_lin_frame_data_buffer[LIN_FRAME_BUF_SIZE];
605 extern l_u8 g_lin_flag_handle_tbl[LIN_FLAG_BUF_SIZE];
606 extern l_bool g_lin_frame_flag_handle_tbl[LIN_NUM_OF_FRMS];
607 extern const l_u32 g_lin_virtual_ifc[LIN_NUM_OF_IFCS];
608 extern const l_ifc_handle g_lin_hardware_ifc[HARDWARE_INSTANCE_COUNT];
610 
611 
612 /*******************************************************************************
613  * Static functions
614  ******************************************************************************/
628 {
629  return (l_u16)((14U * 34U * 100000U / (TIME_OUT_UNIT_US * baudRate)) + 1U);
630 }
631 
643 static inline l_u16 lin_calc_max_res_timeout_cnt(l_u32 baudRate,
644  l_u8 size)
645 {
646  l_u16 a = (l_u16)(14U * (1U + (l_u16)size));
647 
648  return (l_u16)((a * 1000000U / (TIME_OUT_UNIT_US * baudRate)) + 1U);
649 }
650 
651 /*******************************************************************************
652  * Global functions
653  ******************************************************************************/
665  l_u8 typeAction);
666 
676 extern void lin_pid_resp_callback_handler(l_ifc_handle iii,
677  const lin_lld_event_id_t event_id,
678  l_u8 id);
679 
685 #define CALLBACK_HANDLER(iii, event_id, id) lin_pid_resp_callback_handler((iii), (event_id), (id))
686 
697 l_bool lin_lld_init(l_ifc_handle iii);
698 
707 l_u8 lin_lld_deinit(l_ifc_handle iii);
708 
716 l_u8 lin_lld_int_enable(l_ifc_handle iii);
717 
725 l_u8 lin_lld_int_disable(l_ifc_handle iii);
726 
733 l_u8 lin_lld_get_state(l_ifc_handle iii);
734 
745 l_u8 lin_lld_tx_header(l_ifc_handle iii,
746  l_u8 id);
747 
755 l_u8 lin_lld_tx_wake_up(l_ifc_handle iii);
756 
764 l_u8 lin_lld_ignore_response(l_ifc_handle iii);
765 
773 l_u8 lin_lld_set_low_power_mode(l_ifc_handle iii);
774 
786 l_u8 lin_lld_set_response(l_ifc_handle iii,
787  l_u8 response_length);
788 
801 l_u8 lin_lld_rx_response(l_ifc_handle iii,
802  l_u8 response_length);
803 
819 void lin_lld_timeout_service(l_ifc_handle iii);
820 
821 #endif /* LIN_H */
822 
825 /******************************************************************************/
826 /* EOF */
827 /******************************************************************************/
const l_ifc_handle g_lin_hardware_ifc[HARDWARE_INSTANCE_COUNT]
lin_sch_tbl_type_t
Types of schedule tables Implements : lin_sch_tbl_type_t_Class.
Definition: lin.h:275
l_u8 overrun_flg
Definition: lin.h:572
static l_u16 lin_calc_max_res_timeout_cnt(l_u32 baudRate, l_u8 size)
Computes the maximum response timeout.
Definition: lin.h:643
lin_frame_type_t
Types of frame Implements : lin_frame_type_t_Class.
Definition: lin.h:218
l_u16 frm_offset
Definition: lin.h:256
l_u8 * list_identifiers_RAM_ptr
Definition: lin.h:522
diag_interleaved_state_t
State of diagnostic interleaved mode Implements : diag_interleaved_state_t_Class. ...
Definition: lin.h:453
lin_product_id_t product_id
Definition: lin.h:193
lin_sch_tbl_type_t sch_tbl_type
Definition: lin.h:302
lin_tl_event_id_t
Transport layer event IDs Implements : lin_tl_event_id_t_Class.
Definition: lin.h:348
l_ifc_master_handle master_ifc_handle
Definition: lin.h:528
l_u8 num_of_pdu
Definition: lin.h:486
l_u16 rx_msg_size
Definition: lin.h:473
lin_serial_number_t serial_number
Definition: lin.h:194
l_u8 lin_process_parity(l_u8 pid, l_u8 typeAction)
Makes or checks parity bits. If action is checking parity, the function returns ID value if parity bi...
Definition: lin.c:74
lin_word_status_str_t word_status
Definition: lin.h:573
lin_tl_callback_return_t
Transport layer event IDs Implements : lin_tl_callback_return_t_Class.
Definition: lin.h:364
l_u8 ld_error_code
Definition: lin.h:481
l_u8 * service_flags_ptr
Definition: lin.h:208
l_u8 frm_size
Definition: lin.h:549
l_bool save_config_flg
Definition: lin.h:575
l_frame_handle frm_id
Definition: lin.h:290
l_u16 idle_timeout_cnt
Definition: lin.h:578
lin_product_id_t * product_id_ptr
Definition: lin.h:485
lin_protocol_state_t g_lin_protocol_state_array[LIN_NUM_OF_IFCS]
Definition: lin.c:50
LIN schedule structure Implements : lin_schedule_data_t_Class.
Definition: lin.h:288
lin_service_status_t
Status of the last configuration call for LIN 2.1 Implements : lin_service_status_t_Class.
Definition: lin.h:324
l_ifc_slave_handle slave_ifc_handle
Definition: lin.h:527
bool FF_pdu_received
Definition: lin.h:495
l_u8 lin_tl_queue_t[8]
LIN transport layer queue Implements : lin_tl_queue_t_Class.
Definition: lin.h:269
l_u8 next_transmit_tick
Definition: lin.h:574
lin_protocol_handle_t language_version
Definition: lin.h:513
lin_master_data_t g_lin_master_data_array[LIN_NUM_OF_MASTER_IFCS]
Definition: lin.c:52
lin_message_timeout_type_t
Types of message timeout Implements : lin_message_timeout_type_t_Class.
Definition: lin.h:426
Definition: lin.h:315
const l_u16 * list_identifiers_ROM_ptr
Definition: lin.h:521
l_u8 lin_lld_tx_header(l_ifc_handle iii, l_u8 id)
This function sends frame header for the input PID.
Definition: lin.c:203
l_u16 * receive_message_length_ptr
Definition: lin.h:500
const lin_timer_get_time_interval_t timerGetTimeIntervalCallbackArr[LIN_NUM_OF_IFCS]
l_diagnostic_mode_t diagnostic_mode
Definition: lin.h:576
l_bool go_to_sleep_flg
Definition: lin.h:568
l_bool send_slave_res_flg
Definition: lin.h:552
lin_tl_pdu_data_t * tl_pdu_ptr
Definition: lin.h:444
const l_u8 * service_supported_ptr
Definition: lin.h:207
l_u8 flag_offset
Definition: lin.h:550
LIN master configuration structure Implements : lin_master_data_t_Class.
Definition: lin.h:541
unsigned long l_u32
Unsigned 32 bit integer Implements : l_u32_Class.
Definition: lin_types.h:42
const lin_node_attribute_t g_lin_node_attribute_array[LIN_NUM_OF_SLAVE_IFCS]
l_u8 previous_schedule_id
Definition: lin.h:544
Schedule table description Implements : lin_schedule_t_Class.
Definition: lin.h:299
const lin_frame_t * frame_tbl_ptr
Definition: lin.h:519
l_u8 g_lin_frame_data_buffer[LIN_FRAME_BUF_SIZE]
const lin_associate_frame_t * frame_data_ptr
Definition: lin.h:259
l_u8 lin_lld_set_response(l_ifc_handle iii, l_u8 response_length)
This function sends frame data that is contained in LIN_lld_response_buffer[iii]. ...
Definition: lin.c:356
Definition: lin.h:398
lin_diagnostic_class_t
List of diagnostic classes Implements : lin_diagnostic_class_t_Class.
Definition: lin.h:139
lin_tl_queue_t tl_queue_data
Definition: lin.h:292
l_u8 flag_offset
Definition: lin.h:257
l_u16 interleave_timeout_counter
Definition: lin.h:490
lin_tl_descriptor_t g_lin_tl_descriptor_array[LIN_NUM_OF_IFCS]
Definition: lin.c:49
lin_diagnostic_state_t
LIN diagnostic state Implements : lin_diagnostic_state_t_Class.
Definition: lin.h:411
l_u16 tx_msg_size
Definition: lin.h:477
lin_message_status_t
Status of LIN message Implements : lin_message_status_t_Class.
Definition: lin.h:396
uint32_t(* lin_timer_get_time_interval_t)(uint32_t *nanoSeconds)
Callback function to get time interval in nanoseconds Implements : lin_timer_get_time_interval_t_Clas...
Definition: lin_driver.h:60
l_u16 check_timeout
Definition: lin.h:484
l_u8 lin_lld_set_low_power_mode(l_ifc_handle iii)
Let the low level driver go to low power mode.
Definition: lin.c:333
l_u8 num_frame_have_esignal
Definition: lin.h:196
l_u8 lin_lld_int_disable(l_ifc_handle iii)
Disable the interrupt related to the interface.
Definition: lin.c:287
l_bool lin_lld_init(l_ifc_handle iii)
This function initializes a LIN hardware instance for operation. This function will initialize the ru...
Definition: lin.c:91
lin_tl_pdu_data_t * tl_tx_queue_data_ptr
Definition: lin.h:531
l_u8 * resp_err_frm_id_ptr
Definition: lin.h:195
Configuration structure Implements : lin_protocol_user_config_t_Class.
Definition: lin.h:510
Serial number Implements : lin_serial_number_t_Class.
Definition: lin.h:177
l_u16 frame_timeout_cnt
Definition: lin.h:577
lin_message_status_t rx_msg_status
Definition: lin.h:472
l_bool event_trigger_collision_flg
Definition: lin.h:546
diag_interleaved_state_t diag_interleave_state
Definition: lin.h:489
l_u8 g_lin_flag_handle_tbl[LIN_FLAG_BUF_SIZE]
lin_frame_response_t
LIN frame response Implements : lin_frame_response_t_Class.
Definition: lin.h:230
lin_message_timeout_type_t check_timeout_type
Definition: lin.h:483
lin_frame_type_t frm_type
Definition: lin.h:253
l_u8 * response_buffer_ptr
Definition: lin.h:564
lin_diagnostic_class_t diagnostic_class
Definition: lin.h:514
l_u8 * response_error_bit_offset_ptr
Definition: lin.h:199
l_u8 * receive_NAD_ptr
Definition: lin.h:499
l_signal_handle response_error
Definition: lin.h:197
void lin_lld_timeout_service(l_ifc_handle iii)
Callback function for Timer Interrupt Handler In timer IRQ handler, call this function. Used to check if frame timeout has occurred during frame data transmission and reception, to check for N_As and N_Cr timeout for LIN 2.1 and above. This function also check if there is no LIN bus communication (no headers and no frame data transferring) for Idle timeout (s), then put LIN node to Sleep mode. Users may initialize a timer (for example FTM)with period of Timeout unit (default: 500 micro seconds) to call lin_lld_timeout_service(). For an interface iii, Idle timeout (s) = max_idle_timeout_cnt * Timeout unit (us) frame timeout (us) = frame_timeout_cnt * Timeout unit (us) N_As timeout (us) = N_As_timeout * Timeout unit (us) N_Cr timeout (us) = N_Cr_timeout * Timeout unit (us)
Definition: lin.c:433
Product id structure Implements : lin_product_id_t_Class.
Definition: lin_types.h:57
l_u8 error_in_response
Definition: lin.h:567
void lin_pid_resp_callback_handler(l_ifc_handle iii, const lin_lld_event_id_t event_id, l_u8 id)
Callback handler for low level events.
Definition: lin.h:401
static l_u16 lin_calc_max_header_timeout_cnt(l_u32 baudRate)
Computes maximum header timeout.
Definition: lin.h:627
l_u8 lin_lld_tx_wake_up(l_ifc_handle iii)
This function send a wakeup signal.
Definition: lin.c:236
LIN protocol status structure Implements : lin_protocol_state_t_Class.
Definition: lin.h:560
l_u8 flag_size
Definition: lin.h:258
l_u16 N_Cr_timeout
Definition: lin.h:205
Transport layer queue Implements : lin_transport_layer_queue_t_Class.
Definition: lin.h:437
l_u8 * configured_NAD_ptr
Definition: lin.h:191
l_u8 num_of_processed_frame
Definition: lin.h:571
ld_queue_status_t
Status of queue Implements : ld_queue_status_t_Class.
Definition: lin.h:380
l_u8 * response_error_byte_offset_ptr
Definition: lin.h:198
l_u8 num_of_associated_uncond_frames
Definition: lin.h:242
const lin_protocol_user_config_t g_lin_protocol_user_cfg_array[LIN_NUM_OF_IFCS]
Informations of associated frame Implements : lin_associate_frame_t_Class.
Definition: lin.h:240
ld_queue_status_t queue_status
Definition: lin.h:441
l_u8 delay_integer
Definition: lin.h:291
l_diagnostic_mode_t
Diagnostic mode Implements : l_diagnostic_mode_t_Class.
Definition: lin.h:313
unsigned char l_u8
Unsigned 8 bit integer Implements : l_u8_Class.
Definition: lin_types.h:30
lin_tl_callback_return_t lin_tl_callback_handler(l_ifc_handle iii, lin_tl_event_id_t tl_event_id, l_u8 id)
lin_transport_layer_queue_t tl_tx_queue
Definition: lin.h:467
const lin_schedule_t * schedule_tbl
Definition: lin.h:526
const l_signal_handle * fault_state_signal_ptr
Definition: lin.h:201
lin_last_cfg_result_t
Status of the last configuration call completed Implements : lin_last_cfg_result_t_Class.
Definition: lin.h:336
l_u8 num_slots
Definition: lin.h:301
LIN hardware configuration structure Implements : lin_user_config_t_Class.
Definition: lin_driver.h:66
l_u8 response_length
Definition: lin.h:565
lin_protocol_handle_t
List of protocols Implements : lin_protocol_handle_t_Class.
Definition: lin.h:129
lin_diagnostic_state_t diag_state
Definition: lin.h:488
lin_user_config_t * lin_user_config_ptr
Definition: lin.h:529
Definition: lin.h:354
const lin_schedule_data_t * ptr_sch_data_ptr
Definition: lin.h:303
l_u16 max_idle_timeout_cnt
Definition: lin.h:523
l_u16 N_As_timeout
Definition: lin.h:204
l_u8 lin_lld_deinit(l_ifc_handle iii)
This function disconnect the node from the cluster and free all hardware used.
Definition: lin.c:157
l_bool send_functional_request_flg
Definition: lin.h:553
l_u8 lin_lld_int_enable(l_ifc_handle iii)
Enable the interrupt related to the interface.
Definition: lin.c:264
lin_transport_layer_queue_t tl_rx_queue
Definition: lin.h:468
l_u8 active_schedule_id
Definition: lin.h:543
l_u8 frame_counter
Definition: lin.h:487
l_u8 frm_len
Definition: lin.h:254
lin_protocol_handle_t protocol_version
Definition: lin.h:512
lin_tl_pdu_data_t * tl_rx_queue_data_ptr
Definition: lin.h:532
lin_message_status_t tx_msg_status
Definition: lin.h:476
l_u8 slave_resp_cnt
Definition: lin.h:491
lin_service_status_t service_status
Definition: lin.h:492
Attributes of LIN node Implements : lin_node_attribute_t_Class.
Definition: lin.h:189
l_u8 ld_read_by_id_callout(l_ifc_handle iii, l_u8 id, l_u8 *data)
l_u8 lin_tl_pdu_data_t[8]
PDU data. Implements : lin_tl_pdu_data_t_Class.
Definition: lin.h:99
bool l_bool
0 is false, and non-zero (>0) is true Implements : l_bool_Class
Definition: lin_types.h:48
const l_u32 g_lin_virtual_ifc[LIN_NUM_OF_IFCS]
l_u8 successful_transfer
Definition: lin.h:566
l_u8 flag_size
Definition: lin.h:551
l_u8 number_support_sid
Definition: lin.h:206
status of LIN bus Implements : lin_word_status_str_t_Class
Definition: lin.h:150
lin_frame_response_t frm_response
Definition: lin.h:255
l_u8 lin_lld_ignore_response(l_ifc_handle iii)
This function terminates an on-going data transmission/reception.
Definition: lin.c:310
const l_frame_handle * associated_uncond_frame_ptr
Definition: lin.h:243
l_u8 number_of_configurable_frames
Definition: lin.h:517
l_u8 lin_lld_get_state(l_ifc_handle iii)
This function gets current state of an interface.
Definition: lin.c:180
l_bool g_lin_frame_flag_handle_tbl[LIN_NUM_OF_FRMS]
l_u8 lin_lld_rx_response(l_ifc_handle iii, l_u8 response_length)
This function receives frame data into the LIN_lld_response_buffer[iii] buffer.
Definition: lin.c:397
l_u8 coll_resolv_schd
Definition: lin.h:244
l_u8 last_RSID
Definition: lin.h:480
bool ld_return_data
Definition: lin.h:494
l_u16 frm_offset
Definition: lin.h:548
l_u8 initial_NAD
Definition: lin.h:192
lin_lld_event_id_t
Event id Implements : lin_lld_event_id_t_Class.
Definition: lin.h:109
l_u8 num_of_fault_state_signal
Definition: lin.h:200
Frame description structure Implements : lin_frame_t_Class.
Definition: lin.h:251
l_u8 * schedule_start_entry_ptr
Definition: lin.h:545
l_u8 * receive_message_ptr
Definition: lin.h:498
unsigned short int l_u16
Unsigned 16 bit integer Implements : l_u16_Class.
Definition: lin_types.h:36
l_u16 baud_rate
Definition: lin.h:563
Transport layer description Implements : lin_tl_descriptor_t_Class.
Definition: lin.h:464
l_bool transmit_error_resp_sig_flg
Definition: lin.h:579
lin_last_cfg_result_t last_cfg_result
Definition: lin.h:479