Joint Level Control
hacker_const.h
1 #ifndef _HACKER_CONST_H_
2 #define _HACKER_CONST_H_
3 
4 
5 #include <inttypes.h>
6 
7 const uint8_t CAN_DLC = 0x08;
8 const uint8_t RETURN_ADDRESS = 0xFE;
9 const uint8_t DATAKEY_1 = 0xE5;
10 const uint8_t DATAKEY_2 = 0xD8;
11 const uint8_t SCAN_ADDRESS = 0xFA;
12 const uint8_t SCAN_SIGNATURE = 0xB6;
13 const uint8_t CONTROL_SIGNATURE = 0x0F;
14 const uint8_t PING_SIGNATURE = 0xA0;
15 
16 typedef enum {
17  Motorcontroller_State_Part = 0x00, // frame data
18  Motorcontroller_State = 0x01, // struct Controlresponse
19  Scan_Device = 0x02, // Motorcontroller*
20  Ping_Device = 0x03, // data[0] = 1|0
21  Unknown = 0x04 // frame data
22 } MessageType;
23 
24 typedef struct Message {
25  uint8_t can_address;
26  uint8_t* data;
27  MessageType type;
28 } message_t;
29 
30 
31 #endif
Definition: hacker_const.h:24