Skip to content

Commit

Permalink
WiP - debug
Browse files Browse the repository at this point in the history
  • Loading branch information
alvieboy committed Nov 2, 2009
1 parent 14e507e commit e06d7e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UI/serial.c
Expand Up @@ -231,8 +231,10 @@ int init(char *device)

fd = open(device, O_RDWR);
if (fd<0) {
perror("open");
return -1;
}
dprintf(stderr,"Opened device '%s'\n", fd);

tcgetattr(fd, &termset);

Expand Down Expand Up @@ -267,7 +269,8 @@ int init(char *device)
if ((watcher=g_io_add_watch(channel, G_IO_IN, &serial_data_ready, NULL))<0) {
fprintf(stderr,"Cannot add watch\n");
}
//fprintf(stderr,"Channel set up OK\n");

fprintf(stderr,"Channel set up OK\n");
return 0;

}
Expand All @@ -291,6 +294,7 @@ void serial_set_trigger_invert(gboolean active)
int serial_run( void (*setdata)(unsigned char *data,size_t size))
{
sdata = setdata;
fprintf(stderr,"Pinging device...\n");
send_packet(COMMAND_PING,(unsigned char*)"BABA",4);
loop();
return 0;
Expand Down

0 comments on commit e06d7e8

Please sign in to comment.