Changeset 390a678 in mainline
- Timestamp:
- 2006-06-02T14:54:42Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3be8401
- Parents:
- 5b6de81
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
console/console.c
r5b6de81 r390a678 40 40 #include <libadt/fifo.h> 41 41 #include <screenbuffer.h> 42 #include <sys/mman.h> 42 43 43 44 #define CONSOLE_COUNT 12 … … 46 47 #define NAME "CONSOLE" 47 48 48 int active_console = 1;49 int active_console = 0; 49 50 50 51 struct { … … 66 67 67 68 connection_t connections[CONSOLE_COUNT]; 68 69 keyfield_t *interbuffer = NULL; 70 69 71 static int find_free_connection() 70 72 { … … 157 159 char c,d; 158 160 connection_t *conn; 159 keyfield_t *interbuffer = NULL;160 161 // interbuffer = mmap(,, PROTO_READ|PROTO_WRITE, MAP_ANONYMOUS, , );162 161 163 162 /* Ignore parameters, the connection is alread opened */ … … 186 185 187 186 ipc_call_async(fb_info.phone, FB_CURSOR_VISIBILITY, 0, NULL, NULL); 188 ipc_call_async_2(fb_info.phone, FB_CLEAR, 0, 0, NULL, NULL); 187 188 if (interbuffer) { 189 for (i = 0; i < fb_info.cols * fb_info.rows; i++) 190 interbuffer[i] = conn->screenbuffer.buffer[i]; 191 ipc_call_sync(fb_info.phone, FB_DRAW_TEXT_DATA, 0, NULL); 192 } else { 193 194 ipc_call_async_2(fb_info.phone, FB_CLEAR, 0, 0, NULL, NULL); 189 195 190 for (i = 0; i < conn->screenbuffer.size_x; i++) 191 for (j = 0; j < conn->screenbuffer.size_y; j++) { 192 d = get_field_at(&(conn->screenbuffer),i, j)->character; 193 if (d && d != ' ') 194 ipc_call_async_3(fb_info.phone, FB_PUTCHAR, d, j, i, NULL, NULL); 195 } 196 197 ipc_call_async_2(fb_info.phone, FB_CURSOR_GOTO, conn->screenbuffer.position_y, conn->screenbuffer.position_x, NULL, NULL); 196 197 for (i = 0; i < conn->screenbuffer.size_x; i++) 198 for (j = 0; j < conn->screenbuffer.size_y; j++) { 199 d = get_field_at(&(conn->screenbuffer),i, j)->character; 200 if (d && d != ' ') 201 ipc_call_async_3(fb_info.phone, FB_PUTCHAR, d, j, i, NULL, NULL); 202 } 203 204 ipc_call_async_2(fb_info.phone, FB_CURSOR_GOTO, conn->screenbuffer.position_y, conn->screenbuffer.position_x, NULL, NULL); 205 } 198 206 ipc_call_async(fb_info.phone, FB_CURSOR_VISIBILITY, 1, NULL, NULL); 199 207 … … 327 335 } 328 336 337 if ((interbuffer = mmap(NULL, sizeof(keyfield_t) * fb_info.cols * fb_info.rows , PROTO_READ|PROTO_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0 ,0 )) != NULL) { 338 if (ipc_call_sync_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)interbuffer, 0, AS_AREA_READ | AS_AREA_CACHEABLE, NULL, NULL, NULL) != 0) { 339 // ipc_call_async_3(fb_info.phone, FB_PUTCHAR, '?', 10, 10, NULL, NULL); 340 munmap(interbuffer, sizeof(keyfield_t) * fb_info.cols * fb_info.rows); 341 interbuffer = NULL; 342 } 343 /* } else { 344 ipc_call_async_3(fb_info.phone, FB_PUTCHAR, '!', 10, 10, NULL, NULL); 345 */ 346 } 347 329 348 async_new_connection(phonehash, 0, NULL, keyboard_events); 330 349
Note:
See TracChangeset
for help on using the changeset viewer.