Changeset 7919cd5 in mainline
- Timestamp:
- 2009-02-21T21:15:33Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d063365
- Parents:
- e78136a
- Location:
- kernel/arch/ppc32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/drivers/cuda.h
re78136a r7919cd5 41 41 extern void cuda_init(devno_t devno, uintptr_t base, size_t size); 42 42 extern int cuda_get_scancode(void); 43 extern void cuda_grab(void);44 extern void cuda_release(void);45 43 46 44 #endif -
kernel/arch/ppc32/src/drivers/cuda.c
re78136a r7919cd5 34 34 35 35 #include <arch/drivers/cuda.h> 36 #include <ipc/irq.h>37 36 #include <arch/asm.h> 38 37 #include <console/console.h> … … 252 251 static void cuda_irq_handler(irq_t *irq) 253 252 { 254 if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) 255 ipc_irq_send_notif(irq); 256 else { 257 int scan_code = cuda_get_scancode(); 253 int scan_code = cuda_get_scancode(); 258 254 259 if (scan_code != -1) { 260 uint8_t scancode = (uint8_t) scan_code; 261 if ((scancode & 0x80) != 0x80) 262 chardev_push_character(&kbrd, lchars[scancode & 0x7f]); 263 } 255 if (scan_code != -1) { 256 uint8_t scancode = (uint8_t) scan_code; 257 if ((scancode & 0x80) != 0x80) 258 chardev_push_character(&kbrd, lchars[scancode & 0x7f]); 264 259 } 265 260 } … … 269 264 return IRQ_ACCEPT; 270 265 } 271 272 273 /** Initialize keyboard and service interrupts using kernel routine */274 void cuda_grab(void)275 {276 if (cuda) {277 ipl_t ipl = interrupts_disable();278 spinlock_lock(&cuda_irq.lock);279 cuda_irq.notif_cfg.notify = false;280 spinlock_unlock(&cuda_irq.lock);281 interrupts_restore(ipl);282 }283 }284 285 286 /** Resume the former interrupt vector */287 void cuda_release(void)288 {289 if (cuda) {290 ipl_t ipl = interrupts_disable();291 spinlock_lock(&cuda_irq.lock);292 if (cuda_irq.notif_cfg.answerbox)293 cuda_irq.notif_cfg.notify = true;294 spinlock_unlock(&cuda_irq.unlock);295 interrupts_restore(ipl);296 }297 }298 299 266 300 267 void cuda_init(devno_t devno, uintptr_t base, size_t size) -
kernel/arch/ppc32/src/ppc32.c
re78136a r7919cd5 157 157 { 158 158 fb_redraw(); 159 cuda_grab();160 159 } 161 160 … … 165 164 void arch_release_console(void) 166 165 { 167 cuda_release();168 166 } 169 167
Note:
See TracChangeset
for help on using the changeset viewer.