Changeset a0e1b48 in mainline
- Timestamp:
- 2009-03-12T17:53:17Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3c79afe
- Parents:
- b6f2ebc
- Location:
- kernel/genarch/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/ega/ega.c
rb6f2ebc ra0e1b48 61 61 static ioport8_t *ega_base; 62 62 63 #define EMPTY_CHAR 0x0720 64 65 chardev_t ega_console; 63 #define SPACE 0x20 64 #define STYLE 0x07 65 66 #define EMPTY_CHAR (STYLE << 8 | SPACE) 66 67 67 68 /* … … 124 125 { 125 126 backbuf[ega_cursor * 2] = ch; 126 127 if (!silent) 127 backbuf[ega_cursor * 2 + 1] = STYLE; 128 129 if (!silent) { 128 130 videoram[ega_cursor * 2] = ch; 129 } 130 131 static void ega_putchar(chardev_t *dev __attribute__((unused)), const char ch, bool silent) 131 videoram[ega_cursor * 2 + 1] = STYLE; 132 } 133 } 134 135 static void ega_putchar(outdev_t *dev __attribute__((unused)), const char ch, bool silent) 132 136 { 133 137 ipl_t ipl; … … 161 165 } 162 166 163 static chardev_operations_t ega_ops = { 167 static outdev_t ega_console; 168 static outdev_operations_t ega_ops = { 164 169 .write = ega_putchar 165 170 }; … … 180 185 ega_sync_cursor(); 181 186 182 chardev_initialize("ega_out", &ega_console, &ega_ops);187 outdev_initialize("ega", &ega_console, &ega_ops); 183 188 stdout = &ega_console; 184 189 -
kernel/genarch/src/fb/fb.c
rb6f2ebc ra0e1b48 284 284 * 285 285 */ 286 static void fb_putchar( chardev_t *dev, char ch, bool silent)286 static void fb_putchar(outdev_t *dev, char ch, bool silent) 287 287 { 288 288 spinlock_lock(&fb_lock); … … 327 327 } 328 328 329 static chardev_t framebuffer;330 static chardev_operations_t fb_ops = {331 .write = fb_putchar ,329 static outdev_t fb_console; 330 static outdev_operations_t fb_ops = { 331 .write = fb_putchar 332 332 }; 333 333 … … 424 424 425 425 426 /** Initialize framebuffer as a chardev outputdevice426 /** Initialize framebuffer as a output character device 427 427 * 428 428 * @param addr Physical address of the framebuffer … … 527 527 fb_redraw(); 528 528 529 chardev_initialize("fb", &framebuffer, &fb_ops);530 stdout = &f ramebuffer;529 outdev_initialize("fb", &fb_console, &fb_ops); 530 stdout = &fb_console; 531 531 } 532 532
Note:
See TracChangeset
for help on using the changeset viewer.