Group dxl2_defs¶
Protocol 2.0 IDs, instructions, error codes and byte-order helpers. More...
Public Static Functions¶
| Type | Name |
|---|---|
| uint16_t | dxl2_get_u16 (const uint8_t * data) Read a little-endian 16-bit value. |
| uint32_t | dxl2_get_u32 (const uint8_t * data) Read a little-endian 32-bit value. |
| void | dxl2_put_u16 (uint8_t * data, uint16_t value) Write a 16-bit value in little-endian order. |
| void | dxl2_put_u32 (uint8_t * data, uint32_t value) Write a 32-bit value in little-endian order. |
Macros¶
| Type | Name |
|---|---|
| define | DXL2_BROADCAST_ID 0xFEUBroadcast ID: every device executes the instruction. |
| define | DXL2_ERR_ACCESS 0x07U |
| define | DXL2_ERR_ALERT_BIT 0x80UHardware alert flag: the device has a Hardware Error Status set. |
| define | DXL2_ERR_CRC 0x03U |
| define | DXL2_ERR_DATA_LENGTH 0x05U |
| define | DXL2_ERR_DATA_LIMIT 0x06U |
| define | DXL2_ERR_DATA_RANGE 0x04U |
| define | DXL2_ERR_INSTRUCTION 0x02U |
| define | DXL2_ERR_NONE 0x00U |
| define | DXL2_ERR_RESULT_FAIL 0x01U |
| define | DXL2_INST_ACTION 0x05U |
| define | DXL2_INST_BACKUP 0x20U |
| define | DXL2_INST_BULK_READ 0x92U |
| define | DXL2_INST_BULK_WRITE 0x93U |
| define | DXL2_INST_CLEAR 0x10U |
| define | DXL2_INST_FACTORY_RESET 0x06U |
| define | DXL2_INST_FAST_BULK_READ 0x9AU |
| define | DXL2_INST_FAST_SYNC_READ 0x8AU |
| define | DXL2_INST_PING 0x01U |
| define | DXL2_INST_READ 0x02U |
| define | DXL2_INST_REBOOT 0x08U |
| define | DXL2_INST_REG_WRITE 0x04U |
| define | DXL2_INST_STATUS 0x55UInstruction byte of a Status Packet. |
| define | DXL2_INST_SYNC_READ 0x82U |
| define | DXL2_INST_SYNC_WRITE 0x83U |
| define | DXL2_INST_WRITE 0x03U |
| define | DXL2_MAX_ID 252UHighest ID a device may use. |
Detailed Description¶
Values come from the ROBOTIS Protocol 2.0 specification (https://docs.robotis.com/docs/dxl/protocol/protocol2/).
Public Static Functions Documentation¶
function dxl2_get_u16¶
Read a little-endian 16-bit value.
function dxl2_get_u32¶
Read a little-endian 32-bit value.
function dxl2_put_u16¶
Write a 16-bit value in little-endian order.
function dxl2_put_u32¶
Write a 32-bit value in little-endian order.
Macro Definition Documentation¶
define DXL2_BROADCAST_ID¶
Broadcast ID: every device executes the instruction.
define DXL2_ERR_ACCESS¶
define DXL2_ERR_ALERT_BIT¶
Hardware alert flag: the device has a Hardware Error Status set.
define DXL2_ERR_CRC¶
define DXL2_ERR_DATA_LENGTH¶
define DXL2_ERR_DATA_LIMIT¶
define DXL2_ERR_DATA_RANGE¶
define DXL2_ERR_INSTRUCTION¶
define DXL2_ERR_NONE¶
define DXL2_ERR_RESULT_FAIL¶
define DXL2_INST_ACTION¶
define DXL2_INST_BACKUP¶
define DXL2_INST_BULK_READ¶
define DXL2_INST_BULK_WRITE¶
define DXL2_INST_CLEAR¶
define DXL2_INST_FACTORY_RESET¶
define DXL2_INST_FAST_BULK_READ¶
define DXL2_INST_FAST_SYNC_READ¶
define DXL2_INST_PING¶
define DXL2_INST_READ¶
define DXL2_INST_REBOOT¶
define DXL2_INST_REG_WRITE¶
define DXL2_INST_STATUS¶
Instruction byte of a Status Packet.
define DXL2_INST_SYNC_READ¶
define DXL2_INST_SYNC_WRITE¶
define DXL2_INST_WRITE¶
define DXL2_MAX_ID¶
Highest ID a device may use.