Rev 3941 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3941 | Rev 3955 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <interrupt.h> |
35 | #include <interrupt.h> |
36 | #include <ipc/irq.h> |
- | |
37 | #include <console/chardev.h> |
36 | #include <console/chardev.h> |
38 | #include <arch/drivers/msim.h> |
37 | #include <arch/drivers/msim.h> |
39 | #include <arch/cp0.h> |
38 | #include <arch/cp0.h> |
40 | #include <console/console.h> |
39 | #include <console/console.h> |
41 | #include <sysinfo/sysinfo.h> |
40 | #include <sysinfo/sysinfo.h> |
Line 93... | Line 92... | ||
93 | } |
92 | } |
94 | 93 | ||
95 | /** Process keyboard interrupt. */ |
94 | /** Process keyboard interrupt. */ |
96 | static void msim_irq_handler(irq_t *irq) |
95 | static void msim_irq_handler(irq_t *irq) |
97 | { |
96 | { |
98 | if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
- | |
99 | ipc_irq_send_notif(irq); |
- | |
100 | else { |
- | |
101 | char ch = 0; |
97 | char ch = 0; |
102 | 98 | ||
103 | ch = *((char *) MSIM_KBD_ADDRESS); |
99 | ch = *((char *) MSIM_KBD_ADDRESS); |
104 | if (ch =='\r') |
100 | if (ch =='\r') |
105 | ch = '\n'; |
101 | ch = '\n'; |
106 | if (ch == 0x7f) |
102 | if (ch == 0x7f) |
107 | ch = '\b'; |
103 | ch = '\b'; |
108 | chardev_push_character(&console, ch); |
104 | chardev_push_character(&console, ch); |
109 | } |
105 | } |
110 | } |
- | |
111 | 106 | ||
112 | static irq_ownership_t msim_claim(irq_t *irq) |
107 | static irq_ownership_t msim_claim(irq_t *irq) |
113 | { |
108 | { |
114 | return IRQ_ACCEPT; |
109 | return IRQ_ACCEPT; |
115 | } |
110 | } |