When sending the first data byte, a reception interrupt is created by receiving the self-sent data.
Whereupon, the reception judgment processing function _ifc_rx( l_ifc_handle rx_data ) is called in the
same way as for ID field operations, and the data is sent from the second byte onwards according to
the data field send status as shown in "Figure 5-19 Data send processing", and the same process is
repeated. In these LIN communication, the number of data bytes is set to 8, so when the eighth data
byte has finished being sent, finally a checksum is sent, and the send processing ends.
void
l_ifc_rx(l_ifc_handle rx_data){
switch(ucLinStatus){
case LIN_TRANSMIT:
if ( ucTxCurrentIndex < ucTxCount ){
(Omitted)
l_ifc_tx(ucUartTxBuffer[ucTxCurrentIndex]);
(Omitted)
} else if ( ucTxCurrentIndex == ucTxCount ){
(Omitted)
l_ifc_tx(((unsigned char)~uiTxCheckSum));
(Omitted)
}
case LIN_DATA_RECEPTION:
(Omitted)
case LIN_ID_RECEPTION:
(Omitted)
case LIN_WAKEUP_TRANSMIT:
(Omitted)
}
}
DATA FIELD send status
Figure 5-19 Data send processing
106
AN07-00200-03E
If any send data is remaining
Send processing
If send data has all been sent
Check sum send processing