Changeset a0e1b48 in mainline for kernel/genarch/src/drivers/ega/ega.c


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

File:
1 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       
Note: See TracChangeset for help on using the changeset viewer.