dynamixel_slave_registers.h 1.32 KB
Newer Older
1
2
3
4
5
6
7
#ifndef _DYNAMIXEL_SLAVE_REGISTERS_H
#define _DYNAMIXEL_SLAVE_REGISTERS_H

#define EEPROM_DYN_SLAVE_LENGTH1              6 

#define EEPROM_DYN_SLAVE_LENGTH2              1

8
9
10
11
12
#define DEVICE_MODEL                          0 
#define FIRMWARE_VERSION                      2
#define DEVICE_ID                             3
#define BAUDRATE                              4
#define RETURN_DELAY                          5
13

14
#define RETURN_LEVEL                          0
15

16
#define dyn_slave_control_eeprom_data(name,section_name,base_address1,base_address2,DEFAULT_DEVICE_MODEL,DEFAULT_FIRMWARE_VERSION,DEFAULT_DEVICE_ID,DEFAULT_BAUDRATE,DEFAULT_RETURN_DELAY,DEFAULT_RETURN_LEVEL) \
17
unsigned short int name##_eeprom_data[] __attribute__ ((section (section_name))) __attribute__ ((aligned (4)))= {\
18
19
20
21
22
23
24
  DEFAULT_DEVICE_MODEL&0x00FF,(DEFAULT_DEVICE_ID<<8)+base_address1+DEVICE_MODEL, \
  (DEFAULT_DEVICE_MODEL>>8)&0x00FF,(DEFAULT_DEVICE_ID<<8)+base_address1+DEVICE_MODEL+1, \
  DEFAULT_FIRMWARE_VERSION,(DEFAULT_DEVICE_ID<<8)+base_address1+FIRMWARE_VERSION, \
  DEFAULT_DEVICE_ID,(DEFAULT_DEVICE_ID<<8)+base_address1+DEVICE_ID, \
  DEFAULT_BAUDRATE,(DEFAULT_DEVICE_ID<<8)+base_address1+BAUDRATE, \
  DEFAULT_RETURN_DELAY,(DEFAULT_DEVICE_ID<<8)+base_address1+RETURN_DELAY, \
  DEFAULT_RETURN_LEVEL,(DEFAULT_DEVICE_ID<<8)+base_address2+RETURN_LEVEL \
25
};
26
27


28
29
#endif