Added sine test.

This commit is contained in:
James Goppert
2013-07-28 00:05:56 -04:00
parent a8ac56b9e5
commit f3bfbd87b1
3 changed files with 59 additions and 0 deletions
+18
View File
@@ -136,6 +136,24 @@ int md25_main(int argc, char *argv[])
exit(0);
}
if (!strcmp(argv[1], "sine")) {
if (argc < 4) {
printf("usage: md25 sine bus address\n");
exit(0);
}
const char *deviceName = "/dev/md25";
uint8_t bus = strtoul(argv[2], nullptr, 0);
uint8_t address = strtoul(argv[3], nullptr, 0);
md25Sine(deviceName, bus, address);
exit(0);
}
if (!strcmp(argv[1], "probe")) {
if (argc < 4) {
printf("usage: md25 probe bus address\n");