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


Ignore:
Timestamp:
2009-02-15T15:28:00Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d96f4d
Parents:
e7f2ad68
Message:

Introduce a more platform-neutral name for programmed I/O.

The new API looks like pio_read_n() or pio_write_n(), where n is 8, 16 or 32.
The old API (i.e. inb(), inw(), inl(), outb() outw(), outl()) may have made
some people think that the interface is only to be used with the separate I/O
space. That's not the case. This API is to be implemented on all platforms
so that we can finally have really generic kernel device drivers.

File:
1 edited

Legend:

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

    re7f2ad68 ree06f2a  
    8484static void ega_move_cursor(void)
    8585{
    86         outb(ega_base + EGA_INDEX_REG, 0xe);
    87         outb(ega_base + EGA_DATA_REG, (uint8_t) ((ega_cursor >> 8) & 0xff));
    88         outb(ega_base + EGA_INDEX_REG, 0xf);
    89         outb(ega_base + EGA_DATA_REG, (uint8_t) (ega_cursor & 0xff));   
     86        pio_write_8(ega_base + EGA_INDEX_REG, 0xe);
     87        pio_write_8(ega_base + EGA_DATA_REG, (uint8_t) ((ega_cursor >> 8) & 0xff));
     88        pio_write_8(ega_base + EGA_INDEX_REG, 0xf);
     89        pio_write_8(ega_base + EGA_DATA_REG, (uint8_t) (ega_cursor & 0xff));   
    9090}
    9191
Note: See TracChangeset for help on using the changeset viewer.