Changeset 357b5f5 in mainline for uspace/srv/hid


Ignore:
Timestamp:
2011-01-23T20:09:13Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fdb9982c
Parents:
cead2aa (diff), 7e36c8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace/srv/hid
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/adb_mouse/adb_dev.c

    rcead2aa r357b5f5  
    6868
    6969        /* NB: The callback connection is slotted for removal */
    70         ipcarg_t phonehash;
     70        sysarg_t phonehash;
    7171        if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
    7272                printf(NAME ": Failed to create callback from device\n");
     
    8989                int retval;
    9090
    91                 switch (IPC_GET_METHOD(call)) {
     91                switch (IPC_GET_IMETHOD(call)) {
    9292                case IPC_M_PHONE_HUNGUP:
    9393                        /* TODO: Handle hangup */
  • uspace/srv/hid/adb_mouse/adb_mouse.c

    rcead2aa r357b5f5  
    102102        while (1) {
    103103                callid = async_get_call(&call);
    104                 switch (IPC_GET_METHOD(call)) {
     104                switch (IPC_GET_IMETHOD(call)) {
    105105                case IPC_M_PHONE_HUNGUP:
    106106                        if (client_phone != -1) {
  • uspace/srv/hid/char_mouse/char_mouse.c

    rcead2aa r357b5f5  
    8787        while (1) {
    8888                callid = async_get_call(&call);
    89                 switch (IPC_GET_METHOD(call)) {
     89                switch (IPC_GET_IMETHOD(call)) {
    9090                case IPC_M_PHONE_HUNGUP:
    9191                        if (client_phone != -1) {
  • uspace/srv/hid/char_mouse/chardev.c

    rcead2aa r357b5f5  
    7070
    7171        /* NB: The callback connection is slotted for removal */
    72         ipcarg_t phonehash;
     72        sysarg_t phonehash;
    7373        if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
    7474                printf(NAME ": Failed to create callback from device\n");
     
    104104                int retval;
    105105
    106                 switch (IPC_GET_METHOD(call)) {
     106                switch (IPC_GET_IMETHOD(call)) {
    107107                case IPC_M_PHONE_HUNGUP:
    108108                        /* TODO: Handle hangup */
  • uspace/srv/hid/console/console.c

    rcead2aa r357b5f5  
    7474struct {
    7575        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) */
    7979} fb_info;
    8080
     
    101101/** Information on row-span yet unsent to FB driver. */
    102102struct {
    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. */
    106106} fb_pending;
    107107
     
    119119}
    120120
    121 static void curs_goto(ipcarg_t x, ipcarg_t y)
     121static void curs_goto(sysarg_t x, sysarg_t y)
    122122{
    123123        async_msg_2(fb_info.phone, FB_CURSOR_GOTO, x, y);
     
    180180}
    181181
    182 static int ccap_fb_to_con(ipcarg_t ccap_fb, ipcarg_t *ccap_con)
     182static int ccap_fb_to_con(sysarg_t ccap_fb, sysarg_t *ccap_con)
    183183{
    184184        switch (ccap_fb) {
     
    203203
    204204/** 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)
     205static void fb_update_area(console_t *cons, sysarg_t x0, sysarg_t y0, sysarg_t width, sysarg_t height)
    206206{
    207207        if (interbuffer) {
    208                 ipcarg_t x;
    209                 ipcarg_t y;
     208                sysarg_t x;
     209                sysarg_t y;
    210210               
    211211                for (y = 0; y < height; y++) {
     
    237237 *
    238238 */
    239 static void cell_mark_changed(ipcarg_t col, ipcarg_t row)
     239static void cell_mark_changed(sysarg_t col, sysarg_t row)
    240240{
    241241        if (fb_pending.cnt != 0) {
     
    255255
    256256/** Print a character to the active VC with buffering. */
    257 static void fb_putchar(wchar_t c, ipcarg_t col, ipcarg_t row)
     257static void fb_putchar(wchar_t c, sysarg_t col, sysarg_t row)
    258258{
    259259        async_msg_3(fb_info.phone, FB_PUTCHAR, c, col, row);
     
    352352                curs_visibility(false);
    353353               
    354                 ipcarg_t x;
    355                 ipcarg_t y;
     354                sysarg_t x;
     355                sysarg_t y;
    356356                int rc = 0;
    357357               
     
    408408                console_event_t ev;
    409409               
    410                 switch (IPC_GET_METHOD(call)) {
     410                switch (IPC_GET_IMETHOD(call)) {
    411411                case IPC_M_PHONE_HUNGUP:
    412412                        /* TODO: Handle hangup */
     
    451451                int retval;
    452452               
    453                 switch (IPC_GET_METHOD(call)) {
     453                switch (IPC_GET_IMETHOD(call)) {
    454454                case IPC_M_PHONE_HUNGUP:
    455455                        /* TODO: Handle hangup */
     
    584584        ipc_callid_t callid;
    585585        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;
    589589       
    590590        int rc;
     
    608608                arg3 = 0;
    609609               
    610                 switch (IPC_GET_METHOD(call)) {
     610                switch (IPC_GET_IMETHOD(call)) {
    611611                case IPC_M_PHONE_HUNGUP:
    612612                        cons->refcount--;
     
    726726       
    727727        /* NB: The callback connection is slotted for removal */
    728         ipcarg_t phonehash;
     728        sysarg_t phonehash;
    729729        if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
    730730                printf(NAME ": Failed to create callback from input device\n");
     
    816816                       
    817817                        if (devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {
    818                                 devmap_hangup_phone(DEVMAP_DRIVER);
    819818                                printf(NAME ": Unable to register device %s\n", vc);
    820819                                return false;
  • uspace/srv/hid/console/gcons.c

    rcead2aa r357b5f5  
    8282
    8383static bool use_gcons = false;
    84 static ipcarg_t xres;
    85 static ipcarg_t yres;
     84static sysarg_t xres;
     85static sysarg_t yres;
    8686
    8787enum butstate {
     
    107107static size_t active_console = 0;
    108108
    109 static ipcarg_t mouse_x = 0;
    110 static ipcarg_t mouse_y= 0;
     109static sysarg_t mouse_x = 0;
     110static sysarg_t mouse_y= 0;
    111111
    112112static bool btn_pressed = false;
    113 static ipcarg_t btn_x = 0;
    114 static ipcarg_t btn_y = 0;
     113static sysarg_t btn_x = 0;
     114static sysarg_t btn_y = 0;
    115115
    116116static void vp_switch(int vp)
     
    120120
    121121/** Create view port */
    122 static int vp_create(ipcarg_t x, ipcarg_t y, ipcarg_t width, ipcarg_t height)
     122static int vp_create(sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height)
    123123{
    124124        return async_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y,
     
    137137
    138138/** Transparent putchar */
    139 static void tran_putch(wchar_t ch, ipcarg_t col, ipcarg_t row)
     139static void tran_putch(wchar_t ch, sysarg_t col, sysarg_t row)
    140140{
    141141        async_msg_3(fbphone, FB_PUTCHAR, ch, col, row);
     
    297297}
    298298
    299 static int gcons_find_conbut(ipcarg_t x, ipcarg_t y)
    300 {
    301         ipcarg_t status_start = STATUS_START + (xres - 800) / 2;
     299static int gcons_find_conbut(sysarg_t x, sysarg_t y)
     300{
     301        sysarg_t status_start = STATUS_START + (xres - 800) / 2;
    302302       
    303303        if ((y < STATUS_TOP) || (y >= STATUS_TOP + STATUS_HEIGHT))
     
    313313                return -1;
    314314       
    315         ipcarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);
     315        sysarg_t btn = (x - status_start) / (STATUS_WIDTH + STATUS_SPACE);
    316316       
    317317        if (btn < CONSOLE_COUNT)
     
    363363 *
    364364 */
    365 static void draw_pixmap(char *logo, size_t size, ipcarg_t x, ipcarg_t y)
     365static void draw_pixmap(char *logo, size_t size, sysarg_t x, sysarg_t y)
    366366{
    367367        /* Create area */
     
    374374       
    375375        /* 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);
    377377        if (rc)
    378378                goto exit;
     
    436436       
    437437        /* 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);
    439439        if (rc)
    440440                goto exit;
     
    513513       
    514514        /* Create status buttons */
    515         ipcarg_t status_start = STATUS_START + (xres - 800) / 2;
     515        sysarg_t status_start = STATUS_START + (xres - 800) / 2;
    516516        size_t i;
    517517        for (i = 0; i < CONSOLE_COUNT; i++) {
  • uspace/srv/hid/fb/ega.c

    rcead2aa r357b5f5  
    230230static int save_screen(void)
    231231{
    232         ipcarg_t i;
     232        sysarg_t i;
    233233       
    234234        /* Find empty screen */
     
    245245}
    246246
    247 static int print_screen(ipcarg_t i)
     247static int print_screen(sysarg_t i)
    248248{
    249249        if ((i >= MAX_SAVED_SCREENS) || (saved_screens[i].data))
     
    276276                wchar_t c;
    277277               
    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;
    282282               
    283283                ssize_t rows;
     
    290290                uint32_t bg_rgb;
    291291               
    292                 ipcarg_t scr;
     292                sysarg_t scr;
    293293                int retval;
    294294               
    295                 switch (IPC_GET_METHOD(call)) {
     295                switch (IPC_GET_IMETHOD(call)) {
    296296                case IPC_M_PHONE_HUNGUP:
    297297                        client_connected = 0;
     
    370370                       
    371371                        if (rows >= 0) {
    372                                 if ((ipcarg_t) rows > scr_height) {
     372                                if ((sysarg_t) rows > scr_height) {
    373373                                        retval = EINVAL;
    374374                                        break;
    375375                                }
    376376                        } else {
    377                                 if ((ipcarg_t) (-rows) > scr_height) {
     377                                if ((sysarg_t) (-rows) > scr_height) {
    378378                                        retval = EINVAL;
    379379                                        break;
  • uspace/srv/hid/fb/fb.c

    rcead2aa r357b5f5  
    199199static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a);
    200200static 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);
     201static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color,
     202    sysarg_t bg_color, sysarg_t flags);
     203
     204static int fb_set_color(viewport_t *vport, sysarg_t fg_color,
     205    sysarg_t bg_color, sysarg_t attr);
    206206
    207207static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor,
     
    10721072       
    10731073        static unsigned char *shm = NULL;
    1074         static ipcarg_t shm_id = 0;
     1074        static sysarg_t shm_id = 0;
    10751075        static size_t shm_size;
    10761076       
     
    10831083        unsigned int h;
    10841084       
    1085         switch (IPC_GET_METHOD(*call)) {
     1085        switch (IPC_GET_IMETHOD(*call)) {
    10861086        case IPC_M_SHARE_OUT:
    10871087                /* We accept one area for data interchange */
     
    13601360        int newval;
    13611361       
    1362         switch (IPC_GET_METHOD(*call)) {
     1362        switch (IPC_GET_IMETHOD(*call)) {
    13631363        case FB_ANIM_CREATE:
    13641364                nvp = IPC_GET_ARG1(*call);
     
    14351435                        break;
    14361436                }
    1437                 newval = (IPC_GET_METHOD(*call) == FB_ANIM_START);
     1437                newval = (IPC_GET_IMETHOD(*call) == FB_ANIM_START);
    14381438                if (newval ^ animations[i].enabled) {
    14391439                        animations[i].enabled = newval;
     
    14591459        int i, nvp;
    14601460       
    1461         switch (IPC_GET_METHOD(*call)) {
     1461        switch (IPC_GET_IMETHOD(*call)) {
    14621462        case FB_VP_DRAW_PIXMAP:
    14631463                nvp = IPC_GET_ARG1(*call);
     
    15291529}
    15301530
    1531 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,
    1532     ipcarg_t bg_color, ipcarg_t flags)
     1531static int rgb_from_idx(attr_rgb_t *rgb, sysarg_t fg_color,
     1532    sysarg_t bg_color, sysarg_t flags)
    15331533{
    15341534        fg_color = (fg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0);
     
    15621562}
    15631563
    1564 static int fb_set_style(viewport_t *vport, ipcarg_t style)
     1564static int fb_set_style(viewport_t *vport, sysarg_t style)
    15651565{
    15661566        return rgb_from_style(&vport->attr, (int) style);
    15671567}
    15681568
    1569 static int fb_set_color(viewport_t *vport, ipcarg_t fg_color,
    1570     ipcarg_t bg_color, ipcarg_t flags)
     1569static int fb_set_color(viewport_t *vport, sysarg_t fg_color,
     1570    sysarg_t bg_color, sysarg_t flags)
    15711571{
    15721572        return rgb_from_idx(&vport->attr, fg_color, bg_color, flags);
     
    16211621                        continue;
    16221622               
    1623                 switch (IPC_GET_METHOD(call)) {
     1623                switch (IPC_GET_IMETHOD(call)) {
    16241624                case IPC_M_PHONE_HUNGUP:
    16251625                        client_connected = false;
  • uspace/srv/hid/fb/main.c

    rcead2aa r357b5f5  
    114114                return -1;
    115115       
    116         ipcarg_t phonead;
     116        sysarg_t phonead;
    117117        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    118118                return -1;
  • uspace/srv/hid/fb/serial_console.c

    rcead2aa r357b5f5  
    5555#define MAX_CONTROL 20
    5656
    57 static ipcarg_t scr_width;
    58 static ipcarg_t scr_height;
     57static sysarg_t scr_width;
     58static sysarg_t scr_height;
    5959static bool color = true;    /**< True if producing color output. */
    6060static bool utf8 = false;    /**< True if producing UTF8 output. */
    6161static putc_function_t putc_function;
    6262
    63 static ipcarg_t lastcol = 0;
    64 static ipcarg_t lastrow = 0;
     63static sysarg_t lastcol = 0;
     64static sysarg_t lastrow = 0;
    6565static attrs_t cur_attr = {
    6666        .t = at_style,
     
    130130}
    131131
    132 void serial_goto(const ipcarg_t col, const ipcarg_t row)
     132void serial_goto(const sysarg_t col, const sysarg_t row)
    133133{
    134134        if ((col > scr_width) || (row > scr_height))
     
    252252
    253253/** Set scrolling region. */
    254 void serial_set_scroll_region(ipcarg_t last_row)
     254void serial_set_scroll_region(sysarg_t last_row)
    255255{
    256256        char control[MAX_CONTROL];
     
    269269}
    270270
    271 void serial_console_init(putc_function_t putc_fn, ipcarg_t w, ipcarg_t h)
     271void serial_console_init(putc_function_t putc_fn, sysarg_t w, sysarg_t h)
    272272{
    273273        scr_width = w;
     
    286286 *
    287287 */
    288 static void draw_text_data(keyfield_t *data, ipcarg_t x0, ipcarg_t y0,
    289     ipcarg_t width, ipcarg_t height)
     288static void draw_text_data(keyfield_t *data, sysarg_t x0, sysarg_t y0,
     289    sysarg_t width, sysarg_t height)
    290290{
    291291        attrs_t *a0 = &data[0].attrs;
    292292        serial_set_attrs(a0);
    293293       
    294         ipcarg_t y;
     294        sysarg_t y;
    295295        for (y = 0; y < height; y++) {
    296296                serial_goto(x0, y0 + y);
    297297               
    298                 ipcarg_t x;
     298                sysarg_t x;
    299299                for (x = 0; x < width; x++) {
    300300                        attrs_t *attr = &data[y * width + x].attrs;
     
    337337               
    338338                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;
    343343                ssize_t rows;
    344344               
    345345                int retval;
    346346               
    347                 switch (IPC_GET_METHOD(call)) {
     347                switch (IPC_GET_IMETHOD(call)) {
    348348                case IPC_M_PHONE_HUNGUP:
    349349                        client_connected = 0;
     
    442442                       
    443443                        if (rows >= 0) {
    444                                 if ((ipcarg_t) rows > scr_height) {
     444                                if ((sysarg_t) rows > scr_height) {
    445445                                        retval = EINVAL;
    446446                                        break;
    447447                                }
    448448                        } else {
    449                                 if ((ipcarg_t) (-rows) > scr_height) {
     449                                if ((sysarg_t) (-rows) > scr_height) {
    450450                                        retval = EINVAL;
    451451                                        break;
  • uspace/srv/hid/fb/serial_console.h

    rcead2aa r357b5f5  
    4444
    4545extern void serial_puts(const char *);
    46 extern void serial_goto(const ipcarg_t, const ipcarg_t);
     46extern void serial_goto(const sysarg_t, const sysarg_t);
    4747extern void serial_clrscr(void);
    4848extern void serial_scroll(ssize_t);
    4949extern void serial_cursor_disable(void);
    5050extern 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);
     51extern void serial_set_scroll_region(sysarg_t);
     52extern void serial_console_init(putc_function_t, sysarg_t, sysarg_t);
    5353extern void serial_client_connection(ipc_callid_t, ipc_call_t *);
    5454
  • uspace/srv/hid/kbd/generic/kbd.c

    rcead2aa r357b5f5  
    177177        while (1) {
    178178                callid = async_get_call(&call);
    179                 switch (IPC_GET_METHOD(call)) {
     179                switch (IPC_GET_IMETHOD(call)) {
    180180                case IPC_M_PHONE_HUNGUP:
    181181                        if (client_phone != -1) {
  • uspace/srv/hid/kbd/port/adb.c

    rcead2aa r357b5f5  
    7171
    7272        /* NB: The callback connection is slotted for removal */
    73         ipcarg_t phonehash;
     73        sysarg_t phonehash;
    7474        if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
    7575                printf(NAME ": Failed to create callback from device\n");
     
    105105                int retval;
    106106
    107                 switch (IPC_GET_METHOD(call)) {
     107                switch (IPC_GET_IMETHOD(call)) {
    108108                case IPC_M_PHONE_HUNGUP:
    109109                        /* TODO: Handle hangup */
  • uspace/srv/hid/kbd/port/chardev.c

    rcead2aa r357b5f5  
    9191
    9292        /* NB: The callback connection is slotted for removal */
    93         ipcarg_t phonehash;
     93        sysarg_t phonehash;
    9494        if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
    9595                printf(NAME ": Failed to create callback from device\n");
     
    125125                int retval;
    126126
    127                 switch (IPC_GET_METHOD(call)) {
     127                switch (IPC_GET_IMETHOD(call)) {
    128128                case IPC_M_PHONE_HUNGUP:
    129129                        /* TODO: Handle hangup */
  • uspace/srv/hid/kbd/port/ns16550.c

    rcead2aa r357b5f5  
    3636
    3737#include <ipc/ipc.h>
    38 #include <ipc/bus.h>
     38#include <ipc/irc.h>
    3939#include <async.h>
    4040#include <sysinfo.h>
     
    122122       
    123123        if (cir_service)
    124                 async_msg_1(cir_phone, BUS_CLEAR_INTERRUPT,
    125                     IPC_GET_METHOD(*call));
     124                async_msg_1(cir_phone, IRC_CLEAR_INTERRUPT,
     125                    IPC_GET_IMETHOD(*call));
    126126}
    127127
  • uspace/srv/hid/kbd/port/z8530.c

    rcead2aa r357b5f5  
    3636
    3737#include <ipc/ipc.h>
    38 #include <ipc/bus.h>
     38#include <ipc/irc.h>
    3939#include <async.h>
    4040#include <sysinfo.h>
     
    110110       
    111111        if (cir_service)
    112                 async_msg_1(cir_phone, BUS_CLEAR_INTERRUPT,
    113                     IPC_GET_METHOD(*call));
     112                async_msg_1(cir_phone, IRC_CLEAR_INTERRUPT,
     113                    IPC_GET_IMETHOD(*call));
    114114}
    115115
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    rcead2aa r357b5f5  
    102102        rc = devmap_device_register(NAMESPACE "/mouse", &ts->devmap_handle);
    103103        if (rc != EOK) {
    104                 devmap_hangup_phone(DEVMAP_DRIVER);
    105104                printf(NAME ": Unable to register device %s.\n",
    106105                    NAMESPACE "/mouse");
     
    382381        while (1) {
    383382                callid = async_get_call(&call);
    384                 switch (IPC_GET_METHOD(call)) {
     383                switch (IPC_GET_IMETHOD(call)) {
    385384                case IPC_M_PHONE_HUNGUP:
    386385                        if (ts->client_phone != -1) {
Note: See TracChangeset for help on using the changeset viewer.