1 /* vim: set sw=8 ts=8 si et: */
3 * Linux software to communicate with the DDCP
4 * Written by Guido Socher
14 int main(int argc, char *argv[])
21 printf("USAGE: ddcp-script-setval \"u=33\" /dev/ttyUSB0\n");
22 printf("or ddcp-script-setval \"u=33\" /dev/ttyUSB1\n");
28 /* Set up io port correctly, and open it... */
29 fd = open(device, O_WRONLY );
31 fprintf(stderr, "ERROR: open for %s failed.\n",device);
35 usleep(100000); // commands are polled in the avr and it can take 100ms
36 write(fd,str,strlen(str));