uint8_t feetech_id_t
device id type
uint8_t feetech_addr_t
address type
int feetech_read16(const feetech_t *device, feetech_addr_t addr, uint16_t *value)
Read from a device 16bits address.
uart_half_duplex_t * stream
the stream used
int feetech_ping(uart_half_duplex_t *stream, feetech_id_t id)
Send a PING message to a device.
int feetech_read(const feetech_t *device, feetech_addr_t addr, uint8_t *data, size_t length)
Read from a device address.
Feetech protocol definitions.
@ FEETECH_TIMEOUT
No response from the device.
int feetech_write16(const feetech_t *device, feetech_addr_t addr, uint16_t value)
Write to a device 16bits address.
Descriptor struct for half-duplex UART.
@ FEETECH_BUFFER_TOO_SMALL
Buffer is too small for the message.
Descriptor struct for a feetech device.
int feetech_read8(const feetech_t *device, feetech_addr_t addr, uint8_t *value)
Read from a device 8bits address.
@ FEETECH_INVALID_MESSAGE
Invalid message received.
int feetech_write8(const feetech_t *device, feetech_addr_t addr, uint8_t value)
Write to a device 8bits address.
int feetech_write(const feetech_t *device, feetech_addr_t addr, const uint8_t *data, size_t length)
Write to a device address.
void feetech_init(feetech_t *device, uart_half_duplex_t *stream, feetech_id_t id)
Initialize a Feetech device.
Interface definition for half-duplex UART driver.
feetech_id_t id
the device address