Changeset af9a7c5 in mainline
- Timestamp:
- 2005-12-12T15:38:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93b84b3
- Parents:
- c0b7f00
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/i8042.h
rc0b7f00 raf9a7c5 43 43 #define SC_UPARR 0x48 44 44 #define SC_DOWNARR 0x50 45 #define SC_DELETE 0x53 46 #define SC_HOME 0x47 47 #define SC_END 0x4f 45 48 46 49 extern void i8042_init(void); -
arch/ia32/src/drivers/i8042.c
rc0b7f00 raf9a7c5 333 333 chardev_push_character(&kbrd, 0x42); 334 334 break; 335 case SC_HOME: 336 chardev_push_character(&kbrd, 0x1b); 337 chardev_push_character(&kbrd, 0x4f); 338 chardev_push_character(&kbrd, 0x48); 339 break; 340 case SC_END: 341 chardev_push_character(&kbrd, 0x1b); 342 chardev_push_character(&kbrd, 0x4f); 343 chardev_push_character(&kbrd, 0x46); 344 break; 345 case SC_DELETE: 346 chardev_push_character(&kbrd, 0x1b); 347 chardev_push_character(&kbrd, 0x5b); 348 chardev_push_character(&kbrd, 0x33); 349 chardev_push_character(&kbrd, 0x7e); 350 break; 335 351 default: 336 352 letter = is_lower(ascii); -
arch/mips32/include/drivers/arc.h
rc0b7f00 raf9a7c5 216 216 extern void arc_print_devices(void); 217 217 void arc_frame_init(void); 218 chardev_t *arc_console(void);218 void arc_console(void); 219 219 220 220 #endif -
arch/mips32/include/drivers/msim.h
rc0b7f00 raf9a7c5 37 37 #define MSIM_KBD_IRQ 2 38 38 39 chardev_t *msim_console(void);39 void msim_console(void); 40 40 41 41 #endif -
arch/mips32/include/drivers/serial.h
rc0b7f00 raf9a7c5 57 57 }serial_t; 58 58 59 chardev_t *serial_console(void);59 void serial_console(void); 60 60 int serial_init(void); 61 61 -
arch/mips32/src/console.c
rc0b7f00 raf9a7c5 35 35 void console_init(void) 36 36 { 37 chardev_t *console;38 39 37 if (arc_enabled()) { 40 console =arc_console();38 arc_console(); 41 39 } else if (serial_init()) { 42 console =serial_console();40 serial_console(); 43 41 } else 44 console = msim_console(); 45 46 stdin = console; 47 stdout = console; 42 msim_console(); 48 43 } -
arch/mips32/src/drivers/arc.c
rc0b7f00 raf9a7c5 36 36 #include <interrupt.h> 37 37 #include <align.h> 38 #include <console/console.h> 38 39 39 40 /* This is a good joke, SGI HAS different types than NT bioses... */ … … 247 248 } 248 249 249 250 chardev_t * arc_console(void) 250 void arc_console(void) 251 251 { 252 252 kbd_polling_enabled = true; … … 254 254 chardev_initialize("arc_console", &console, &arc_ops); 255 255 old_timer = int_register(TIMER_IRQ, "arc_kb_poll", timer_replace); 256 return &console; 256 stdin = &console; 257 stdout = &console; 257 258 } 258 259 -
arch/mips32/src/drivers/msim.c
rc0b7f00 raf9a7c5 31 31 #include <arch/drivers/msim.h> 32 32 #include <arch/cp0.h> 33 #include <console/console.h> 33 34 34 35 static chardev_t console; … … 78 79 79 80 /* Return console object representing msim console */ 80 chardev_t *msim_console(void)81 void msim_console(void) 81 82 { 82 83 chardev_initialize("msim_console", &console, &msim_ops); … … 86 87 cp0_unmask_int(MSIM_KBD_IRQ); 87 88 88 return &console; 89 stdin = &console; 90 stdout = &console; 89 91 } -
arch/mips32/src/drivers/serial.c
rc0b7f00 raf9a7c5 102 102 } 103 103 104 #include <print.h> 105 chardev_t * serial_console(void) 104 void serial_console(void) 106 105 { 107 106 serial_t *sd = &sconf[0]; … … 118 117 old_timer = int_register(TIMER_IRQ, "serial_drvr_poll", timer_replace); 119 118 120 121 return &console; 122 119 stdin = &console; 120 stdout = &console; 123 121 } -
generic/src/console/kconsole.c
rc0b7f00 raf9a7c5 239 239 char *current = history[histposition]; 240 240 int i; 241 char mod; /* Command Modifier */ 241 242 char c; 242 243 … … 310 311 } 311 312 if (c == 0x1b) { 313 mod = _getc(input); 312 314 c = _getc(input); 313 if (c!= 0x5b) 315 316 if (mod != 0x5b && mod != 0x4f) 314 317 continue; 315 c = _getc(input); 316 if (c == 0x44) { /* Left */ 318 319 if (c == 0x33 && _getc(input) == 0x7e) { 320 if (position == curlen) 321 continue; 322 for (i=position+1; i<curlen;i++) { 323 putchar(current[i]); 324 current[i-1] = current[i]; 325 } 326 putchar(' '); 327 rdln_print_c('\b',curlen-position); 328 curlen--; 329 } 330 else if (c == 0x48) { /* Home */ 331 rdln_print_c('\b',position); 332 position = 0; 333 } 334 else if (c == 0x46) { 335 for (i=position;i<curlen;i++) 336 putchar(current[i]); 337 position = curlen; 338 } 339 else if (c == 0x44) { /* Left */ 317 340 if (position > 0) { 318 341 putchar('\b'); … … 321 344 continue; 322 345 } 323 if (c == 0x43) { /* Right */346 else if (c == 0x43) { /* Right */ 324 347 if (position < curlen) { 325 348 putchar(current[position]); … … 328 351 continue; 329 352 } 330 if (c == 0x41 || c == 0x42) { /* Up,down */ 353 else if (c == 0x41 || c == 0x42) { 354 /* Up,down */ 331 355 rdln_print_c('\b',position); 332 356 rdln_print_c(' ',curlen);
Note:
See TracChangeset
for help on using the changeset viewer.