Changeset d3f2cad in mainline


Ignore:
Timestamp:
2006-06-07T10:06:00Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e8d77a4
Parents:
9e951acb
Message:

Better colors for ega.
Small updates to initialization code to use only async api.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • console/console.c

    r9e951acb rd3f2cad  
    472472
    473473       
    474         ipc_call_sync_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows), &(fb_info.cols));
     474        async_req_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows), &(fb_info.cols));
    475475        set_style_col(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND);
    476476        clrscr();
     
    493493       
    494494        if ((interbuffer = mmap(NULL, sizeof(keyfield_t) * fb_info.cols * fb_info.rows , PROTO_READ|PROTO_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0 ,0 )) != NULL) {
    495                 if (ipc_call_sync_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)interbuffer, 0, AS_AREA_READ, NULL, NULL, NULL) != 0) {
     495                if (async_req_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)interbuffer, 0, AS_AREA_READ, NULL, NULL, NULL) != 0) {
    496496                        munmap(interbuffer, sizeof(keyfield_t) * fb_info.cols * fb_info.rows);
    497497                        interbuffer = NULL;
  • fb/ega.c

    r9e951acb rd3f2cad  
    5656#define EGA_IO_SIZE 2
    5757
     58#define NORMAL_COLOR       0x0f
     59#define INVERTED_COLOR     0xf0
     60
     61#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR)
     62
    5863typedef unsigned char u8;
    5964typedef unsigned short u16;
     
    6873static char *scr_addr;
    6974
    70 static unsigned int style = 0x1e;
     75static unsigned int style = NORMAL_COLOR;
    7176
    7277static inline void outb(u16 port, u8 b)
     
    181186        for (i=0; i < scr_width*scr_height; i++) {
    182187                scr_addr[i*2] = data[i].character;
    183                 if (data[i].style.fg_color > data[i].style.bg_color)
    184                         scr_addr[i*2+1] = 0x1e;
    185                 else
    186                         scr_addr[i*2+1] = 0xe1;
     188                scr_addr[i*2+1] = EGA_STYLE(data[i].style.fg_color, data[i].style.bg_color);
    187189        }
    188190}
     
    301303                        fgcolor = IPC_GET_ARG1(call);
    302304                        bgcolor = IPC_GET_ARG2(call);
    303                         if (fgcolor > bgcolor)
    304                                 style = 0x1e;
    305                         else
    306                                 style = 0xe1;
     305                        style = EGA_STYLE(fgcolor, bgcolor);
    307306                        break;
    308307                case FB_VP_DRAW_PIXMAP:
  • fb/fb.c

    r9e951acb rd3f2cad  
    774774
    775775        while (1) {
    776                 callid = async_get_call_timeout(&call,250000);
     776                if (vport->cursor_shown)
     777                        callid = async_get_call_timeout(&call,250000);
     778                else
     779                        callid = async_get_call(&call);
     780
    777781                if (!callid) {
    778782                        cursor_blink(vp);
  • kbd/generic/kbd.c

    r9e951acb rd3f2cad  
    118118        keybuffer_init(&keybuffer);
    119119       
     120        async_set_client_connection(console_connection);
     121        async_set_interrupt_received(irq_handler);
    120122        /* Register service at nameserver */
    121        
    122123        if ((res = ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, &phonead)) != 0) {
    123124                return -1;
    124125        }
    125126
    126         async_set_client_connection(console_connection);
    127         async_set_interrupt_received(irq_handler);
    128127        async_manager();
    129128
Note: See TracChangeset for help on using the changeset viewer.