nothing changed

Fork of mbed by gokmen ascioglu

Committer:
Jing_Qiu
Date:
Tue Mar 03 00:55:57 2015 +0000
Revision:
1:27d81db81dd7
Parent:
0:a8fa94490a0a
revise

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gokmenascioglu 0:a8fa94490a0a 1 /* mbed Microcontroller Library - can_helper
gokmenascioglu 0:a8fa94490a0a 2 * Copyright (c) 2009 ARM Limited. All rights reserved.
gokmenascioglu 0:a8fa94490a0a 3 */
gokmenascioglu 0:a8fa94490a0a 4
gokmenascioglu 0:a8fa94490a0a 5 #ifndef MBED_CAN_HELPER_H
gokmenascioglu 0:a8fa94490a0a 6 #define MBED_CAN_HELPER_H
gokmenascioglu 0:a8fa94490a0a 7
gokmenascioglu 0:a8fa94490a0a 8 #ifdef __cplusplus
gokmenascioglu 0:a8fa94490a0a 9 extern "C" {
gokmenascioglu 0:a8fa94490a0a 10 #endif
gokmenascioglu 0:a8fa94490a0a 11
gokmenascioglu 0:a8fa94490a0a 12 enum CANFormat {
gokmenascioglu 0:a8fa94490a0a 13 CANStandard = 0,
gokmenascioglu 0:a8fa94490a0a 14 CANExtended = 1
gokmenascioglu 0:a8fa94490a0a 15 };
gokmenascioglu 0:a8fa94490a0a 16 typedef enum CANFormat CANFormat;
gokmenascioglu 0:a8fa94490a0a 17
gokmenascioglu 0:a8fa94490a0a 18 enum CANType {
gokmenascioglu 0:a8fa94490a0a 19 CANData = 0,
gokmenascioglu 0:a8fa94490a0a 20 CANRemote = 1
gokmenascioglu 0:a8fa94490a0a 21 };
gokmenascioglu 0:a8fa94490a0a 22 typedef enum CANType CANType;
gokmenascioglu 0:a8fa94490a0a 23
gokmenascioglu 0:a8fa94490a0a 24 struct CAN_Message {
gokmenascioglu 0:a8fa94490a0a 25 unsigned int id; // 29 bit identifier
gokmenascioglu 0:a8fa94490a0a 26 unsigned char data[8]; // Data field
gokmenascioglu 0:a8fa94490a0a 27 unsigned char len; // Length of data field in bytes
gokmenascioglu 0:a8fa94490a0a 28 CANFormat format; // 0 - STANDARD, 1- EXTENDED IDENTIFIER
gokmenascioglu 0:a8fa94490a0a 29 CANType type; // 0 - DATA FRAME, 1 - REMOTE FRAME
gokmenascioglu 0:a8fa94490a0a 30 };
gokmenascioglu 0:a8fa94490a0a 31 typedef struct CAN_Message CAN_Message;
gokmenascioglu 0:a8fa94490a0a 32
gokmenascioglu 0:a8fa94490a0a 33 #ifdef __cplusplus
gokmenascioglu 0:a8fa94490a0a 34 };
gokmenascioglu 0:a8fa94490a0a 35 #endif
gokmenascioglu 0:a8fa94490a0a 36
gokmenascioglu 0:a8fa94490a0a 37 #endif // MBED_CAN_HELPER_H