AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 48

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
48
Application Note
{
} // End of BroadcastMsgHandler
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
*******************************************************************************/
void
IdentMsgHandler(void)
{
} // End of BroadcastMsgHandler
/******************************************************************************
Task Name
Engineer
Date
Parameters
Returns
Notes
*******************************************************************************/
void MCUInitialisation(void)
{
if (BroadcastIndex < 0 || BroadcastIndex >7)
{
}
MsgWriteBuf[0] =
MsgWriteBuf[1] =
LIN_PutMsg(SlaveMsg[0].WriteMsg, MsgWriteBuf);
LIN_RequestMsg(SlaveMsg[0].WriteMsg);
while (LIN_MsgStatus(SlaveMsg[0].WriteMsg) !=LIN_OK)
if (BroadcastIndex == 0)
{
}
if (BroadcastIndex == 7)
{
}
MsgWriteBuf[0] =
MsgWriteBuf[1] =
LIN_PutMsg(SlaveMsg[0].WriteMsg, MsgWriteBuf);
LIN_RequestMsg(SlaveMsg[0].WriteMsg);
while (LIN_MsgStatus(SlaveMsg[0].WriteMsg) !=LIN_OK); // Wait for message complete
/* Device configuration */
AZ60_KBD.config1.bit.copd = 1;
AZ60_SIM.config2.byte = 1;
/* Ports Initialisation */
AZ60_PORT.ddrd.byte = 0x00;
BroadcastIndex = 0;
;
SystemFlags.bit.updowncontrol = 0;
SystemFlags.bit.updowncontrol = 1;
:
:
:
:
:
:
:
:
:
:
:
:
BROADCAST_COMMAND;
BroadcastTable[BroadcastIndex];
IDENT_COMMAND;
AZ60_PORT.ptd.byte;
IdentMsgHandler
R29414
none
none
MCUInitialisation
R29414
none
none
Initialise the mcu hardware
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Dont let Index outwith range
// Wait for message complete
// Up Counter
// Down Counter
// Hex switch input
// Disable Watchdog
// AZ Mode and CAN enabled
// PortD i/p for HEX switches
MOTOROLA
AN2103

Related parts for AN2103