Rev 1897 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1897 | Rev 1931 | ||
---|---|---|---|
Line 103... | Line 103... | ||
103 | void kkbdpoll(void *arg) |
103 | void kkbdpoll(void *arg) |
104 | { |
104 | { |
105 | thread_detach(THREAD); |
105 | thread_detach(THREAD); |
106 | 106 | ||
107 | #ifdef CONFIG_Z8530 |
107 | #ifdef CONFIG_Z8530 |
108 | if (kbd_type == KBD_Z8530) |
108 | if (kbd_type == KBD_Z8530) { |
- | 109 | /* |
|
- | 110 | * The z8530 driver is interrupt-driven. |
|
- | 111 | */ |
|
109 | return; |
112 | return; |
- | 113 | } |
|
110 | #endif |
114 | #endif |
111 | 115 | ||
112 | while (1) { |
116 | while (1) { |
113 | #ifdef CONFIG_NS16550 |
117 | #ifdef CONFIG_NS16550 |
114 | if (kbd_type == KBD_NS16550) |
118 | if (kbd_type == KBD_NS16550) |
Line 121... | Line 125... | ||
121 | /** Acquire console back for kernel |
125 | /** Acquire console back for kernel |
122 | * |
126 | * |
123 | */ |
127 | */ |
124 | void arch_grab_console(void) |
128 | void arch_grab_console(void) |
125 | { |
129 | { |
- | 130 | switch (kbd_type) { |
|
126 | #ifdef CONFIG_Z8530 |
131 | #ifdef CONFIG_Z8530 |
127 | if (kbd_type == KBD_Z8530) |
132 | case KBD_Z8530: |
128 | z8530_grab(); |
133 | z8530_grab(); |
- | 134 | break; |
|
- | 135 | #endif |
|
- | 136 | #ifdef CONFIG_NS16550 |
|
- | 137 | case KBD_NS16550: |
|
- | 138 | ns16550_grab(); |
|
- | 139 | break; |
|
129 | #endif |
140 | #endif |
- | 141 | default: |
|
- | 142 | break; |
|
- | 143 | } |
|
130 | } |
144 | } |
131 | 145 | ||
132 | /** Return console to userspace |
146 | /** Return console to userspace |
133 | * |
147 | * |
134 | */ |
148 | */ |
135 | void arch_release_console(void) |
149 | void arch_release_console(void) |
136 | { |
150 | { |
- | 151 | switch (kbd_type) { |
|
137 | #ifdef CONFIG_Z8530 |
152 | #ifdef CONFIG_Z8530 |
138 | if (kbd_type == KBD_Z8530) |
153 | case KBD_Z8530: |
139 | z8530_release(); |
154 | z8530_release(); |
- | 155 | break; |
|
140 | #endif |
156 | #endif |
- | 157 | #ifdef CONFIG_NS16550 |
|
- | 158 | case KBD_NS16550: |
|
- | 159 | ns16550_release(); |
|
- | 160 | break; |
|
- | 161 | #endif |
|
- | 162 | default: |
|
- | 163 | break; |
|
- | 164 | } |
|
141 | } |
165 | } |
142 | 166 | ||
143 | /** @} |
167 | /** @} |
144 | */ |
168 | */ |