Mercurial > hg > fxanalyse
diff dds.c @ 213:fcc988c6f841
Fix ad9956 sweep rate setting. Disable clock divider on init. Simplify
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 14 Apr 2014 12:43:25 +0200 |
parents | c700a2d38fb8 |
children |
line wrap: on
line diff
--- a/dds.c Mon Mar 31 17:03:43 2014 +0200 +++ b/dds.c Mon Apr 14 12:43:25 2014 +0200 @@ -17,20 +17,13 @@ #include <stdarg.h> #endif -#include "dds.h" int msend(int fd, char *buffer, int n) { - int r; - buffer[n++] = '\r'; buffer[n++] = '\n'; - r = send(fd, buffer, n, 0); - if (r < 0) - return r; - - return 0; + return send(fd, buffer, n, 0); } @@ -69,7 +62,7 @@ if (r < 0) return r; - if (! streq(buffer, "OK")) + if (strcmp(buffer, "OK") != 0) return -1; return 0;