ned3pro_stepper_reg.hpp
Go to the documentation of this file.
1 /*
2 ned3pro_stepper_reg.hpp
3 Copyright (C) 2024 Niryo
4 All rights reserved.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http:// www.gnu.org/licenses/>.
15 */
16 
17 #ifndef NED3PRO_STEPPER_REG_HPP
18 #define NED3PRO_STEPPER_REG_HPP
19 
20 #include <memory>
21 #include "common/model/hardware_type_enum.hpp"
22 
23 namespace ttl_driver
24 {
26  {
27  static constexpr common::model::EHardwareType motor_type = common::model::EHardwareType::STEPPER;
28 
29  static constexpr float PROTOCOL_VERSION = 2.0;
30  static constexpr int MODEL_NUMBER = 2100;
31  static constexpr int VOLTAGE_CONVERSION = 1000;
32 
33  // EEPROM
34 
35  static constexpr uint16_t ADDR_MODEL_NUMBER = 0;
36  using TYPE_MODEL_NUMBER = uint16_t;
37 
38  static constexpr uint16_t ADDR_ID = 7;
39  using TYPE_ID = uint8_t;
40 
41  static constexpr uint16_t ADDR_BAUDRATE = 8;
42  using TYPE_BAUDRATE = uint8_t;
43 
44  static constexpr uint16_t ADDR_OPERATING_MODE = 11;
45  using TYPE_OPERATING_MODE = uint8_t;
46 
47  static constexpr uint16_t ADDR_FIRMWARE_VERSION = 59;
48  using TYPE_FIRMWARE_VERSION = uint32_t;
49 
50  // RAM
51 
52  static constexpr uint16_t ADDR_TORQUE_ENABLE = 64;
53  using TYPE_TORQUE_ENABLE = uint8_t;
54 
55  static constexpr uint16_t ADDR_HW_ERROR_STATUS = 70;
56  using TYPE_HW_ERROR_STATUS = uint8_t;
57 
58  static constexpr float VELOCITY_UNIT = 0.001;
59  static constexpr uint16_t ADDR_GOAL_VELOCITY = 104;
60  using TYPE_GOAL_VELOCITY = uint32_t;
61 
62  // unit = 214.577 RPM2
63  static constexpr uint16_t ADDR_PROFILE_ACCELERATION = 108;
64  using TYPE_PROFILE_ACCELERATION = uint32_t;
65 
66  // unit = 0.001 RPM
67  static constexpr uint16_t ADDR_PROFILE_VELOCITY = 112;
68  using TYPE_PROFILE_VELOCITY = uint32_t;
69 
70  // unit = 0.001 deg
71  static constexpr uint16_t ADDR_GOAL_POSITION = 116;
72  using TYPE_GOAL_POSITION = uint32_t;
73 
74  // not used
75  static constexpr uint16_t ADDR_MOVING_STATUS = 123;
76  using TYPE_MOVING_STATUS = uint8_t;
77 
78  // unit = 0.001 RPM
79  static constexpr uint16_t ADDR_PRESENT_VELOCITY = 128;
80  using TYPE_PRESENT_VELOCITY = uint32_t;
81 
82  // unit = 0.001 deg
83  static constexpr uint16_t ADDR_PRESENT_POSITION = 132;
84  using TYPE_PRESENT_POSITION = uint32_t;
85 
86  // unit = 1mV
87  static constexpr uint16_t ADDR_PRESENT_VOLTAGE = 144;
88  using TYPE_PRESENT_VOLTAGE = uint16_t;
89 
90  static constexpr uint16_t ADDR_PRESENT_TEMPERATURE = 146;
91  using TYPE_PRESENT_TEMPERATURE = uint8_t;
92 
93  static constexpr uint16_t ADDR_CONTROL = 1536;
94  using TYPE_CONTROL = uint32_t;
95 
96  static constexpr uint16_t ADDR_STATUS = 1540;
97  using TYPE_STATUS = uint32_t;
98 
99  static constexpr uint16_t ADDR_ENC_ANGLE = 1544;
100  using TYPE_ENC_ANGLE = uint32_t;
101 
102  // Firmware status
103 
104  static constexpr uint16_t ADDR_FIRMWARE_RUNNING = 8192;
105  using TYPE_FIRMWARE_RUNNING = uint8_t;
106 
107  static constexpr uint16_t ADDR_ENTER_BOOTLOADER = 8193;
108  using TYPE_ENTER_BOOTLOADER = uint32_t;
109 
110  static constexpr uint16_t ADDR_OTA_BEGIN = 8197;
111  using TYPE_OTA_BEGIN = uint8_t;
112 
113  static constexpr uint16_t ADDR_OTA_WRITE = 8198;
114  using TYPE_OTA_WRITE = uint8_t[520];
115 
116  static constexpr uint16_t ADDR_OTA_END = 8718;
117  using TYPE_OTA_END = uint32_t;
118 
119  static constexpr uint16_t ADDR_OTA_ERASE = 8722;
120  using TYPE_OTA_ERASE = uint32_t;
121  };
122 } // ttl_driver
123 
124 #endif // NED3PRO_STEPPER_REG_HPP
ttl_driver::Ned3ProStepperReg::TYPE_TORQUE_ENABLE
uint8_t TYPE_TORQUE_ENABLE
Definition: ned3pro_stepper_reg.hpp:53
ttl_driver::Ned3ProStepperReg::TYPE_ENC_ANGLE
uint32_t TYPE_ENC_ANGLE
Definition: ned3pro_stepper_reg.hpp:100
ttl_driver::Ned3ProStepperReg::PROTOCOL_VERSION
static constexpr float PROTOCOL_VERSION
Definition: ned3pro_stepper_reg.hpp:29
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_VELOCITY
static constexpr uint16_t ADDR_PRESENT_VELOCITY
Definition: ned3pro_stepper_reg.hpp:79
ttl_driver::Ned3ProStepperReg::ADDR_ENTER_BOOTLOADER
static constexpr uint16_t ADDR_ENTER_BOOTLOADER
Definition: ned3pro_stepper_reg.hpp:107
ttl_driver::Ned3ProStepperReg::ADDR_STATUS
static constexpr uint16_t ADDR_STATUS
Definition: ned3pro_stepper_reg.hpp:96
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_VOLTAGE
uint16_t TYPE_PRESENT_VOLTAGE
Definition: ned3pro_stepper_reg.hpp:88
ttl_driver::Ned3ProStepperReg::ADDR_ENC_ANGLE
static constexpr uint16_t ADDR_ENC_ANGLE
Definition: ned3pro_stepper_reg.hpp:99
ttl_driver::Ned3ProStepperReg::ADDR_HW_ERROR_STATUS
static constexpr uint16_t ADDR_HW_ERROR_STATUS
Definition: ned3pro_stepper_reg.hpp:55
ttl_driver::Ned3ProStepperReg
Definition: ned3pro_stepper_reg.hpp:25
ttl_driver::Ned3ProStepperReg::ADDR_TORQUE_ENABLE
static constexpr uint16_t ADDR_TORQUE_ENABLE
Definition: ned3pro_stepper_reg.hpp:52
ttl_driver::Ned3ProStepperReg::TYPE_PROFILE_VELOCITY
uint32_t TYPE_PROFILE_VELOCITY
Definition: ned3pro_stepper_reg.hpp:68
ttl_driver::Ned3ProStepperReg::ADDR_OPERATING_MODE
static constexpr uint16_t ADDR_OPERATING_MODE
Definition: ned3pro_stepper_reg.hpp:44
ttl_driver::Ned3ProStepperReg::VOLTAGE_CONVERSION
static constexpr int VOLTAGE_CONVERSION
Definition: ned3pro_stepper_reg.hpp:31
ttl_driver::Ned3ProStepperReg::ADDR_OTA_ERASE
static constexpr uint16_t ADDR_OTA_ERASE
Definition: ned3pro_stepper_reg.hpp:119
ttl_driver::Ned3ProStepperReg::TYPE_HW_ERROR_STATUS
uint8_t TYPE_HW_ERROR_STATUS
Definition: ned3pro_stepper_reg.hpp:56
ttl_driver::Ned3ProStepperReg::TYPE_FIRMWARE_VERSION
uint32_t TYPE_FIRMWARE_VERSION
Definition: ned3pro_stepper_reg.hpp:48
ttl_driver::Ned3ProStepperReg::TYPE_STATUS
uint32_t TYPE_STATUS
Definition: ned3pro_stepper_reg.hpp:97
ttl_driver::Ned3ProStepperReg::ADDR_MODEL_NUMBER
static constexpr uint16_t ADDR_MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:35
ttl_driver::Ned3ProStepperReg::TYPE_OTA_BEGIN
uint8_t TYPE_OTA_BEGIN
Definition: ned3pro_stepper_reg.hpp:111
ttl_driver::Ned3ProStepperReg::motor_type
static constexpr common::model::EHardwareType motor_type
Definition: ned3pro_stepper_reg.hpp:27
ttl_driver::Ned3ProStepperReg::TYPE_OTA_ERASE
uint32_t TYPE_OTA_ERASE
Definition: ned3pro_stepper_reg.hpp:120
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_TEMPERATURE
static constexpr uint16_t ADDR_PRESENT_TEMPERATURE
Definition: ned3pro_stepper_reg.hpp:90
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_POSITION
static constexpr uint16_t ADDR_PRESENT_POSITION
Definition: ned3pro_stepper_reg.hpp:83
ttl_driver::Ned3ProStepperReg::MODEL_NUMBER
static constexpr int MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:30
ttl_driver::Ned3ProStepperReg::ADDR_CONTROL
static constexpr uint16_t ADDR_CONTROL
Definition: ned3pro_stepper_reg.hpp:93
ttl_driver::Ned3ProStepperReg::TYPE_FIRMWARE_RUNNING
uint8_t TYPE_FIRMWARE_RUNNING
Definition: ned3pro_stepper_reg.hpp:105
ttl_driver::Ned3ProStepperReg::TYPE_ID
uint8_t TYPE_ID
Definition: ned3pro_stepper_reg.hpp:39
ttl_driver::Ned3ProStepperReg::TYPE_PROFILE_ACCELERATION
uint32_t TYPE_PROFILE_ACCELERATION
Definition: ned3pro_stepper_reg.hpp:64
ttl_driver::Ned3ProStepperReg::TYPE_OTA_WRITE
uint8_t[520] TYPE_OTA_WRITE
Definition: ned3pro_stepper_reg.hpp:114
ttl_driver::Ned3ProStepperReg::TYPE_OPERATING_MODE
uint8_t TYPE_OPERATING_MODE
Definition: ned3pro_stepper_reg.hpp:45
ttl_driver::Ned3ProStepperReg::ADDR_FIRMWARE_RUNNING
static constexpr uint16_t ADDR_FIRMWARE_RUNNING
Definition: ned3pro_stepper_reg.hpp:104
ttl_driver::Ned3ProStepperReg::ADDR_FIRMWARE_VERSION
static constexpr uint16_t ADDR_FIRMWARE_VERSION
Definition: ned3pro_stepper_reg.hpp:47
ttl_driver
Definition: abstract_dxl_driver.hpp:30
ttl_driver::Ned3ProStepperReg::ADDR_PROFILE_ACCELERATION
static constexpr uint16_t ADDR_PROFILE_ACCELERATION
Definition: ned3pro_stepper_reg.hpp:63
ttl_driver::Ned3ProStepperReg::ADDR_PROFILE_VELOCITY
static constexpr uint16_t ADDR_PROFILE_VELOCITY
Definition: ned3pro_stepper_reg.hpp:67
ttl_driver::Ned3ProStepperReg::TYPE_MODEL_NUMBER
uint16_t TYPE_MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:36
ttl_driver::Ned3ProStepperReg::ADDR_OTA_BEGIN
static constexpr uint16_t ADDR_OTA_BEGIN
Definition: ned3pro_stepper_reg.hpp:110
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_TEMPERATURE
uint8_t TYPE_PRESENT_TEMPERATURE
Definition: ned3pro_stepper_reg.hpp:91
ttl_driver::Ned3ProStepperReg::ADDR_ID
static constexpr uint16_t ADDR_ID
Definition: ned3pro_stepper_reg.hpp:38
ttl_driver::Ned3ProStepperReg::TYPE_CONTROL
uint32_t TYPE_CONTROL
Definition: ned3pro_stepper_reg.hpp:94
ttl_driver::Ned3ProStepperReg::ADDR_OTA_WRITE
static constexpr uint16_t ADDR_OTA_WRITE
Definition: ned3pro_stepper_reg.hpp:113
ttl_driver::Ned3ProStepperReg::VELOCITY_UNIT
static constexpr float VELOCITY_UNIT
Definition: ned3pro_stepper_reg.hpp:58
ttl_driver::Ned3ProStepperReg::ADDR_BAUDRATE
static constexpr uint16_t ADDR_BAUDRATE
Definition: ned3pro_stepper_reg.hpp:41
ttl_driver::Ned3ProStepperReg::TYPE_MOVING_STATUS
uint8_t TYPE_MOVING_STATUS
Definition: ned3pro_stepper_reg.hpp:76
ttl_driver::Ned3ProStepperReg::TYPE_BAUDRATE
uint8_t TYPE_BAUDRATE
Definition: ned3pro_stepper_reg.hpp:42
ttl_driver::Ned3ProStepperReg::ADDR_GOAL_POSITION
static constexpr uint16_t ADDR_GOAL_POSITION
Definition: ned3pro_stepper_reg.hpp:71
ttl_driver::Ned3ProStepperReg::TYPE_OTA_END
uint32_t TYPE_OTA_END
Definition: ned3pro_stepper_reg.hpp:117
ttl_driver::Ned3ProStepperReg::TYPE_GOAL_VELOCITY
uint32_t TYPE_GOAL_VELOCITY
Definition: ned3pro_stepper_reg.hpp:60
ttl_driver::Ned3ProStepperReg::ADDR_OTA_END
static constexpr uint16_t ADDR_OTA_END
Definition: ned3pro_stepper_reg.hpp:116
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_VOLTAGE
static constexpr uint16_t ADDR_PRESENT_VOLTAGE
Definition: ned3pro_stepper_reg.hpp:87
ttl_driver::Ned3ProStepperReg::ADDR_GOAL_VELOCITY
static constexpr uint16_t ADDR_GOAL_VELOCITY
Definition: ned3pro_stepper_reg.hpp:59
ttl_driver::Ned3ProStepperReg::TYPE_GOAL_POSITION
uint32_t TYPE_GOAL_POSITION
Definition: ned3pro_stepper_reg.hpp:72
ttl_driver::Ned3ProStepperReg::TYPE_ENTER_BOOTLOADER
uint32_t TYPE_ENTER_BOOTLOADER
Definition: ned3pro_stepper_reg.hpp:108
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_POSITION
uint32_t TYPE_PRESENT_POSITION
Definition: ned3pro_stepper_reg.hpp:84
ttl_driver::Ned3ProStepperReg::ADDR_MOVING_STATUS
static constexpr uint16_t ADDR_MOVING_STATUS
Definition: ned3pro_stepper_reg.hpp:75
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_VELOCITY
uint32_t TYPE_PRESENT_VELOCITY
Definition: ned3pro_stepper_reg.hpp:80


ttl_driver
Author(s): Clement Cocquempot
autogenerated on Wed May 21 2025 08:30:14