AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 46

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
46
Application Note
} // End scheduleMsg
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
*******************************************************************************/
void DefaultMsgHandler(void)
{
frame */
(CurrentSlaveStatus[ScheduleIndex - 1].Byte1 != MsgReadBuf1[1]))
}
if ((ScheduleIndex <1) || (ScheduleIndex >= 13))
{
}
/* Within range */
if ((ScheduleIndex == 12) || (ScheduleIndex == 6))
{
}
else
{
}
/* Compare status data with previous data */
if ((CurrentSlaveStatus[ScheduleIndex - 1].Byte0 != MsgReadBuf1[0]) ||
{
case IDENT:
case SLEEPMODE:
SleepHandler();
default:
// End of switch
ScheduleIndex = 1;
/* Node 12 or 6 */
LINTransmit(ScheduleIndex, ALL_LEDS_ON, MsgReadBuf1);
AltScheduleIndex = 12 - ScheduleIndex;
LINTransmit(ScheduleIndex, RED_LEDS_ON, MsgReadBuf1);
LINTransmit(AltScheduleIndex, GREEN_LEDS_ON, MsgReadBuf2);
if (SystemFlags.bit.canmode==1)
{
}
CurrentSlaveStatus[ScheduleIndex - 1].Byte0 = MsgReadBuf1[0]; // Update status data
BroadcastMsgHandler();
break;
IdentMsgHandler();
break;
break;
break;
(tU16) ScheduleIndex;
TxCANMsg(MsgReadBuf1,ScheduleIndex);
:
:
:
:
:
:
DefaultMsgHandler
R29414
26/07/2000
none
none
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Call BroadcastMsgHandler
// Call IdentMsgHandler
// Call SleepHandler
// Check index is within range 1 to 12
// Out of range
// make index = 1
// Valid ScheduleIndex
// Transmit specified message header frame
// Calculate alternate index
// Transmit specified message header frame
// Do not transmit if standalone mode
// Standalone =0
// ScheduleIndex is the CANId
// Transmit CAN message
// Transmit specified message header
MOTOROLA
AN2103

Related parts for AN2103