AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 47

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2103
MOTOROLA
} // End DefaultMsgHandler
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
*******************************************************************************/
void LINTransmit(tU08 index, tU08 ledcommand, tU08 *msgbuffer)
{
*/
} /* End LINTransmit */
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
*******************************************************************************/
void
BroadcastMsgHandler(void)
}
TimeoutCount = 0x00;
SystemFlags.bit.linmsgtimeout=0;
LIN_RequestMsg(SlaveMsg[index].ReadMsg);
SystemFlags.bit.starttimeout=1;
/* Wait for new data or timeout */
while (LIN_MsgStatus(SlaveMsg[index].ReadMsg) !=LIN_OK && SystemFlags.bit.linmsgtimeout==0)
SystemFlags.bit.starttimeout=0;
if (SystemFlags.bit.linmsgtimeout==0)
{
}
else
{
}
CurrentSlaveStatus[ScheduleIndex - 1].Byte1 = MsgReadBuf1[1];
;
LIN_GetMsg(SlaveMsg[index].ReadMsg, msgbuffer);
MsgWriteBuf[0] =
MsgWriteBuf[1] =
/* Transmit default message to node x */
LIN_PutMsg(SlaveMsg[index].WriteMsg, MsgWriteBuf);
LIN_RequestMsg(SlaveMsg[index].WriteMsg);
while (LIN_MsgStatus(SlaveMsg[index].WriteMsg) !=LIN_OK)
msgbuffer[0] = NO_NODE;
msgbuffer[1] = NO_NODE;
;
:
:
:
:
:
:
:
:
:
:
:
:
SLAVE_LEDS_COMMAND;
ledcommand;
LINTransmit
R29414
26/07/2000
index, ledcommand, &msgbuffer
none
BroadcastMsgHandler
R29414
none
none
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Initialise Timeout count
// Initialise Timeout
// Transmit specified message header frame
// Start Timeout
// Stop timeout
// Check if valid LIN message received
//Set up write buffer to transmit command to node
// Timeout
// Update temporary buffer indicating that no node */
// Store status information
// Wait for transmission to complete
Master Code – Master08.C
Code Listings
47

Related parts for AN2103