Changeset 15039b67 in mainline for fb/ega.c


Ignore:
Timestamp:
2006-06-11T17:05:41Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f8d5b85
Parents:
290c0db
Message:

Modified uspace to match changes in kernel ipc/irq.
Fixed types in ega fb.
Added dummy interfacing with PS/2 mouse.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/ega.c

    r290c0db r15039b67  
    5050#include <ipc/ns.h>
    5151#include <ipc/services.h>
     52#include <libarch/ddi.h>
    5253
    5354#include "ega.h"
     
    7172#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR)
    7273
    73 typedef unsigned char u8;
    74 typedef unsigned short u16;
    75 typedef unsigned int u32;
    76 
    77 
    7874/* Allow only 1 connection */
    7975static int client_connected = 0;
     
    8480
    8581static unsigned int style = NORMAL_COLOR;
    86 
    87 static inline void outb(u16 port, u8 b)
    88 {
    89         asm volatile ("outb %0, %1\n" :: "a" (b), "d" (port));
    90 }
    91 
    92 static inline void outw(u16 port, u16 w)
    93 {
    94         asm volatile ("outw %0, %1\n" :: "a" (w), "d" (port));
    95 }
    96 
    97 static inline void outl(u16 port, u32 l)
    98 {
    99         asm volatile ("outl %0, %1\n" :: "a" (l), "d" (port));
    100 }
    101 
    102 static inline u8 inb(u16 port)
    103 {
    104         u8 val;
    105 
    106         asm volatile ("inb %1, %0 \n" : "=a" (val) : "d"(port));
    107         return val;
    108 }
    109 
    110 static inline u16 inw(u16 port)
    111 {
    112         u16 val;
    113 
    114         asm volatile ("inw %1, %0 \n" : "=a" (val) : "d"(port));
    115         return val;
    116 }
    117 
    118 static inline u32 inl(u16 port)
    119 {
    120         u32 val;
    121 
    122         asm volatile ("inl %1, %0 \n" : "=a" (val) : "d"(port));
    123         return val;
    124 }
    125 
    126 
    127 
    12882
    12983static void clrscr(void)
     
    151105static void cursor_disable(void)
    152106{
    153         u8 stat;
     107        uint8_t stat;
     108
    154109        outb(EGA_IO_ADDRESS , 0xa);
    155110        stat=inb(EGA_IO_ADDRESS + 1);
     
    160115static void cursor_enable(void)
    161116{
    162         u8 stat;
     117        uint8_t stat;
     118
    163119        outb(EGA_IO_ADDRESS , 0xa);
    164120        stat=inb(EGA_IO_ADDRESS + 1);
Note: See TracChangeset for help on using the changeset viewer.