-static sem_t input_semaphore;
-
-char
-ao_serial_getchar(void)
-{
- char c;
- int value;
- char line[100];
-
- sem_getvalue(&input_semaphore, &value);
-// printf ("ao_serial_getchar %d\n", value);
- sem_wait(&input_semaphore);
- c = input_queue[input_head];
- input_head = (input_head + 1) % QUEUE_LEN;
-// sprintf (line, "%02x\n", ((int) c) & 0xff);
-// write(1, line, strlen(line));
- return c;
-}