Project

General

Profile

Revision 334

added more docs

View differences:

keyboard.h
1
#ifndef KEYBOARD_H_INCLUDED
2
#define KEYBOARD_H_INCLUDED
3

  
1 4
/**
2
 * This file concerns everything related to the keyboard
5
 * @defgroup    keyboard    keyboard
6
 * @ingroup kbc
7
 * @brief Keyboard module.
8
 *
9
 * @{
3 10
 */
4 11

  
5
#ifndef KEYBOARD_H_INCLUDED
6
#define KEYBOARD_H_INCLUDED
7

  
8 12
#include "kbc.h"
9 13

  
10
#define W_MAKE_CODE             0x11    /** @brief W Make Code */
11
#define W_BREAK_CODE            0x91    /** @brief W Break Code */
12
#define A_MAKE_CODE             0x1E    /** @brief A Make Code */
13
#define A_BREAK_CODE            0x9E    /** @brief A Break Code */
14
#define S_MAKE_CODE             0x1F    /** @brief S Make Code */
15
#define S_BREAK_CODE            0x9F    /** @brief S Break Code */
16
#define D_MAKE_CODE             0x20    /** @brief D Make Code */
17
#define D_BREAK_CODE            0xA0    /** @brief D Break Code */
18
#define CTRL_MAKE_CODE          0x1D    /** @brief CTRL Make Code */
19
#define CTRL_BREAK_CODE         0x9D    /** @brief CTRL Break Code */
20
#define PLUS_MAKE_CODE          0x1A    /** @brief Plus (+) Make Code */
21
#define PLUS_BREAK_CODE         0x9A    /** @brief Plus (+) Break Code */
22
#define MINUS_MAKE_CODE         0x35    /** @brief Minus (-) Make Code */
23
#define MINUS_BREAK_CODE        0xB5    /** @brief Minus (-) Break Code */
14
/** @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
24 42
#define ENTER_MAKE_CODE         0x1C
25 43
#define ENTER_BREAK_CODE        0x9C
26 44
#define BACKSPACE_MAKE_CODE     0x0E
......
30 48
#define ESC_BREAK_CODE          0x81    /** @brief ESC Break Code */
31 49

  
32 50
/**
33
 * @brief Subscribes Keyboard Interrupts and disables Minix Default IH
51
 * @brief Subscribes Keyboard Interrupts and disables Minix Default IH.
34 52
 * @param interrupt_bit Bit of Interrupt Vector that will be set when Keyboard Interrupt is pending
35 53
 * @param interrupt_id Keyboard Interrupt ID to specify the Keyboard Interrupt in other calls
36 54
 * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
......
38 56
 */
39 57
int (subscribe_kbc_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
40 58

  
41

  
42 59
const uint8_t* keyboard_get_scancode(void);
43 60
int keyboard_get_done(void);
44 61
int keyboard_get_size(void);
......
48 65

  
49 66
int (keyboard_poll)(uint8_t bytes[], uint8_t *size);
50 67

  
68
/**
69
 * @}
70
 */
71

  
51 72
#endif //KEYBOARD_H_INCLUDED

Also available in: Unified diff