Programme d'utilisation des AX12 avec rajout de l'MX12
Fork of test_carteAToutFaire_PR by
Diff: mbed/can_helper.h
- Revision:
- 1:f3f702086a30
diff -r 7737d7573e3b -r f3f702086a30 mbed/can_helper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed/can_helper.h Thu May 11 11:49:50 2017 +0000 @@ -0,0 +1,37 @@ +/* mbed Microcontroller Library - can_helper + * Copyright (c) 2009 ARM Limited. All rights reserved. + */ + +#ifndef MBED_CAN_HELPER_H +#define MBED_CAN_HELPER_H + +#ifdef __cplusplus +extern "C" { +#endif + +enum CANFormat { + CANStandard = 0, + CANExtended = 1 +}; +typedef enum CANFormat CANFormat; + +enum CANType { + CANData = 0, + CANRemote = 1 +}; +typedef enum CANType CANType; + +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 +}; +typedef struct CAN_Message CAN_Message; + +#ifdef __cplusplus +}; +#endif + +#endif // MBED_CAN_HELPER_H