Fork of the official mbed C/C++ SDK provides the software platform and libraries to build your applications. The fork has the documentation converted to Doxygen format

Dependents:   NervousPuppySprintOne NervousPuppySprint2602 Robot WarehouseBot1 ... more

Fork of mbed by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers can_helper.h Source File

can_helper.h

00001 /* mbed Microcontroller Library - can_helper
00002  * Copyright (c) 2009 ARM Limited. All rights reserved.
00003  */ 
00004 
00005 #ifndef MBED_CAN_HELPER_H
00006 #define MBED_CAN_HELPER_H
00007 
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif
00011 
00012 enum CANFormat {
00013     CANStandard = 0,
00014     CANExtended = 1
00015 };
00016 typedef enum CANFormat CANFormat;
00017 
00018 enum CANType {
00019     CANData   = 0,
00020     CANRemote = 1
00021 };
00022 typedef enum CANType CANType;
00023 
00024 struct CAN_Message {
00025     unsigned int   id;                 // 29 bit identifier
00026     unsigned char  data[8];            // Data field
00027     unsigned char  len;                // Length of data field in bytes
00028     CANFormat      format;             // 0 - STANDARD, 1- EXTENDED IDENTIFIER
00029     CANType        type;               // 0 - DATA FRAME, 1 - REMOTE FRAME
00030 };
00031 typedef struct CAN_Message CAN_Message;
00032 
00033 #ifdef __cplusplus
00034 };
00035 #endif
00036 
00037 #endif // MBED_CAN_HELPER_H