Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4329 → Rev 4330

/trunk/uspace/srv/kbd/port/sgcn.c
42,6 → 42,7
#include <sysinfo.h>
#include <stdio.h>
#include <thread.h>
#include <bool.h>
 
#define POLL_INTERVAL 10000
 
92,6 → 93,7
/* polling thread */
static void *sgcn_thread_impl(void *arg);
 
static volatile bool polling_disabled = false;
 
/**
* Initializes the SGCN driver.
122,10 → 124,12
 
void kbd_port_yield(void)
{
polling_disabled = true;
}
 
void kbd_port_reclaim(void)
{
polling_disabled = false;
}
 
/**
162,11 → 166,11
(void) arg;
 
while (1) {
sgcn_key_pressed();
if (polling_disabled == false)
sgcn_key_pressed();
usleep(POLL_INTERVAL);
}
}
 
 
/** @}
*/