12 #define _POSIX_C_SOURCE 199309L
21 char reply[256] = { 0 };
23 const struct timespec ts = { 0, 100000000 };
53 char reply[256] = { 0 };
54 char *device_name =
"/dev/ttyUSB0";
58 printf(
"Could not connect to device %s.\n", device_name);
66 printf(
"Read no reply from device %s. "
67 "It may be running at a different baud rate "
68 "and/or in the binary protocol.\n", device_name);
77 za_send(port,
"/move abs 100000\n");
void poll_until_idle(z_port port)
int za_connect(z_port *port, const char *port_name)
int za_receive(z_port port, char *destination, int length)
int za_decode(struct za_reply *destination, const char *reply, size_t sMaxSz)
int za_send(z_port port, const char *command, size_t sMaxSz)
int za_disconnect(z_port port)
Provides a set of functions for interacting with Zaber devices in the ASCII protocol.