Rev 1844 | Rev 1911 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1844 | Rev 1849 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | 37 | ||
38 | #include <arch/types.h> |
38 | #include <arch/types.h> |
39 | #include <arch/drivers/kbd.h> |
39 | #include <arch/drivers/kbd.h> |
40 | 40 | ||
41 | #define RBR_REG 0 /** Receiver Buffer Register. */ |
41 | #define RBR_REG 0 /** Receiver Buffer Register. */ |
- | 42 | #define IER_REG 1 /** Interrupt Enable Register. */ |
|
42 | #define LSR_REG 5 /** Line Status Register. */ |
43 | #define LSR_REG 5 /** Line Status Register. */ |
43 | 44 | ||
44 | static inline uint8_t ns16550_rbr_read(void) |
45 | static inline uint8_t ns16550_rbr_read(void) |
45 | { |
46 | { |
46 | return kbd_virt_address[RBR_REG]; |
47 | return kbd_virt_address[RBR_REG]; |
47 | } |
48 | } |
48 | 49 | ||
- | 50 | static inline uint8_t ns16550_ier_read(void) |
|
- | 51 | { |
|
- | 52 | return kbd_virt_address[IER_REG]; |
|
- | 53 | } |
|
- | 54 | ||
- | 55 | static inline void ns16550_ier_write(uint8_t v) |
|
- | 56 | { |
|
- | 57 | kbd_virt_address[IER_REG] = v; |
|
- | 58 | } |
|
- | 59 | ||
49 | static inline uint8_t ns16550_lsr_read(void) |
60 | static inline uint8_t ns16550_lsr_read(void) |
50 | { |
61 | { |
51 | return kbd_virt_address[LSR_REG]; |
62 | return kbd_virt_address[LSR_REG]; |
52 | } |
63 | } |
53 | 64 |