Changeset 7c014d1 in mainline for uspace/app
- Timestamp:
- 2011-09-09T15:46:21Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c69646f8
- Parents:
- 14a60e3
- Location:
- uspace/app
- Files:
-
- 5 edited
-
bdsh/cmds/modules/cat/cat.c (modified) (1 diff)
-
init/init.c (modified) (2 diffs)
-
tester/console/console1.c (modified) (3 diffs)
-
tetris/screen.c (modified) (2 diffs)
-
trace/trace.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cat/cat.c
r14a60e3 r7c014d1 103 103 { 104 104 console_set_pos(console, 0, console_rows-1); 105 console_set_color(console, COLOR_ BLUE, COLOR_WHITE, 0);105 console_set_color(console, COLOR_WHITE, COLOR_BLUE, 0); 106 106 107 107 printf("ENTER/SPACE/PAGE DOWN - next page, " -
uspace/app/init/init.c
r14a60e3 r7c014d1 196 196 } 197 197 198 static void console(const char * svc)199 { 200 printf("%s: Spawning %s %s \n", NAME, SRV_CONSOLE,svc);198 static void console(const char *isvc, const char *fbsvc) 199 { 200 printf("%s: Spawning %s %s %s\n", NAME, SRV_CONSOLE, isvc, fbsvc); 201 201 202 202 /* Wait for the input service to be ready */ 203 203 service_id_t service_id; 204 int rc = loc_service_get_id(svc, &service_id, IPC_FLAG_BLOCKING); 205 if (rc != EOK) { 206 printf("%s: Error waiting on %s (%s)\n", NAME, svc, 207 str_error(rc)); 208 return; 209 } 210 211 rc = task_spawnl(NULL, SRV_CONSOLE, SRV_CONSOLE, svc, NULL); 212 if (rc != EOK) { 213 printf("%s: Error spawning %s %s (%s)\n", NAME, SRV_CONSOLE, 214 svc, str_error(rc)); 204 int rc = loc_service_get_id(isvc, &service_id, IPC_FLAG_BLOCKING); 205 if (rc != EOK) { 206 printf("%s: Error waiting on %s (%s)\n", NAME, isvc, 207 str_error(rc)); 208 return; 209 } 210 211 /* Wait for the framebuffer service to be ready */ 212 rc = loc_service_get_id(fbsvc, &service_id, IPC_FLAG_BLOCKING); 213 if (rc != EOK) { 214 printf("%s: Error waiting on %s (%s)\n", NAME, fbsvc, 215 str_error(rc)); 216 return; 217 } 218 219 rc = task_spawnl(NULL, SRV_CONSOLE, SRV_CONSOLE, isvc, fbsvc, NULL); 220 if (rc != EOK) { 221 printf("%s: Error spawning %s %s %s (%s)\n", NAME, SRV_CONSOLE, 222 isvc, fbsvc, str_error(rc)); 215 223 } 216 224 } … … 300 308 spawn("/srv/fb"); 301 309 spawn("/srv/input"); 302 console("hid/input" );310 console("hid/input", "hid/fb0"); 303 311 304 312 spawn("/srv/clip"); -
uspace/app/tester/console/console1.c
r14a60e3 r7c014d1 76 76 for (i = COLOR_BLACK; i <= COLOR_WHITE; i++) { 77 77 console_flush(console); 78 console_set_color(console, i, COLOR_WHITE,78 console_set_color(console, COLOR_WHITE, i, 79 79 j ? CATTR_BRIGHT : 0); 80 80 printf(" %s ", color_name[i]); … … 89 89 for (i = COLOR_BLACK; i <= COLOR_WHITE; i++) { 90 90 console_flush(console); 91 console_set_color(console, COLOR_WHITE, i,91 console_set_color(console, i, COLOR_WHITE, 92 92 j ? CATTR_BRIGHT : 0); 93 93 printf(" %s ", color_name[i]); … … 102 102 for (i = 0; i < 255; i += 16) { 103 103 console_flush(console); 104 console_set_rgb_color(console, (255 - i) << 16, i<< 16);104 console_set_rgb_color(console, i << 16, (255 - i) << 16); 105 105 putchar('X'); 106 106 } 107 107 console_flush(console); 108 console_set_color(console, COLOR_ BLACK, COLOR_WHITE, 0);108 console_set_color(console, COLOR_WHITE, COLOR_BLACK, 0); 109 109 putchar('\n'); 110 110 111 111 for (i = 0; i < 255; i += 16) { 112 112 console_flush(console); 113 console_set_rgb_color(console, (255 - i) << 8, i<< 8);113 console_set_rgb_color(console, i << 8, (255 - i) << 8); 114 114 putchar('X'); 115 115 } 116 116 console_flush(console); 117 console_set_color(console, COLOR_ BLACK, COLOR_WHITE, 0);117 console_set_color(console, COLOR_WHITE, COLOR_BLACK, 0); 118 118 putchar('\n'); 119 119 120 120 for (i = 0; i < 255; i += 16) { 121 121 console_flush(console); 122 console_set_rgb_color(console, 255 - i,i);122 console_set_rgb_color(console, i, 255 - i); 123 123 putchar('X'); 124 124 } -
uspace/app/tetris/screen.c
r14a60e3 r7c014d1 95 95 { 96 96 console_flush(console); 97 console_set_rgb_color(console, 0xffffff,98 use_color ? color : 0x000000);97 console_set_rgb_color(console, use_color ? color : 0x000000, 98 0xffffff); 99 99 } 100 100 … … 153 153 return false; 154 154 155 return ( ccap >= CONSOLE_CCAP_RGB);155 return ((ccap & CONSOLE_CAP_RGB) == CONSOLE_CAP_RGB); 156 156 } 157 157 -
uspace/app/trace/trace.c
r14a60e3 r7c014d1 86 86 void thread_trace_start(uintptr_t thread_hash); 87 87 88 static proto_t *proto_console;89 88 static task_id_t task_id; 90 89 static loader_t *task_ldr; … … 659 658 ipcp_init(); 660 659 661 /*662 * User apps now typically have console on phone 3.663 * (Phones 1 and 2 are used by the loader).664 */665 ipcp_connection_set(3, 0, proto_console);666 667 660 rc = get_thread_list(); 668 661 if (rc < 0) { … … 714 707 fibril_mutex_unlock(&state_lock); 715 708 printf("Resume...\n"); 709 break; 710 default: 716 711 break; 717 712 } … … 790 785 791 786 proto_register(SERVICE_VFS, p); 792 793 #if 0794 p = proto_new("console");795 796 o = oper_new("write", 1, arg_def, V_ERRNO, 1, resp_def);797 proto_add_oper(p, VFS_IN_WRITE, o);798 799 resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER;800 resp_def[2] = V_INTEGER; resp_def[3] = V_CHAR;801 o = oper_new("getkey", 0, arg_def, V_ERRNO, 4, resp_def);802 803 arg_def[0] = V_CHAR;804 o = oper_new("clear", 0, arg_def, V_VOID, 0, resp_def);805 proto_add_oper(p, CONSOLE_CLEAR, o);806 807 arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;808 o = oper_new("goto", 2, arg_def, V_VOID, 0, resp_def);809 proto_add_oper(p, CONSOLE_GOTO, o);810 811 resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER;812 o = oper_new("getsize", 0, arg_def, V_INTEGER, 2, resp_def);813 proto_add_oper(p, CONSOLE_GET_SIZE, o);814 815 arg_def[0] = V_INTEGER;816 o = oper_new("set_style", 1, arg_def, V_VOID, 0, resp_def);817 proto_add_oper(p, CONSOLE_SET_STYLE, o);818 arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; arg_def[2] = V_INTEGER;819 o = oper_new("set_color", 3, arg_def, V_VOID, 0, resp_def);820 proto_add_oper(p, CONSOLE_SET_COLOR, o);821 arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;822 o = oper_new("set_rgb_color", 2, arg_def, V_VOID, 0, resp_def);823 proto_add_oper(p, CONSOLE_SET_RGB_COLOR, o);824 o = oper_new("cursor_visibility", 1, arg_def, V_VOID, 0, resp_def);825 proto_add_oper(p, CONSOLE_CURSOR_VISIBILITY, o);826 827 proto_console = p;828 proto_register(SERVICE_CONSOLE, p);829 #endif830 787 } 831 788
Note:
See TracChangeset
for help on using the changeset viewer.
