1/*
2** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3** Distributed under the terms of the MIT License.
4*/
5
6
7#include "keyboard.h"
8#include "rom_calls.h"
9
10#include <boot/platform.h>
11
12
13static uint32
14check_for_key(void)
15{
16	//TODO
17	return 0;
18}
19
20
21extern "C" void
22clear_key_buffer(void)
23{
24	while (check_for_key() != 0)
25		;
26}
27
28
29extern "C" union key
30wait_for_key(void)
31{
32	//TODO
33	union key key;
34
35	return key;
36}
37
38
39extern "C" uint32
40check_for_boot_keys(void)
41{
42	union key key;
43	uint32 options = 0;
44
45	while ((key.d0 = check_for_key()) != 0) {
46		switch (key.code.ascii) {
47			case ' ':
48				options |= BOOT_OPTION_MENU;
49				break;
50			case 0x1b:	// escape
51				options |= BOOT_OPTION_DEBUG_OUTPUT;
52				break;
53			case 0:
54				// evaluate BIOS scan codes
55				// ...
56				break;
57		}
58	}
59
60	dprintf("options = %ld\n", options);
61	return options;
62}
63
64