AN2103 Freescale Semiconductor / Motorola, AN2103 Datasheet - Page 51

no-image

AN2103

Manufacturer Part Number
AN2103
Description
Local Interconnect Network (LIN) Demonstration
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2103
MOTOROLA
/******************************************************************************
Function Name
Engineer
Date
Parameters
Returns
Notes
******************************************************************************/
void SleepHandler(void)
/******************************************************************************
Function Name
Engineer
Date
Parameters
Returns
Notes
******************************************************************************/
void ModeSelect(void)
{
}
{
/* Send out LIN Sleep command */
MsgWriteBuf[0] =
MsgWriteBuf[1] =
LIN_PutMsg(SlaveMsg[0].WriteMsg, MsgWriteBuf);
LIN_RequestMsg(SlaveMsg[0].WriteMsg);
while (LIN_MsgStatus(SlaveMsg[0].WriteMsg) !=LIN_OK)
AZ60_PORT.pte.bit.pte3 = 0;
SetMC33388Mode(SLEEP_RQ);
SetMC33388Mode(SLEEP);
while(1)
}
{
switch(AZ60_MSCAN08.rxbuf.dsr[1])
while (LIN_MsgStatus(SlaveMsg[CanMsgIndex].WriteMsg) != LIN_OK)// Wait a while
tU08 msgSent[] = {CLOCK_LEDS_COMMAND, ALL_LEDS_OFF};
LIN_PutMsg (SlaveMsg[CanMsgIndex].WriteMsg, msgSent);
LIN_RequestMsg(SlaveMsg[CanMsgIndex].WriteMsg);
;
;
;
{
case DEFAULT:
case BROADCAST:
DemoMode = DEFAULT;
break;
:
:
:
:
:
:
:
:
:
:
:
:
SLEEP_COMMAND;
0x00;
SleepHandler
R38917
11/02/00
None
None
ModeSelect
R38917
10/02/00
None
None
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
// Disable UPL
//placing MC33388 into SLEEP mode switches off the Vreg
// Demo mode in byte1
// Put demo in default mode
// Wait for message complete
// Local Declaration
// Transfer data to LIN Msg buffer
// Request a message
Master Code – Master08.C
Code Listings
51

Related parts for AN2103