Esempio n. 1
0
int agi_get_keypress_low() {
	int k;

	while (key_queue_start == key_queue_end)	/* block */
		agi_timer_low();
	key_dequeue(k);

	return k;
}
Esempio n. 2
0
static int win32_get_key (void)
{
	int k;

	while (!win32_keypress())
		win32_new_timer ();

	key_dequeue (k);

	return k;
}
Esempio n. 3
0
int main (void) {
  uint32_t key;

  initialize();

  while (1) {
    key = get_key1(key_dequeue());
    if (key != 0xffffffff) {
      if (key >= 0 && key <= 9) {  // key 0 ~ 9
        keypad_operand(key);
      }
      else if (key == '=') {  // key '='
        keypad_result();
      }
      else if (key == 'x') {  // key 'x' erase
        erase_fndvalue();
      }
      else {  // key '*', '/', '+', '-'
        keypad_operator(key);
      }
    }
  }
}