Project

General

Profile

Revision 36

implemented keyboard polling

View differences:

kbc_func.h
34 34
 */
35 35
uint32_t (sys_inb_counter)(int get_increment);
36 36

  
37
/**
38
 * @brief High-level function that polls keyboard for scancode
39
 * High-level function that polls keyboard for scancode of up to 2 bytes. If
40
 * scancode has only 1 byte, the second byte is set to 0x00.
41
 * @param bytes Array of at least 2 bytes to store scancode
42
 * @param size Size of scancode in bytes
43
 * @return 0 if operation was successful, 1 otherwise
44
 */
45
int (kbd_poll)(uint8_t bytes[], uint8_t *size);
46

  
47
/**
48
 * @brief Low-level function for reading byte from keyboard
49
 * Low-level function for reading byte from keyboard. Waits until output buffer
50
 * is full
51
 * @param value Pointer to variable where byte read from keyboard will be stored
52
 * @return 0 if operation was successful, 1 otherwise
53
 */
54
int (kbd_read_byte)(uint8_t *value);
55

  
37 56
#endif

Also available in: Unified diff