root / proj / libs / kbc / include / keyboard.h @ 335
History | View | Annotate | Download (2.08 KB)
1 | 334 | up20180642 | #ifndef KEYBOARD_H_INCLUDED
|
---|---|---|---|
2 | #define KEYBOARD_H_INCLUDED
|
||
3 | |||
4 | 145 | up20180655 | /**
|
5 | 334 | up20180642 | * @defgroup keyboard keyboard
|
6 | * @ingroup kbc
|
||
7 | * @brief Keyboard module.
|
||
8 | *
|
||
9 | * @{
|
||
10 | 145 | up20180655 | */
|
11 | |||
12 | 257 | up20180642 | #include "kbc.h" |
13 | |||
14 | 334 | up20180642 | /** @brief W Make Code */
|
15 | #define W_MAKE_CODE 0x11 |
||
16 | /** @brief W Break Code */
|
||
17 | #define W_BREAK_CODE 0x91 |
||
18 | /** @brief A Make Code */
|
||
19 | #define A_MAKE_CODE 0x1E |
||
20 | /** @brief A Break Code */
|
||
21 | #define A_BREAK_CODE 0x9E |
||
22 | /** @brief S Make Code */
|
||
23 | #define S_MAKE_CODE 0x1F |
||
24 | /** @brief S Break Code */
|
||
25 | #define S_BREAK_CODE 0x9F |
||
26 | /** @brief D Make Code */
|
||
27 | #define D_MAKE_CODE 0x20 |
||
28 | /** @brief D Break Code */
|
||
29 | #define D_BREAK_CODE 0xA0 |
||
30 | /** @brief CTRL Make Code */
|
||
31 | #define CTRL_MAKE_CODE 0x1D |
||
32 | /** @brief CTRL Break Code */
|
||
33 | #define CTRL_BREAK_CODE 0x9D |
||
34 | /** @brief Plus (+) Make Code */
|
||
35 | #define PLUS_MAKE_CODE 0x1A |
||
36 | /** @brief Plus (+) Break Code */
|
||
37 | #define PLUS_BREAK_CODE 0x9A |
||
38 | /** @brief Minus (-) Make Code */
|
||
39 | #define MINUS_MAKE_CODE 0x35 |
||
40 | /** @brief Minus (-) Break Code */
|
||
41 | #define MINUS_BREAK_CODE 0xB5 |
||
42 | 298 | up20180642 | #define ENTER_MAKE_CODE 0x1C |
43 | #define ENTER_BREAK_CODE 0x9C |
||
44 | #define BACKSPACE_MAKE_CODE 0x0E |
||
45 | #define BACKSPACE_BREAK_CODE 0x8E |
||
46 | |||
47 | #define ESC_MAKE_CODE 0x01 /** @brief ESC Make Code */ |
||
48 | #define ESC_BREAK_CODE 0x81 /** @brief ESC Break Code */ |
||
49 | |||
50 | 153 | up20180655 | /**
|
51 | 334 | up20180642 | * @brief Subscribes Keyboard Interrupts and disables Minix Default IH.
|
52 | 153 | up20180655 | * @param interrupt_bit Bit of Interrupt Vector that will be set when Keyboard Interrupt is pending
|
53 | * @param interrupt_id Keyboard Interrupt ID to specify the Keyboard Interrupt in other calls
|
||
54 | * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
||
55 | * @see {_ERRORS_H_::errors}
|
||
56 | */
|
||
57 | 145 | up20180655 | int (subscribe_kbc_interrupt)(uint8_t interrupt_bit, int *interrupt_id); |
58 | |||
59 | 321 | up20180642 | const uint8_t* keyboard_get_scancode(void); |
60 | int keyboard_get_done(void); |
||
61 | int keyboard_get_size(void); |
||
62 | int keyboard_get_error(void); |
||
63 | |||
64 | 145 | up20180655 | void (kbc_ih)(void); |
65 | |||
66 | int (keyboard_poll)(uint8_t bytes[], uint8_t *size);
|
||
67 | |||
68 | 334 | up20180642 | /**
|
69 | * @}
|
||
70 | */
|
||
71 | |||
72 | 145 | up20180655 | #endif //KEYBOARD_H_INCLUDED |