AN2573 Freescale Semiconductor / Motorola, AN2573 Datasheet - Page 18

no-image

AN2573

Manufacturer Part Number
AN2573
Description
LINkits LIN Evaluation Boards
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2573/D
18
}
/* Schedule Loop */
while( 1 )
{
/* Check/Enable LIN interface */
LINActive();
/* Slave received messages - cycle here */
for (i = 0; i < messageList; i++)
{
/* Send a request for message */
ret = LIN_RequestMsg( idList[i] );
/* Wait for message processing */
do
{
}
while( ret & LIN_STATUS_PENDING );
/* Check received message status */
ret = LIN_MsgStatus( idList[i] );
if ( ret == LIN_OK )
{
}
else
{
ret = LIN_DriverStatus();
/* Read message */
ret = LIN_GetMsg( idList[i], MsgRcvd );
if (activeList[i] == 0)
{
}
if (activeList[i] == 1)
{
/* Id not found */
Freescale Semiconductor, Inc.
For More Information On This Product,
/* Was message found last time? */
/* No so new Id was added */
activeList[i] = 1;
/*Flash LEDs to indicate new node */
MsgCount++;
statusDisplay = MsgRcvd[0] & 0x0F;
nodeId = i*16;
statusDisplay = statusDisplay + nodeId;
PORTB = ~statusDisplay;
Delay(480);
/* Was message found last time? */
/* Yes so Id was lost */
/*Flash LEDs to indicate lost node */
LINkits LIN Evaluation Boards
Go to: www.freescale.com
NewNode();
LostNode();
MOTOROLA

Related parts for AN2573