AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 45

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2103
MOTOROLA
} // End of scheduleTableInit function
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
******************************************************************************/
void ScheduleMsg(void)
{
} // end of for
/* Transmit Alive Message */
MsgWriteBuf[0] =
MsgWriteBuf[1] =
LIN_PutMsg(SlaveMsg[0].WriteMsg, MsgWriteBuf);
LIN_RequestMsg(SlaveMsg[0].WriteMsg);
while (LIN_MsgStatus(SlaveMsg[0].WriteMsg) !=LIN_OK)
if (SystemFlags.bit.canmode==0)
{
}
switch (DemoMode)
{
SystemFlags.bit.starttimeout=1;
while (LIN_MsgStatus(SlaveMsg[i].ReadMsg) !=LIN_OK && SystemFlags.bit.linmsgtimeout==0)
SystemFlags.bit.starttimeout=0;
if (SystemFlags.bit.linmsgtimeout==0)
{
}
/* Transmit initial status via CAN if not in standalone mode */
if (SystemFlags.bit.canmode==1)
{
}
;
DemoMode = AZ60_PORT.ptd.byte & 0x03;
case DEFAULT:
case BROADCAST:
;
LIN_GetMsg (SlaveMsg[i].ReadMsg, msgTempBuffer);
/* Update Current slave status */
CurrentSlaveStatus[i-1].Byte0 = msgTempBuffer[0];
CurrentSlaveStatus[i-1].Byte1 = msgTempBuffer[1];
(tU16) i;
TxCANMsg(msgTempBuffer,i);
DefaultMsgHandler();
break;
:
:
:
:
:
:
ALIVE_COMMAND;
ALIVE_BYTE;
ScheduleMsg
R29414
none
none
Determine mode of demo and calls handler
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Start time out
// Wait for new data or timeout
// Stop timeout. Disables timeout in TIMBOVF_ISR
// No Timeout
// Valid message received
// Standalone mode canmode= 0
// i is the CANId
// Transmit CAN message */
// Transmit message
// Check mode
// Stand alone mode
// Call NodeMsgHandler
// Wait for message request complete
// Transfer Node status to Temp buffer
// 1=< i <13
Master Code – Master08.C
Code Listings
45
*/

Related parts for AN2103