code ax12 petit robot 12/05/2017

Fork of command_AX12_petit_robot_V3 by CRAC Team

mbed/can_helper.h

Committer:
ClementBreteau
Date:
2017-05-12
Revision:
7:ad4a19e26b84
Parent:
2:99b1cb0d9f5e

File content as of revision 7:ad4a19e26b84:

/* 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