Changeset da0c91e7 in mainline
- Timestamp:
- 2006-06-01T23:01:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46bd593f
- Parents:
- c1d2c9d
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
console/console.c
rc1d2c9d rda0c91e7 116 116 117 117 conn = &connections[active_console]; 118 if ((c >= KBD_KEY_F1) && (c < KBD_KEY_F1 + CONSOLE_COUNT)) { 118 // if ((c >= KBD_KEY_F1) && (c < KBD_KEY_F1 + CONSOLE_COUNT)) { 119 if ((c >= '1') && (c < '1' + CONSOLE_COUNT)) { 119 120 /*FIXME: draw another console content from buffer */ 120 121 121 active_console = c - KBD_KEY_F1;122 active_console = c - '1'; 122 123 conn = &connections[active_console]; 123 124 … … 232 233 ipcarg_t retval, arg1 = 0xdead, arg2 = 0xbeef; 233 234 int i; 235 236 async_set_client_connection(client_connection); 234 237 235 238 /* Connect to keyboard driver */ -
fb/Makefile
rc1d2c9d rda0c91e7 47 47 SOURCES = \ 48 48 fb.c \ 49 font-8x16.c 49 font-8x16.c \ 50 main.c \ 51 sysio.c 50 52 51 53 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) -
fb/fb.c
rc1d2c9d rda0c91e7 28 28 */ 29 29 30 #include <stdio.h>31 30 #include <stdlib.h> 32 31 #include <unistd.h> 33 32 #include <string.h> 34 33 #include <ddi.h> 35 #include <task.h>36 34 #include <sysinfo.h> 37 35 #include <align.h> … … 390 388 } 391 389 392 static int init_fb(void)393 {394 __address fb_ph_addr;395 unsigned int fb_width;396 unsigned int fb_height;397 unsigned int fb_bpp;398 unsigned int fb_scanline;399 __address fb_addr;400 int a=0;401 int i,j,k;402 int w;403 char text[]="HelenOS Framebuffer driver\non Virtual Framebuffer\nVFB ";404 405 fb_ph_addr=sysinfo_value("fb.address.physical");406 fb_width=sysinfo_value("fb.width");407 fb_height=sysinfo_value("fb.height");408 fb_bpp=sysinfo_value("fb.bpp");409 fb_scanline=sysinfo_value("fb.scanline");410 411 fb_addr=ALIGN_UP(((__address)set_maxheapsize(USER_ADDRESS_SPACE_SIZE_ARCH>>1)),PAGE_SIZE);412 413 map_physmem(task_get_id(),(void *)((__address)fb_ph_addr),(void *)fb_addr,414 (fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH,415 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);416 417 screen_init(fb_addr, fb_width, fb_height, fb_bpp, fb_scanline);418 419 return 0;420 }421 422 390 static void draw_char(int vp, char c, unsigned int row, unsigned int col) 423 391 { … … 443 411 } 444 412 445 voidclient_connection(ipc_callid_t iid, ipc_call_t *icall)413 static void fb_client_connection(ipc_callid_t iid, ipc_call_t *icall) 446 414 { 447 415 ipc_callid_t callid; … … 578 546 } 579 547 580 int main(int argc, char *argv[]) 581 { 582 char connected = 0; 583 int res; 584 ipcarg_t phonead; 585 586 if(!sysinfo_value("fb")) 587 return -1; 588 589 if ((res = ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, &phonead)) != 0) 590 return -1; 591 592 if (init_fb() != 0) 593 return -1; 594 595 async_manager(); 596 /* Never reached */ 548 int fb_init(void) 549 { 550 __address fb_ph_addr; 551 unsigned int fb_width; 552 unsigned int fb_height; 553 unsigned int fb_bpp; 554 unsigned int fb_scanline; 555 __address fb_addr; 556 557 async_set_client_connection(fb_client_connection); 558 559 fb_ph_addr=sysinfo_value("fb.address.physical"); 560 fb_width=sysinfo_value("fb.width"); 561 fb_height=sysinfo_value("fb.height"); 562 fb_bpp=sysinfo_value("fb.bpp"); 563 fb_scanline=sysinfo_value("fb.scanline"); 564 565 fb_addr=ALIGN_UP(((__address)set_maxheapsize(USER_ADDRESS_SPACE_SIZE_ARCH>>1)),PAGE_SIZE); 566 567 map_physmem(task_get_id(),(void *)((__address)fb_ph_addr),(void *)fb_addr, 568 (fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH, 569 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 570 571 screen_init(fb_addr, fb_width, fb_height, fb_bpp, fb_scanline); 572 597 573 return 0; 598 574 } 575 -
fb/fb.h
rc1d2c9d rda0c91e7 30 30 #define _FB_H_ 31 31 32 #include <types.h> 33 #include <arch/types.h> 32 int fb_init(void); 34 33 35 34 #endif -
libc/generic/async.c
rc1d2c9d rda0c91e7 129 129 } connection_t; 130 130 131 131 132 __thread connection_t *PS_connection; 133 134 static void default_client_connection(ipc_callid_t callid, ipc_call_t *call); 135 static async_client_conn_t client_connection = default_client_connection; 132 136 133 137 /** Add microseconds to give timeval */ … … 273 277 * user code. 274 278 */ 275 voidclient_connection(ipc_callid_t callid, ipc_call_t *call)279 static void default_client_connection(ipc_callid_t callid, ipc_call_t *call) 276 280 { 277 281 ipc_answer_fast(callid, ENOENT, 0, 0); … … 671 675 free(msg); 672 676 } 677 678 /** Set function that is called, IPC_M_CONNECT_ME_TO is received 679 * 680 * @param conn Function that will form new psthread. 681 */ 682 void async_set_client_connection(async_client_conn_t conn) 683 { 684 client_connection = conn; 685 } -
libc/generic/io/stream.c
rc1d2c9d rda0c91e7 53 53 stream_t streams[FDS] = {{0, 0, 0}}; 54 54 55 /*56 ssize_t write_stdout(void *param, const void * buf, size_t count);57 ssize_t write_stdout(void *param, const void * buf, size_t count)58 {59 return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);60 }*/61 62 55 static ssize_t write_stderr(void *param, const void *buf, size_t count) 63 56 { 64 57 return count; 65 //return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);66 58 } 67 59 … … 78 70 } 79 71 return i; 80 //return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);81 72 } 82 73 … … 90 81 91 82 return count; 92 //return (ssize_t) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, (sysarg_t) count);93 83 } 94 84 -
libc/include/async.h
rc1d2c9d rda0c91e7 36 36 37 37 typedef ipc_callid_t aid_t; 38 typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call); 38 39 39 40 int async_manager(void); … … 73 74 void async_create_manager(void); 74 75 void async_destroy_manager(void); 76 void async_set_client_connection(async_client_conn_t conn); 75 77 int _async_init(void); 76 78 77 79 /* Should be defined by application */ 78 void client_connection(ipc_callid_t callid, ipc_call_t *call) __attribute__((weak));79 80 void interrupt_received(ipc_call_t *call) __attribute__((weak)); 80 81
Note:
See TracChangeset
for help on using the changeset viewer.