feetech.h File Reference

Interface definition for Feetech devices driver. More...

Detailed Description

Interface definition for Feetech devices driver.

Author
Loïc Dauphin loic..nosp@m.daup.nosp@m.hin@i.nosp@m.nria.nosp@m..fr

Definition in file feetech.h.

#include <stdlib.h>
#include "feetech_protocol.h"
#include "uart_half_duplex.h"
+ Include dependency graph for feetech.h:

Go to the source code of this file.

Data Structures

struct  feetech_t
 Descriptor struct for a feetech device. More...
 

Typedefs

typedef uint8_t feetech_id_t
 device id type
 
typedef uint8_t feetech_addr_t
 address type
 

Enumerations

enum  { FEETECH_OK, FEETECH_TIMEOUT, FEETECH_BUFFER_TOO_SMALL, FEETECH_INVALID_MESSAGE }
 Possible feetech return values. More...
 

Functions

int feetech_ping (uart_half_duplex_t *stream, feetech_id_t id)
 Send a PING message to a device. More...
 
void feetech_init (feetech_t *device, uart_half_duplex_t *stream, feetech_id_t id)
 Initialize a Feetech device. More...
 
int feetech_write8 (const feetech_t *device, feetech_addr_t addr, uint8_t value)
 Write to a device 8bits address. More...
 
int feetech_write16 (const feetech_t *device, feetech_addr_t addr, uint16_t value)
 Write to a device 16bits address. More...
 
int feetech_write (const feetech_t *device, feetech_addr_t addr, const uint8_t *data, size_t length)
 Write to a device address. More...
 
int feetech_read8 (const feetech_t *device, feetech_addr_t addr, uint8_t *value)
 Read from a device 8bits address. More...
 
int feetech_read16 (const feetech_t *device, feetech_addr_t addr, uint16_t *value)
 Read from a device 16bits address. More...
 
int feetech_read (const feetech_t *device, feetech_addr_t addr, uint8_t *data, size_t length)
 Read from a device address. More...