120cbef82SFrançois Revol /* 220cbef82SFrançois Revol ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3*3bb30583SFrançois Revol ** Distributed under the terms of the MIT License. 420cbef82SFrançois Revol */ 520cbef82SFrançois Revol 620cbef82SFrançois Revol 720cbef82SFrançois Revol #include "keyboard.h" 820cbef82SFrançois Revol 920cbef82SFrançois Revol #include <boot/platform.h> 1020cbef82SFrançois Revol 1120cbef82SFrançois Revol 1220cbef82SFrançois Revol /** Note, checking for keys doesn't seem to work in graphics 1320cbef82SFrançois Revol * mode, at least in Bochs. 1420cbef82SFrançois Revol */ 1520cbef82SFrançois Revol 1620cbef82SFrançois Revol static uint16 check_for_key(void)1720cbef82SFrançois Revolcheck_for_key(void) 1820cbef82SFrançois Revol { 1920cbef82SFrançois Revol return 0; 2020cbef82SFrançois Revol } 2120cbef82SFrançois Revol 2220cbef82SFrançois Revol 2320cbef82SFrançois Revol extern "C" void clear_key_buffer(void)2420cbef82SFrançois Revolclear_key_buffer(void) 2520cbef82SFrançois Revol { 2620cbef82SFrançois Revol while (check_for_key() != 0) 2720cbef82SFrançois Revol ; 2820cbef82SFrançois Revol } 2920cbef82SFrançois Revol 3020cbef82SFrançois Revol 3120cbef82SFrançois Revol extern "C" union key wait_for_key(void)3220cbef82SFrançois Revolwait_for_key(void) 3320cbef82SFrançois Revol { 3420cbef82SFrançois Revol union key key; 3520cbef82SFrançois Revol key.ax=0; 3620cbef82SFrançois Revol return key; 3720cbef82SFrançois Revol } 3820cbef82SFrançois Revol 3920cbef82SFrançois Revol 4020cbef82SFrançois Revol extern "C" uint32 check_for_boot_keys(void)4120cbef82SFrançois Revolcheck_for_boot_keys(void) 4220cbef82SFrançois Revol { 4320cbef82SFrançois Revol return 0; 4420cbef82SFrançois Revol } 4520cbef82SFrançois Revol 46