The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: hal/can_helper.h
- Revision:
- 145:64910690c574
- Parent:
- 128:9bcdf88f62b0
--- a/hal/can_helper.h Thu Jun 08 14:53:05 2017 +0100 +++ b/hal/can_helper.h Wed Jun 21 17:31:38 2017 +0100 @@ -25,6 +25,12 @@ extern "C" { #endif +/** + * + * \enum CANFormat + * + * \brief Values that represent CAN Format +**/ enum CANFormat { CANStandard = 0, CANExtended = 1, @@ -32,18 +38,31 @@ }; typedef enum CANFormat CANFormat; +/** + * + * \enum CANType + * + * \brief Values that represent CAN Type +**/ enum CANType { CANData = 0, CANRemote = 1 }; typedef enum CANType CANType; +/** + * + * \struct CAN_Message + * + * \brief Holder for single CAN message. + * +**/ struct CAN_Message { unsigned int id; // 29 bit identifier unsigned char data[8]; // Data field unsigned char len; // Length of data field in bytes - CANFormat format; // 0 - STANDARD, 1- EXTENDED IDENTIFIER - CANType type; // 0 - DATA FRAME, 1 - REMOTE FRAME + CANFormat format; // Format ::CANFormat + CANType type; // Type ::CANType }; typedef struct CAN_Message CAN_Message;