Changeset a0e1b48 in mainline


Ignore:
Timestamp:
2009-03-12T17:53:17Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3c79afe
Parents:
b6f2ebc
Message:

chardev_t → outdev_t
small fixes and cleanups

Location:
kernel/genarch/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/drivers/ega/ega.c

    rb6f2ebc ra0e1b48  
    6161static ioport8_t *ega_base;
    6262
    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)
    6667
    6768/*
     
    124125{
    125126        backbuf[ega_cursor * 2] = ch;
    126        
    127         if (!silent)
     127        backbuf[ega_cursor * 2 + 1] = STYLE;
     128       
     129        if (!silent) {
    128130                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
     135static void ega_putchar(outdev_t *dev __attribute__((unused)), const char ch, bool silent)
    132136{
    133137        ipl_t ipl;
     
    161165}
    162166
    163 static chardev_operations_t ega_ops = {
     167static outdev_t ega_console;
     168static outdev_operations_t ega_ops = {
    164169        .write = ega_putchar
    165170};
     
    180185        ega_sync_cursor();
    181186       
    182         chardev_initialize("ega_out", &ega_console, &ega_ops);
     187        outdev_initialize("ega", &ega_console, &ega_ops);
    183188        stdout = &ega_console;
    184189       
  • kernel/genarch/src/fb/fb.c

    rb6f2ebc ra0e1b48  
    284284 *
    285285 */
    286 static void fb_putchar(chardev_t *dev, char ch, bool silent)
     286static void fb_putchar(outdev_t *dev, char ch, bool silent)
    287287{
    288288        spinlock_lock(&fb_lock);
     
    327327}
    328328
    329 static chardev_t framebuffer;
    330 static chardev_operations_t fb_ops = {
    331         .write = fb_putchar,
     329static outdev_t fb_console;
     330static outdev_operations_t fb_ops = {
     331        .write = fb_putchar
    332332};
    333333
     
    424424
    425425
    426 /** Initialize framebuffer as a chardev output device
     426/** Initialize framebuffer as a output character device
    427427 *
    428428 * @param addr   Physical address of the framebuffer
     
    527527        fb_redraw();
    528528       
    529         chardev_initialize("fb", &framebuffer, &fb_ops);
    530         stdout = &framebuffer;
     529        outdev_initialize("fb", &fb_console, &fb_ops);
     530        stdout = &fb_console;
    531531}
    532532
Note: See TracChangeset for help on using the changeset viewer.