Changeset 96b02eb9 in mainline for uspace/srv/hid
- Timestamp:
- 2010-12-14T12:52:38Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6b10dab
- Parents:
- 554debd
- Location:
- uspace/srv/hid
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/adb_mouse/adb_dev.c
r554debd r96b02eb9 68 68 69 69 /* NB: The callback connection is slotted for removal */ 70 ipcarg_t phonehash;70 sysarg_t phonehash; 71 71 if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) { 72 72 printf(NAME ": Failed to create callback from device\n"); -
uspace/srv/hid/char_mouse/chardev.c
r554debd r96b02eb9 70 70 71 71 /* NB: The callback connection is slotted for removal */ 72 ipcarg_t phonehash;72 sysarg_t phonehash; 73 73 if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) { 74 74 printf(NAME ": Failed to create callback from device\n"); -
uspace/srv/hid/console/console.c
r554debd r96b02eb9 74 74 struct { 75 75 int phone; /**< Framebuffer phone */ 76 ipcarg_t cols; /**< Framebuffer columns */77 ipcarg_t rows; /**< Framebuffer rows */78 ipcarg_t color_cap; /**< Color capabilities (FB_CCAP_xxx) */76 sysarg_t cols; /**< Framebuffer columns */ 77 sysarg_t rows; /**< Framebuffer rows */ 78 sysarg_t color_cap; /**< Color capabilities (FB_CCAP_xxx) */ 79 79 } fb_info; 80 80 … … 101 101 /** Information on row-span yet unsent to FB driver. */ 102 102 struct { 103 ipcarg_t col; /**< Leftmost column of the span. */104 ipcarg_t row; /**< Row where the span lies. */105 ipcarg_t cnt; /**< Width of the span. */103 sysarg_t col; /**< Leftmost column of the span. */ 104 sysarg_t row; /**< Row where the span lies. */ 105 sysarg_t cnt; /**< Width of the span. */ 106 106 } fb_pending; 107 107 … … 119 119 } 120 120 121 static void curs_goto( ipcarg_t x, ipcarg_t y)121 static void curs_goto(sysarg_t x, sysarg_t y) 122 122 { 123 123 async_msg_2(fb_info.phone, FB_CURSOR_GOTO, x, y); … … 180 180 } 181 181 182 static int ccap_fb_to_con( ipcarg_t ccap_fb, ipcarg_t *ccap_con)182 static int ccap_fb_to_con(sysarg_t ccap_fb, sysarg_t *ccap_con) 183 183 { 184 184 switch (ccap_fb) { … … 203 203 204 204 /** Send an area of screenbuffer to the FB driver. */ 205 static void fb_update_area(console_t *cons, ipcarg_t x0, ipcarg_t y0, ipcarg_t width, ipcarg_t height)205 static void fb_update_area(console_t *cons, sysarg_t x0, sysarg_t y0, sysarg_t width, sysarg_t height) 206 206 { 207 207 if (interbuffer) { 208 ipcarg_t x;209 ipcarg_t y;208 sysarg_t x; 209 sysarg_t y; 210 210 211 211 for (y = 0; y < height; y++) { … … 237 237 * 238 238 */ 239 static void cell_mark_changed( ipcarg_t col, ipcarg_t row)239 static void cell_mark_changed(sysarg_t col, sysarg_t row) 240 240 { 241 241 if (fb_pending.cnt != 0) { … … 255 255 256 256 /** Print a character to the active VC with buffering. */ 257 static void fb_putchar(wchar_t c, ipcarg_t col, ipcarg_t row)257 static void fb_putchar(wchar_t c, sysarg_t col, sysarg_t row) 258 258 { 259 259 async_msg_3(fb_info.phone, FB_PUTCHAR, c, col, row); … … 352 352 curs_visibility(false); 353 353 354 ipcarg_t x;355 ipcarg_t y;354 sysarg_t x; 355 sysarg_t y; 356 356 int rc = 0; 357 357 … … 584 584 ipc_callid_t callid; 585 585 ipc_call_t call; 586 ipcarg_t arg1;587 ipcarg_t arg2;588 ipcarg_t arg3;586 sysarg_t arg1; 587 sysarg_t arg2; 588 sysarg_t arg3; 589 589 590 590 int rc; … … 726 726 727 727 /* NB: The callback connection is slotted for removal */ 728 ipcarg_t phonehash;728 sysarg_t phonehash; 729 729 if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) { 730 730 printf(NAME ": Failed to create callback from input device\n"); -
uspace/srv/hid/console/gcons.c
r554debd r96b02eb9 82 82 83 83 static bool use_gcons = false; 84 static ipcarg_t xres;85 static ipcarg_t yres;84 static sysarg_t xres; 85 static sysarg_t yres; 86 86 87 87 enum butstate { … … 107 107 static size_t active_console = 0; 108 108 109 static ipcarg_t mouse_x = 0;110 static ipcarg_t mouse_y= 0;109 static sysarg_t mouse_x = 0; 110 static sysarg_t mouse_y= 0; 111 111 112 112 static bool btn_pressed = false; 113 static ipcarg_t btn_x = 0;114 static ipcarg_t btn_y = 0;113 static sysarg_t btn_x = 0; 114 static sysarg_t btn_y = 0; 115 115 116 116 static void vp_switch(int vp) … … 120 120 121 121 /** Create view port */ 122 static int vp_create( ipcarg_t x, ipcarg_t y, ipcarg_t width, ipcarg_t height)122 static int vp_create(sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height) 123 123 { 124 124 return async_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y, … … 137 137 138 138 /** Transparent putchar */ 139 static void tran_putch(wchar_t ch, ipcarg_t col, ipcarg_t row)139 static void tran_putch(wchar_t ch, sysarg_t col, sysarg_t row) 140 140 { 141 141 async_msg_3(fbphone, FB_PUTCHAR, ch, col, row); … … 297 297 } 298 298 299 static int gcons_find_conbut( ipcarg_t x, ipcarg_t y)300 { 301 ipcarg_t status_start = STATUS_START + (xres - 800) / 2;299 static int gcons_find_conbut(sysarg_t x, sysarg_t y) 300 { 301 sysarg_t status_start = STATUS_START + (xres - 800) / 2; 302 302 303 303 if ((y < STATUS_TOP) || (y >= STATUS_TOP + STATUS_HEIGHT)) … … 313 313 return -1; 314 314 315 ipcarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);315 sysarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE); 316 316 317 317 if (btn < CONSOLE_COUNT) … … 363 363 * 364 364 */ 365 static void draw_pixmap(char *logo, size_t size, ipcarg_t x, ipcarg_t y)365 static void draw_pixmap(char *logo, size_t size, sysarg_t x, sysarg_t y) 366 366 { 367 367 /* Create area */ … … 374 374 375 375 /* Send area */ 376 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, ( ipcarg_t) shm);376 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm); 377 377 if (rc) 378 378 goto exit; … … 436 436 437 437 /* Send area */ 438 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, ( ipcarg_t) shm);438 int rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (sysarg_t) shm); 439 439 if (rc) 440 440 goto exit; … … 513 513 514 514 /* Create status buttons */ 515 ipcarg_t status_start = STATUS_START + (xres - 800) / 2;515 sysarg_t status_start = STATUS_START + (xres - 800) / 2; 516 516 size_t i; 517 517 for (i = 0; i < CONSOLE_COUNT; i++) { -
uspace/srv/hid/fb/ega.c
r554debd r96b02eb9 230 230 static int save_screen(void) 231 231 { 232 ipcarg_t i;232 sysarg_t i; 233 233 234 234 /* Find empty screen */ … … 245 245 } 246 246 247 static int print_screen( ipcarg_t i)247 static int print_screen(sysarg_t i) 248 248 { 249 249 if ((i >= MAX_SAVED_SCREENS) || (saved_screens[i].data)) … … 276 276 wchar_t c; 277 277 278 ipcarg_t col;279 ipcarg_t row;280 ipcarg_t w;281 ipcarg_t h;278 sysarg_t col; 279 sysarg_t row; 280 sysarg_t w; 281 sysarg_t h; 282 282 283 283 ssize_t rows; … … 290 290 uint32_t bg_rgb; 291 291 292 ipcarg_t scr;292 sysarg_t scr; 293 293 int retval; 294 294 … … 370 370 371 371 if (rows >= 0) { 372 if (( ipcarg_t) rows > scr_height) {372 if ((sysarg_t) rows > scr_height) { 373 373 retval = EINVAL; 374 374 break; 375 375 } 376 376 } else { 377 if (( ipcarg_t) (-rows) > scr_height) {377 if ((sysarg_t) (-rows) > scr_height) { 378 378 retval = EINVAL; 379 379 break; -
uspace/srv/hid/fb/fb.c
r554debd r96b02eb9 199 199 static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a); 200 200 static int rgb_from_style(attr_rgb_t *rgb, int style); 201 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,202 ipcarg_t bg_color, ipcarg_t flags);203 204 static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,205 ipcarg_t bg_color, ipcarg_t attr);201 static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color, 202 sysarg_t bg_color, sysarg_t flags); 203 204 static int fb_set_color(viewport_t *vport, sysarg_t fg_color, 205 sysarg_t bg_color, sysarg_t attr); 206 206 207 207 static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor, … … 1072 1072 1073 1073 static unsigned char *shm = NULL; 1074 static ipcarg_t shm_id = 0;1074 static sysarg_t shm_id = 0; 1075 1075 static size_t shm_size; 1076 1076 … … 1529 1529 } 1530 1530 1531 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,1532 ipcarg_t bg_color, ipcarg_t flags)1531 static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color, 1532 sysarg_t bg_color, sysarg_t flags) 1533 1533 { 1534 1534 fg_color = (fg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0); … … 1562 1562 } 1563 1563 1564 static int fb_set_style(viewport_t *vport, ipcarg_t style)1564 static int fb_set_style(viewport_t *vport, sysarg_t style) 1565 1565 { 1566 1566 return rgb_from_style(&vport->attr, (int) style); 1567 1567 } 1568 1568 1569 static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,1570 ipcarg_t bg_color, ipcarg_t flags)1569 static int fb_set_color(viewport_t *vport, sysarg_t fg_color, 1570 sysarg_t bg_color, sysarg_t flags) 1571 1571 { 1572 1572 return rgb_from_idx(&vport->attr, fg_color, bg_color, flags); -
uspace/srv/hid/fb/main.c
r554debd r96b02eb9 114 114 return -1; 115 115 116 ipcarg_t phonead;116 sysarg_t phonead; 117 117 if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) 118 118 return -1; -
uspace/srv/hid/fb/serial_console.c
r554debd r96b02eb9 55 55 #define MAX_CONTROL 20 56 56 57 static ipcarg_t scr_width;58 static ipcarg_t scr_height;57 static sysarg_t scr_width; 58 static sysarg_t scr_height; 59 59 static bool color = true; /**< True if producing color output. */ 60 60 static bool utf8 = false; /**< True if producing UTF8 output. */ 61 61 static putc_function_t putc_function; 62 62 63 static ipcarg_t lastcol = 0;64 static ipcarg_t lastrow = 0;63 static sysarg_t lastcol = 0; 64 static sysarg_t lastrow = 0; 65 65 static attrs_t cur_attr = { 66 66 .t = at_style, … … 130 130 } 131 131 132 void serial_goto(const ipcarg_t col, const ipcarg_t row)132 void serial_goto(const sysarg_t col, const sysarg_t row) 133 133 { 134 134 if ((col > scr_width) || (row > scr_height)) … … 252 252 253 253 /** Set scrolling region. */ 254 void serial_set_scroll_region( ipcarg_t last_row)254 void serial_set_scroll_region(sysarg_t last_row) 255 255 { 256 256 char control[MAX_CONTROL]; … … 269 269 } 270 270 271 void serial_console_init(putc_function_t putc_fn, ipcarg_t w, ipcarg_t h)271 void serial_console_init(putc_function_t putc_fn, sysarg_t w, sysarg_t h) 272 272 { 273 273 scr_width = w; … … 286 286 * 287 287 */ 288 static void draw_text_data(keyfield_t *data, ipcarg_t x0, ipcarg_t y0,289 ipcarg_t width, ipcarg_t height)288 static void draw_text_data(keyfield_t *data, sysarg_t x0, sysarg_t y0, 289 sysarg_t width, sysarg_t height) 290 290 { 291 291 attrs_t *a0 = &data[0].attrs; 292 292 serial_set_attrs(a0); 293 293 294 ipcarg_t y;294 sysarg_t y; 295 295 for (y = 0; y < height; y++) { 296 296 serial_goto(x0, y0 + y); 297 297 298 ipcarg_t x;298 sysarg_t x; 299 299 for (x = 0; x < width; x++) { 300 300 attrs_t *attr = &data[y * width + x].attrs; … … 337 337 338 338 wchar_t c; 339 ipcarg_t col;340 ipcarg_t row;341 ipcarg_t w;342 ipcarg_t h;339 sysarg_t col; 340 sysarg_t row; 341 sysarg_t w; 342 sysarg_t h; 343 343 ssize_t rows; 344 344 … … 442 442 443 443 if (rows >= 0) { 444 if (( ipcarg_t) rows > scr_height) {444 if ((sysarg_t) rows > scr_height) { 445 445 retval = EINVAL; 446 446 break; 447 447 } 448 448 } else { 449 if (( ipcarg_t) (-rows) > scr_height) {449 if ((sysarg_t) (-rows) > scr_height) { 450 450 retval = EINVAL; 451 451 break; -
uspace/srv/hid/fb/serial_console.h
r554debd r96b02eb9 44 44 45 45 extern void serial_puts(const char *); 46 extern void serial_goto(const ipcarg_t, const ipcarg_t);46 extern void serial_goto(const sysarg_t, const sysarg_t); 47 47 extern void serial_clrscr(void); 48 48 extern void serial_scroll(ssize_t); 49 49 extern void serial_cursor_disable(void); 50 50 extern void serial_cursor_enable(void); 51 extern void serial_set_scroll_region( ipcarg_t);52 extern void serial_console_init(putc_function_t, ipcarg_t, ipcarg_t);51 extern void serial_set_scroll_region(sysarg_t); 52 extern void serial_console_init(putc_function_t, sysarg_t, sysarg_t); 53 53 extern void serial_client_connection(ipc_callid_t, ipc_call_t *); 54 54 -
uspace/srv/hid/kbd/port/adb.c
r554debd r96b02eb9 71 71 72 72 /* NB: The callback connection is slotted for removal */ 73 ipcarg_t phonehash;73 sysarg_t phonehash; 74 74 if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) { 75 75 printf(NAME ": Failed to create callback from device\n"); -
uspace/srv/hid/kbd/port/chardev.c
r554debd r96b02eb9 91 91 92 92 /* NB: The callback connection is slotted for removal */ 93 ipcarg_t phonehash;93 sysarg_t phonehash; 94 94 if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) { 95 95 printf(NAME ": Failed to create callback from device\n");
Note:
See TracChangeset
for help on using the changeset viewer.