Dynamixel protocol definitions.
uint16_t dynamixel_addr_t
register address type
int dynamixel_read8(const dynamixel_t *device, dynamixel_addr_t reg, uint8_t *value)
Read from a device 8bits register.
uint8_t dynamixel_id_t
device id type
int dynamixel_write16(const dynamixel_t *device, dynamixel_addr_t reg, uint16_t value)
Write to a device 16bits register.
int dynamixel_write(const dynamixel_t *device, dynamixel_addr_t reg, const uint8_t *data, size_t length)
Write to a device address.
void dynamixel_init(dynamixel_t *device, uart_half_duplex_t *stream, dynamixel_id_t id)
Initialize a Dynamixel device.
int dynamixel_read16(const dynamixel_t *device, dynamixel_addr_t reg, uint16_t *value)
Read from a device 16bits register.
int dynamixel_ping(uart_half_duplex_t *stream, dynamixel_id_t id)
Send a PING message to a device.
int dynamixel_write8(const dynamixel_t *device, dynamixel_addr_t reg, uint8_t value)
Write to a device 8bits register.
int dynamixel_read(const dynamixel_t *device, dynamixel_addr_t reg, uint8_t *data, size_t length)
Read from a device address.
@ DYNAMIXEL_INVALID_MESSAGE
Invalid message received.
@ DYNAMIXEL_TIMEOUT
No response from the device.
@ DYNAMIXEL_BUFFER_TOO_SMALL
Buffer is too small for the message.
Descriptor struct for a dynamixel device.
uart_half_duplex_t * stream
the stream used
dynamixel_id_t id
the device address
Descriptor struct for half-duplex UART.
Interface definition for half-duplex UART driver.