Freescale Semiconductor Inc.
    Regional Technical Application Center

 

Main Page | Directories | File List | File Members

CAN_driver.h

Go to the documentation of this file.
00001 /*******************************************************************************/
00013 /*******************************************************************************/
00014 /*                                                                             */
00015 /* All software, source code, included documentation, and any implied know-how */
00016 /* are property of Freescale Semiconductor and therefore considered            */ 
00017 /* CONFIDENTIAL INFORMATION.                                                   */
00018 /*                                                                             */
00019 /* This confidential information is disclosed FOR DEMONSTRATION PURPOSES ONLY. */
00020 /*                                                                             */
00021 /* All Confidential Information remains the property of Freescale Semiconductor*/
00022 /* and will not be copied or reproduced without the express written permission */
00023 /* of the Discloser, except for copies that are absolutely necessary in order  */
00024 /* to fulfill the Purpose.                                                     */
00025 /*                                                                             */
00026 /* Services performed by FREESCALE in this matter are performed AS IS and      */
00027 /* without any warranty. CUSTOMER retains the final decision relative to the   */
00028 /* total design and functionality of the end product.                          */
00029 /*                                                                             */
00030 /* FREESCALE neither guarantees nor will be held liable by CUSTOMER for the    */
00031 /* success of this project.                                                    */
00032 /*                                                                             */
00033 /* FREESCALE disclaims all warranties, express, implied or statutory including,*/
00034 /* but not limited to, implied warranty of merchantability or fitness for a    */
00035 /* particular purpose on any hardware, software or advise supplied to the      */
00036 /* project by FREESCALE, and or any product resulting from FREESCALE services. */
00037 /*                                                                             */
00038 /* In no event shall FREESCALE be liable for incidental or consequential       */
00039 /* damages arising out of this agreement. CUSTOMER agrees to hold FREESCALE    */
00040 /* harmless against any and all claims demands or actions by anyone on account */
00041 /* of any damage,or injury, whether commercial, contractual, or tortuous,      */
00042 /* rising directly or indirectly as a result of the advise or assistance       */
00043 /* supplied CUSTOMER in connection with product, services or goods supplied    */
00044 /* under this Agreement.                                                       */
00045 /*                                                                             */
00046 /*******************************************************************************/
00047 
00049 #include "typedefs.h"
00050 
00051 #ifndef _CAN_H
00052 #define _CAN_H
00053 
00054 /* CAN ID definition: Standard Id 0x6C7 formatted to be loaded in IDRx */
00055 #define ST_ID_100 0xD8E00000    
00056 
00057 /* Acceptance Code Definitions */ 
00058 #define ACC_CODE_ID100 0xD8E0
00059 #define ACC_CODE_ID100_HIGH ((ACC_CODE_ID100&0xFF00)>>8)
00060 #define ACC_CODE_ID100_LOW (ACC_CODE_ID100&0x00FF)
00061 
00062 /* Mask Code Definitions */
00063 #define MASK_CODE_ST_ID 0x0007
00064 #define MASK_CODE_ST_ID_HIGH ((MASK_CODE_ST_ID&0xFF00)>>8)
00065 #define MASK_CODE_ST_ID_LOW (MASK_CODE_ST_ID&0xFF)
00066 
00067 /* Error Flags Definition */
00068 #define NO_ERR 0x00
00069 #define ERR_BUFFER_FULL 0x80 
00070 
00071 
00075 void vfnCAN_Init(void);
00076 
00078 UINT8 u8CAN_SendFrame(UINT32 u32ID, UINT8 u8Prio, UINT8 u8Length, UINT8 *u8TxData);
00079 
00081 void vfnCAN_ReceivedFrame(void);
00082 
00083 
00084 #endif /* _CAN_H */
00085 
00086 /*******************************************************************************/