REB基本OK
This commit is contained in:
parent
c9428891ad
commit
1fa3985b8b
@ -1598,9 +1598,10 @@ void lin_lld_sci_isr ()
|
||||
/* trigger callback */
|
||||
CALLBACK_HANDLER((l_ifc_handle)ifc, LIN_LLD_CHECKSUM_ERR, current_id);
|
||||
lin_goto_idle_state();
|
||||
|
||||
lin_pFrameBuf[7] |= 0x80;
|
||||
}
|
||||
lin_pFrameBuf[6] = l_status.byte;
|
||||
//lin_pFrameBuf[5] = tmp_byte;
|
||||
//lin_pFrameBuf[6] = l_status.byte;
|
||||
}
|
||||
cnt_byte++;
|
||||
break;
|
||||
@ -1619,6 +1620,20 @@ void lin_lld_sci_isr ()
|
||||
}
|
||||
l_u8_wr_LI0_MFL_Zaehler(MFS_RollingCounter);
|
||||
}
|
||||
|
||||
if (cnt_byte==6)
|
||||
{
|
||||
if (lin_error_in_response == 1)
|
||||
{
|
||||
response_buffer[8] |= 0x80;
|
||||
}
|
||||
else
|
||||
{
|
||||
response_buffer[8] &= 0x7f;
|
||||
}
|
||||
response_buffer[9] = lin_checksum(response_buffer, lin_process_parity(current_id,MAKE_PARITY));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (0 == (sci_flag_sr1&SCISR1_TC_MASK ))
|
||||
@ -1662,6 +1677,8 @@ void lin_lld_sci_isr ()
|
||||
/* Trigger callback */
|
||||
CALLBACK_HANDLER((l_ifc_handle)ifc, LIN_LLD_TX_COMPLETED, current_id);
|
||||
lin_goto_idle_state();
|
||||
lin_error_in_response = 0;
|
||||
lin_pFrameBuf[7] &= 0x7f;
|
||||
break;
|
||||
/******************************
|
||||
*** 4.8 SLAVE: Low power mode
|
||||
|
@ -537,10 +537,11 @@ void lin_process_uncd_frame
|
||||
if (MAKE_UNCONDITIONAL_FRAME == type)
|
||||
{
|
||||
/* get data from lin frame buffer */
|
||||
flag = lin_frame_updating_flag_tbl[frame_index];
|
||||
flag = lin_frame_updating_flag_tbl[frame_index];//TODO:有溢出?
|
||||
|
||||
for (i = 1; i < lin_lld_response_buffer[0]+1; i++, frame_byte_offset++)
|
||||
{
|
||||
/*
|
||||
if(flag & (1<<(i-1)))
|
||||
{
|
||||
lin_lld_response_buffer[i] = buffer_backup_data[i-1];
|
||||
@ -548,7 +549,8 @@ void lin_process_uncd_frame
|
||||
else
|
||||
{
|
||||
lin_lld_response_buffer[i] = lin_pFrameBuf[frame_byte_offset];
|
||||
}
|
||||
}*/
|
||||
lin_lld_response_buffer[i] = lin_pFrameBuf[frame_byte_offset];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -40,7 +40,7 @@ const TYPE_DIDSRVARR DID_CheckArr[DEF_DID_NUM]={
|
||||
};
|
||||
|
||||
//const char DIDList_SWVersion[8]@0xff7000="SW0102";
|
||||
const char DIDList_SWVersion[4]="0308";
|
||||
const char DIDList_SWVersion[4]="0309";
|
||||
const char DIDList_HWVersion[3]="H04";
|
||||
const unsigned char DIDList_PartNumber[8]={0x11,0x22,0x33,0x44};
|
||||
const unsigned char DIDList_ManufacturingData[8]={0x20,0x20,0x07,0x22};
|
||||
|
@ -86,7 +86,7 @@
|
||||
#define _TL_FRAME_SUPPORT_ _TL_MULTI_FRAME_
|
||||
|
||||
/* frame buffer size */
|
||||
#define LIN_FRAME_BUF_SIZE 12
|
||||
#define LIN_FRAME_BUF_SIZE 30
|
||||
#define LIN_FLAG_BUF_SIZE 6
|
||||
|
||||
/**********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user