20,11 → 20,11 |
|
/** |
------------ |
CVS : $Id: sermouse.c,v 1.1.1.1 2002-03-29 14:12:49 pj Exp $ |
CVS : $Id: sermouse.c,v 1.2 2002-11-11 08:41:31 pj Exp $ |
|
File: $File$ |
Revision: $Revision: 1.1.1.1 $ |
Last update: $Date: 2002-03-29 14:12:49 $ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2002-11-11 08:41:31 $ |
------------ |
|
Author: Gerardo Lamastra |
84,6 → 84,7 |
//#include <cons.h> |
|
#include <kernel/kern.h> |
#include <time.h> |
//#include "sys/sys.h" |
//#include "vm.h" |
//#include "kern.h" |
405,15 → 406,19 |
int port; |
int ret; |
int found; |
struct timespec delay; |
|
delay.tv_sec = 0; |
delay.tv_nsec = 500000000; |
|
found=0; |
for (port=COM1;port<=COM4;port++) { |
ret=com_open(port,1200,NONE,7,1); |
if (ret==1) { |
com_write(port,MCR,0x0e); |
task_delay(500000l); /* necessary? */ |
nanosleep(&delay,NULL); /* necessary? */ |
com_write(port,MCR,0x0f); |
task_delay(500000l); /* necessary? */ |
nanosleep(&delay,NULL); /* necessary? */ |
ret=sem_wait(&com_link[mouse_port].rx_sem); |
if (ret==TRUE) { |
if (*(com_link[mouse_port].rx_buf)=='M') found=1; |