Project

General

Profile

Revision 336

even more docs

View differences:

keyboard.h
39 39
#define MINUS_MAKE_CODE         0x35
40 40
/** @brief Minus (-) Break Code */
41 41
#define MINUS_BREAK_CODE        0xB5
42
/** @brief Enter Make Code */
42 43
#define ENTER_MAKE_CODE         0x1C
44
/** @brief Enter Break Code */
43 45
#define ENTER_BREAK_CODE        0x9C
46
/** @brief Backspace Make Code */
44 47
#define BACKSPACE_MAKE_CODE     0x0E
48
/** @brief Backspace Break Code */
45 49
#define BACKSPACE_BREAK_CODE    0x8E
50
/** @brief ESC Make Code */
51
#define ESC_MAKE_CODE           0x01
52
/** @brief ESC Break Code */
53
#define ESC_BREAK_CODE          0x81
46 54

  
47
#define ESC_MAKE_CODE           0x01    /** @brief ESC Make Code */
48
#define ESC_BREAK_CODE          0x81    /** @brief ESC Break Code */
49

  
50 55
/**
51 56
 * @brief Subscribes Keyboard Interrupts and disables Minix Default IH.
52 57
 * @param interrupt_bit Bit of Interrupt Vector that will be set when Keyboard Interrupt is pending
......
56 61
 */
57 62
int (subscribe_kbc_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
58 63

  
64
/**
65
 * @brief Get scancode read from keyboard.
66
 * @return  Pointer to begin of scancode array (array with size 2)
67
 */
59 68
const uint8_t* keyboard_get_scancode(void);
69
/**
70
 * @brief Get state of reading (done).
71
 * @return  1 if done, 0 otherwise
72
 */
60 73
int keyboard_get_done(void);
74
/**
75
 * @brief Get size of read scancode (1 or 2).
76
 * @return Size of scancode
77
 */
61 78
int keyboard_get_size(void);
79
/**
80
 * @brief Get error code of previous run of kbc_ih, if an error occured.
81
 * @return  Error code, or 0 if successful
82
 */
62 83
int keyboard_get_error(void);
63

  
84
/**
85
 * @brief KBC interrupt handler. Reads scancodes.
86
 */
64 87
void (kbc_ih)(void);
65

  
88
/**
89
 * @brief Poll keyboard for scancodes.
90
 * @param   bytes   Array to put read bytes (up to 2)
91
 * @param   size    Number of ready bytes (1 or 2)
92
 * @return  SUCCESS if operation was successful, other value otherwise
93
 */
66 94
int (keyboard_poll)(uint8_t bytes[], uint8_t *size);
67 95

  
68 96
/**

Also available in: Unified diff