Files
@ b4633fb9bccf
Branch filter:
Location: light9/dmx_usb_module/dmx_usb_test.c - annotation
b4633fb9bccf
564 B
text/x-csrc
extract Project class with the larger graph-only methods
Ignore-this: e0d79e45fb053d8b7e228b6eb5687eba
Ignore-this: e0d79e45fb053d8b7e228b6eb5687eba
4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 2b2ad8e7cb9f 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 4e60444605f6 | /*
* $Id: dmx_usb_test.c 40 2004-09-11 11:16:39Z erwin $
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
unsigned char buffer[513];
int fd;
int res;
int i;
fd = open("/dev/dmx0",O_WRONLY);
if (fd < 0) {
perror("open");
exit(-1);
}
for (i = 0; i < 513;i++) {
buffer[i] = i;
}
buffer[512] = 0x55;
while(1) {
res = write(fd, buffer, 513);
if (res < 0){
perror("write");
exit(-1);
}
}
close(fd);
return 0;
}
|