31 #if (SUPPORT_TRANSPORT_LAYER == 1U)
51 #if (SUPPORT_MASTER_MODE == 1U)
58 #if (SUPPORT_SLAVE_MODE == 1U)
61 #if (SUPPORT_PROTOCOL_21 == 1U)
129 #if (SUPPORT_PROTOCOL_21 == 1U)
134 #if (SUPPORT_MASTER_MODE == 1U)
147 #if (SUPPORT_PROTOCOL_21 == 1U)
159 #if (SUPPORT_MASTER_MODE == 1U)
191 #if (SUPPORT_MASTER_MODE == 1U)
199 if (INTERLEAVE_MAX_TIMEOUT < tl_desc_ptr->interleave_timeout_counter)
233 #if (SUPPORT_MASTER_MODE == 1U)
242 length = (
l_u8)(data[1] & 0x0FU);
246 #if (SUPPORT_MASTER_MODE == 1U)
247 if ((
bool)LIN_MASTER == prot_user_config_ptr->
function)
282 #if (SUPPORT_SLAVE_MODE == 1U)
338 #if (SUPPORT_SLAVE_MODE == 1U)
360 if (((length - 5U) % 6U) == 0U)
388 l_u8 tmp_frame_counter;
392 #if (SUPPORT_MASTER_MODE == 1U)
401 tmp_frame_counter = (
l_u8)(data[1] & 0x0FU);
466 #if (SUPPORT_SLAVE_MODE == 1U)
477 tmp_frame_counter = (
l_u8)(data[1] & 0x0FU);
537 #if (SUPPORT_SLAVE_MODE == 1U)
546 pci_type = (
l_u8)(((*pdu)[1] & 0xF0U) >> 4U);
577 #if (SUPPORT_MASTER_MODE == 1U)
720 #if (SUPPORT_SLAVE_MODE == 1U)
723 bool invalid_NAD =
false;
732 pci_type = (
l_u8)(((*lin_tl_pdu)[1] & 0xF0U) >> 4U);
734 #if (SUPPORT_SLAVE_MODE == 1U)
767 #if (SUPPORT_MASTER_MODE == 1U)
783 #if (SUPPORT_MASTER_MODE == 1U)
820 #if (SUPPORT_SLAVE_MODE == 1U)
828 #if (SUPPORT_MASTER_MODE == 1U)
838 #if (SUPPORT_SLAVE_MODE == 1U)
851 l_u8 rx_queue_current_status;
888 #if (SUPPORT_MASTER_MODE == 1U)
907 for (i = 0; i < 8U; i++)
913 frame_type = (
l_u8)(((lin_tl_pdu)[1] & 0xF0U) >> 4U);
918 sci = (lin_tl_pdu)[2];
924 sci = (lin_tl_pdu)[3];
945 sci = (
l_u8)(sci - 0x40U);
1014 l_u8 * active_schedule_id;
1015 l_u8 * previous_schedule_id;
1036 *previous_schedule_id = *active_schedule_id;
1095 const l_u8 *
const data,
1103 #if (SUPPORT_MASTER_MODE == 1U)
1150 #if (SUPPORT_MASTER_MODE == 1U)
1154 for (i = 0U; i < 8U; i++)
1168 for (i = 0U; i < 8U; i++)
1210 for (i = 0U; i < 8U; i++)
1212 data[i] = queue_data[queue_header][i];
1268 l_u16 data_index = 0U;
1269 l_u16 tmp_length = 0U;
1290 PCI_type = (
l_u8)((pdu[1] & 0xF0U) >> 4U);
1295 tmp_length = (
l_u16)((
l_u16)pdu[1] & 0x000FU);
1297 *length = tmp_length;
1304 for (i = 1U; i < tmp_length; i++)
1306 data[i] = pdu[i + 2U];
1312 tmp_length = (
l_u16)((((
l_u16)pdu[1] & 0x000FU) << 8) + (
l_u16)pdu[2]);
1314 *length = tmp_length;
1320 for (i = 1U; i < 5U; i++)
1322 data[i] = pdu[i + 3U];
1329 while (tmp_length > 6U)
1336 for (i = 2U; i < 8U; i++)
1338 data[data_index] = pdu[i];
1346 if (tmp_length > 0U)
1353 for (i = 0U; i < tmp_length; i++)
1355 data[data_index] = pdu[i + 2U];
#define SERVICE_SAVE_CONFIGURATION
static void lin_tl_get_response(l_ifc_handle iii)
lin_sch_tbl_type_t sch_tbl_type
static void lin_tl_handle_timeout(l_ifc_handle iii)
lin_tl_event_id_t
Transport layer event IDs Implements : lin_tl_event_id_t_Class.
l_ifc_master_handle master_ifc_handle
lin_tl_callback_return_t
Transport layer event IDs Implements : lin_tl_callback_return_t_Class.
#define SERVICE_READ_BY_IDENTIFY
static void lin_tl_handler_rx_completed(l_ifc_handle iii)
static void lin_tl_sch_switch(l_ifc_handle iii)
lin_product_id_t * product_id_ptr
lin_protocol_state_t g_lin_protocol_state_array[LIN_NUM_OF_IFCS]
static void tl_receive_message(l_ifc_handle iii)
#define SERVICE_ASSIGN_FRAME_ID
l_ifc_slave_handle slave_ifc_handle
#define LD_FUNCTIONAL_NAD
lin_master_data_t g_lin_master_data_array[LIN_NUM_OF_MASTER_IFCS]
static void lin_process_pdu(l_ifc_handle iii, const lin_tl_pdu_data_t *pdu)
l_u8 ld_raw_rx_status(l_ifc_handle iii)
Get the status of the raw frame receive function.
#define DIAG_SERVICE_CALLBACK_HANDLER(iii, sid)
#define LIN_SLAVE
Mode of LIN node (master or slave)
l_u16 * receive_message_length_ptr
l_diagnostic_mode_t diagnostic_mode
l_bool send_slave_res_flg
lin_tl_pdu_data_t * tl_pdu_ptr
static void lin_tl_handler_error(l_ifc_handle iii, l_u8 pid)
LIN master configuration structure Implements : lin_master_data_t_Class.
const lin_node_attribute_t g_lin_node_attribute_array[LIN_NUM_OF_SLAVE_IFCS]
l_u8 previous_schedule_id
Schedule table description Implements : lin_schedule_t_Class.
static void lin_tl_attach_service(l_ifc_handle iii)
l_u16 interleave_timeout_counter
lin_tl_descriptor_t g_lin_tl_descriptor_array[LIN_NUM_OF_IFCS]
#define SERVICE_TARGET_RESET
Configuration structure Implements : lin_protocol_user_config_t_Class.
lin_message_status_t rx_msg_status
diag_interleaved_state_t diag_interleave_state
lin_message_timeout_type_t check_timeout_type
l_u8 * response_buffer_ptr
void ld_get_raw(l_ifc_handle iii, l_u8 *const data)
Copy the oldest received diagnostic frame data to the memory specified by data.
LIN protocol status structure Implements : lin_protocol_state_t_Class.
static void lin_tl_handler_tx_completed(l_ifc_handle iii)
static void lin_tl_get_pdu(l_ifc_handle iii)
void tl_put_raw(l_ifc_handle iii, const l_u8 *const data, lin_transport_layer_queue_t *queue, l_u8 direction)
Transport layer queue Implements : lin_transport_layer_queue_t_Class.
#define SERVICE_ASSIGN_NAD
l_u8 * configured_NAD_ptr
const lin_protocol_user_config_t g_lin_protocol_user_cfg_array[LIN_NUM_OF_IFCS]
static void lin_process_first_frame(l_ifc_handle iii)
ld_queue_status_t queue_status
unsigned char l_u8
Unsigned 8 bit integer Implements : l_u8_Class.
lin_tl_callback_return_t lin_tl_callback_handler(l_ifc_handle iii, lin_tl_event_id_t tl_event_id, l_u8 id)
static void lin_tl_handle_interleave_mode(l_ifc_handle iii)
lin_transport_layer_queue_t tl_tx_queue
lin_diagnostic_state_t diag_state
static void lin_process_single_frame(l_ifc_handle iii)
l_bool send_functional_request_flg
lin_transport_layer_queue_t tl_rx_queue
void tl_get_raw(l_ifc_handle iii, l_u8 *const data, lin_transport_layer_queue_t *queue, l_u8 direction)
static void lin_tl_make_master_request_pdu(l_ifc_handle iii)
lin_protocol_handle_t protocol_version
lin_message_status_t tx_msg_status
lin_service_status_t service_status
Attributes of LIN node Implements : lin_node_attribute_t_Class.
l_u8 lin_tl_pdu_data_t[8]
PDU data. Implements : lin_tl_pdu_data_t_Class.
#define SERVICE_CONDITIONAL_CHANGE_NAD
static void lin_process_consecutive_frame(l_ifc_handle iii)
l_u8 * schedule_start_entry_ptr
l_u8 * receive_message_ptr
unsigned short int l_u16
Unsigned 16 bit integer Implements : l_u16_Class.
Transport layer description Implements : lin_tl_descriptor_t_Class.
#define SERVICE_ASSIGN_FRAME_ID_RANGE
lin_last_cfg_result_t last_cfg_result