Revision 66
minor change, added errors to lab3
keyboard.c | ||
---|---|---|
5 | 5 |
#include "kbc.h" |
6 | 6 |
#include "kbc_macros.h" |
7 | 7 |
#include "utils.h" |
8 |
#include "errors.h" |
|
8 | 9 |
|
9 | 10 |
int (subscribe_keyboard_interrupt)(uint8_t interrupt_bit, int *interrupt_id) { |
10 |
if (interrupt_id == NULL) return 1;
|
|
11 |
if (interrupt_id == NULL) return NULL_PTR;
|
|
11 | 12 |
*interrupt_id = interrupt_bit; |
12 |
return (sys_irqsetpolicy(KBC_IRQ, IRQ_REENABLE | IRQ_EXCLUSIVE, interrupt_id)); |
|
13 |
if(sys_irqsetpolicy(KBC_IRQ, IRQ_REENABLE | IRQ_EXCLUSIVE, interrupt_id)) return SBCR_ERROR; |
|
14 |
return SUCCESS; |
|
13 | 15 |
} |
14 | 16 |
|
15 | 17 |
int done = 1; |
Also available in: Unified diff