Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1639 → Rev 1640

/uspace/trunk/fb/fb.c
773,7 → 773,11
ipc_answer_fast(iid, 0, 0, 0); /* Accept connection */
 
while (1) {
callid = async_get_call_timeout(&call,250000);
if (vport->cursor_shown)
callid = async_get_call_timeout(&call,250000);
else
callid = async_get_call(&call);
 
if (!callid) {
cursor_blink(vp);
continue;
/uspace/trunk/fb/ega.c
55,6 → 55,11
#define EGA_IO_ADDRESS 0x3d4
#define EGA_IO_SIZE 2
 
#define NORMAL_COLOR 0x0f
#define INVERTED_COLOR 0xf0
 
#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR)
 
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
67,7 → 72,7
static unsigned int scr_height;
static char *scr_addr;
 
static unsigned int style = 0x1e;
static unsigned int style = NORMAL_COLOR;
 
static inline void outb(u16 port, u8 b)
{
180,10 → 185,7
 
for (i=0; i < scr_width*scr_height; i++) {
scr_addr[i*2] = data[i].character;
if (data[i].style.fg_color > data[i].style.bg_color)
scr_addr[i*2+1] = 0x1e;
else
scr_addr[i*2+1] = 0xe1;
scr_addr[i*2+1] = EGA_STYLE(data[i].style.fg_color, data[i].style.bg_color);
}
}
 
300,10 → 302,7
case FB_SET_STYLE:
fgcolor = IPC_GET_ARG1(call);
bgcolor = IPC_GET_ARG2(call);
if (fgcolor > bgcolor)
style = 0x1e;
else
style = 0xe1;
style = EGA_STYLE(fgcolor, bgcolor);
break;
case FB_VP_DRAW_PIXMAP:
i = IPC_GET_ARG2(call);
/uspace/trunk/kbd/generic/kbd.c
117,14 → 117,13
/* Initialize key buffer */
keybuffer_init(&keybuffer);
async_set_client_connection(console_connection);
async_set_interrupt_received(irq_handler);
/* Register service at nameserver */
if ((res = ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, &phonead)) != 0) {
return -1;
}
 
async_set_client_connection(console_connection);
async_set_interrupt_received(irq_handler);
async_manager();
 
}
/uspace/trunk/console/console.c
471,7 → 471,7
async_req(fb_info.phone, FB_FLUSH, 0, NULL);
 
ipc_call_sync_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows), &(fb_info.cols));
async_req_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows), &(fb_info.cols));
set_style_col(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND);
clrscr();
492,7 → 492,7
connections[KERNEL_CONSOLE].used = 1;
if ((interbuffer = mmap(NULL, sizeof(keyfield_t) * fb_info.cols * fb_info.rows , PROTO_READ|PROTO_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0 ,0 )) != NULL) {
if (ipc_call_sync_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)interbuffer, 0, AS_AREA_READ, NULL, NULL, NULL) != 0) {
if (async_req_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)interbuffer, 0, AS_AREA_READ, NULL, NULL, NULL) != 0) {
munmap(interbuffer, sizeof(keyfield_t) * fb_info.cols * fb_info.rows);
interbuffer = NULL;
}