35 #if (SUPPORT_TRANSPORT_LAYER == 1U)
68 if (((length - 5U) % 6U) == 0U)
70 max_queue_size = (
l_u8)(((length - 5U) / 6U) + 1U);
74 max_queue_size = (
l_u8)(((length - 5U) / 6U) + 2U);
135 const l_u8 *
const data)
142 #if (SUPPORT_SLAVE_MODE == 1U)
217 const l_u8 *
const data)
229 l_u16 data_index = 0U;
230 l_u16 tmp_length = length;
231 l_u16 frame_counter = 0U;
246 if (((length - 5U) % 6U) == 0U)
248 message_size = (
l_u8)(((length - 5U) / 6U) + 1U);
252 message_size = (
l_u8)(((length - 5U) / 6U) + 2U);
274 #if (SUPPORT_SLAVE_MODE == 1U)
280 pdu[1] = (
l_u8)length;
282 for (i = 1U; i < length; i++)
284 pdu[i + 2U] = data[i];
287 for (i = (
l_u8)length; i < 6U; i++)
304 #if (SUPPORT_SLAVE_MODE == 1U)
310 pdu[1] = (
l_u8)(((length / 256U) & 0x0FU) | 0x10U);
311 pdu[2] = (
l_u8)(length % 256U);
313 for (i = 1U; i < 5U; i++)
316 pdu[i + 3U] = data[i];
332 #if (SUPPORT_SLAVE_MODE == 1U)
338 while (message_size > 0U)
341 pdu[1] = (
l_u8)(0x20U | (frame_counter & 0x0FU));
346 for (i = 0U; i < tmp_length; i++)
348 pdu[i + 2U] = data[data_index];
353 for (i = (
l_u8)tmp_length; i < 6U; i++)
360 for (i = 2U; i < 8U; i++)
362 pdu[i] = data[data_index];
386 l_u16 *
const length,
447 #if (SUPPORT_DIAG_SERVICE != 1U)
lin_product_id_t * product_id_ptr
l_ifc_slave_handle slave_ifc_handle
l_u8 ld_raw_rx_status(l_ifc_handle iii)
Get the status of the raw frame receive function.
void ld_init(l_ifc_handle iii)
Initialize or reinitialize the raw and cooked layers.
l_u8 ld_rx_status(l_ifc_handle iii)
Get the status of the last made call to ld_send_message.
#define LIN_SLAVE
Mode of LIN node (master or slave)
l_u16 * receive_message_length_ptr
lin_tl_pdu_data_t * tl_pdu_ptr
void ld_receive_message(l_ifc_handle iii, l_u16 *const length, l_u8 *const NAD, l_u8 *const data)
Prepare the LIN diagnostic module to receive one message and store it in the buffer pointed to by dat...
void lin_diag_service_callback(l_ifc_handle iii, l_u8 sid)
const lin_node_attribute_t g_lin_node_attribute_array[LIN_NUM_OF_SLAVE_IFCS]
l_u16 interleave_timeout_counter
lin_tl_descriptor_t g_lin_tl_descriptor_array[LIN_NUM_OF_IFCS]
lin_tl_pdu_data_t * tl_tx_queue_data_ptr
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
void ld_send_message(l_ifc_handle iii, l_u16 length, l_u8 NAD, const l_u8 *const data)
Pack the information specified by data and length into one or multiple diagnostic frames...
Product id structure Implements : lin_product_id_t_Class.
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.
l_u8 ld_tx_status(l_ifc_handle iii)
Get the status of the last made call to ld_send_message.
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.
l_u8 * configured_NAD_ptr
const lin_protocol_user_config_t g_lin_protocol_user_cfg_array[LIN_NUM_OF_IFCS]
ld_queue_status_t queue_status
unsigned char l_u8
Unsigned 8 bit integer Implements : l_u8_Class.
lin_transport_layer_queue_t tl_tx_queue
l_u8 ld_raw_tx_status(l_ifc_handle iii)
Get the status of the raw frame transmission function.
void ld_put_raw(l_ifc_handle iii, const l_u8 *const data)
Queue the transmission of 8 bytes of data in one frame.
lin_diagnostic_state_t diag_state
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)
lin_protocol_handle_t protocol_version
lin_tl_pdu_data_t * tl_rx_queue_data_ptr
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.
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.
lin_last_cfg_result_t last_cfg_result