AN2600 Freescale Semiconductor / Motorola, AN2600 Datasheet - Page 19

no-image

AN2600

Manufacturer Part Number
AN2600
Description
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
LINmsg.c
/******************************************************************************
*
*
*
*
* Filename:
* Author:
* Locker:
* State:
* Version:
*
* Functions:
*
* History:
*
*
* Description:
*
* Notes:
*
*
******************************************************************************/
//includes
#include <MC68HC908QY4.h>
#include “LINdriver.h”
/*************** LIN Frame setup dependant variables *************************/
/* This is where the user will define the frames used in the application.
/*****************************************************************************/
/* Define what messages will be used in the application, as “Message0xID”,
/* where ID is the message id in hex with the parity bits included.
/* Define the frame data field for each message - the data field can be 2, 4 */
/* or 8 bytes long.
U8 volatile Message0x1A[2];// id 0x1A = 0x1A with parity
U8 volatile Message0x5B[2];// id 0x1B = 0x5B with parity
/* Pointer array pointing to all frames, must be setup in the same order
/* as IdTbl[] and MessageCountTbl[]
U8 volatile * MessagePointerTbl[] = {Message0x1A, Message0x5B};
/* Relevant identifier table (array), must be setup in the same order
/* as *MessagePointerTbl[] and MessageCountTbl[]
/* Remember that the id must have parity bits included.
U8 const near IdTbl[] = {0x1A, 0x5B};
/* Table below defines number of bytes in the message data and shows if
/* the message should be sent or received.
/* The LSHB is the length of data frame +1 (checksum)
/* (e.g. Message0x20[4]=> LSHB= 5)
/*LSHB = Byte count incl Checksum;
/* Must be setup in the same order as .....
U8 const near MessageCountTbl[] = {0x13, 0x03};
MOTOROLA
Copyright (C) 2003 Motorola, Inc.
All Rights Reserved
Users should alter this file to define the required LIN messages
$Version: 1.3.5.0$
$RCSfile: LINmsg.c,v $
$Author: r57404 $
$Locker:
$State: Exp $
LIN header file for message configuration
Use the RCS command log to display revision history
information.
A Simple Keypad Using LIN with the MC68HC908QT/QY MCU
$
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
MSHB =>F=Ignore, 1 = Receive,0 = Send;*/
Application Source Code
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
AN2600/D
19

Related parts for AN2600