Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
Diff: can_helper.h
- Revision:
- 11:1c1ebd0324fa
- Child:
- 27:7110ebee3484
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/can_helper.h Fri Aug 28 12:10:11 2009 +0000 @@ -0,0 +1,38 @@ +/* mbed Microcontroller Library - can_helper + * Copyright (c) 2009 ARM Limited. All rights reserved. + * rmeyer + */ + +#ifndef MBED_CAN_HELPER_H +#define MBED_CAN_HELPER_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum CANFormat CANFormat; +enum CANFormat { + CANStandard = 0, + CANExtended = 1 +}; + +typedef enum CANType CANType; +enum CANType { + CANData = 0, + CANRemote = 1 +}; + +typedef struct CAN_Message 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 +}; + +#ifdef __cplusplus +}; +#endif + +#endif // MBED_CAN_HELPER_H