Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/serial_console.c

    r4f14e1f8 r7e752b2  
    3939
    4040#include <stdio.h>
     41#include <ipc/ipc.h>
    4142#include <async.h>
    4243#include <ipc/fb.h>
     
    5455#define MAX_CONTROL 20
    5556
    56 static sysarg_t scr_width;
    57 static sysarg_t scr_height;
     57static ipcarg_t scr_width;
     58static ipcarg_t scr_height;
    5859static bool color = true;    /**< True if producing color output. */
    5960static bool utf8 = false;    /**< True if producing UTF8 output. */
    6061static putc_function_t putc_function;
    6162
    62 static sysarg_t lastcol = 0;
    63 static sysarg_t lastrow = 0;
     63static ipcarg_t lastcol = 0;
     64static ipcarg_t lastrow = 0;
    6465static attrs_t cur_attr = {
    6566        .t = at_style,
     
    129130}
    130131
    131 void serial_goto(const sysarg_t col, const sysarg_t row)
     132void serial_goto(const ipcarg_t col, const ipcarg_t row)
    132133{
    133134        if ((col > scr_width) || (row > scr_height))
     
    251252
    252253/** Set scrolling region. */
    253 void serial_set_scroll_region(sysarg_t last_row)
     254void serial_set_scroll_region(ipcarg_t last_row)
    254255{
    255256        char control[MAX_CONTROL];
     
    268269}
    269270
    270 void serial_console_init(putc_function_t putc_fn, sysarg_t w, sysarg_t h)
     271void serial_console_init(putc_function_t putc_fn, ipcarg_t w, ipcarg_t h)
    271272{
    272273        scr_width = w;
     
    285286 *
    286287 */
    287 static void draw_text_data(keyfield_t *data, sysarg_t x0, sysarg_t y0,
    288     sysarg_t width, sysarg_t height)
     288static void draw_text_data(keyfield_t *data, ipcarg_t x0, ipcarg_t y0,
     289    ipcarg_t width, ipcarg_t height)
    289290{
    290291        attrs_t *a0 = &data[0].attrs;
    291292        serial_set_attrs(a0);
    292293       
    293         sysarg_t y;
     294        ipcarg_t y;
    294295        for (y = 0; y < height; y++) {
    295296                serial_goto(x0, y0 + y);
    296297               
    297                 sysarg_t x;
     298                ipcarg_t x;
    298299                for (x = 0; x < width; x++) {
    299300                        attrs_t *attr = &data[y * width + x].attrs;
     
    318319       
    319320        if (client_connected) {
    320                 async_answer_0(iid, ELIMIT);
     321                ipc_answer_0(iid, ELIMIT);
    321322                return;
    322323        }
    323324       
    324325        client_connected = 1;
    325         async_answer_0(iid, EOK);
     326        ipc_answer_0(iid, EOK);
    326327       
    327328        /* Clear the terminal, set scrolling region
     
    336337               
    337338                wchar_t c;
    338                 sysarg_t col;
    339                 sysarg_t row;
    340                 sysarg_t w;
    341                 sysarg_t h;
     339                ipcarg_t col;
     340                ipcarg_t row;
     341                ipcarg_t w;
     342                ipcarg_t h;
    342343                ssize_t rows;
    343344               
    344345                int retval;
    345346               
    346                 switch (IPC_GET_IMETHOD(call)) {
     347                switch (IPC_GET_METHOD(call)) {
    347348                case IPC_M_PHONE_HUNGUP:
    348349                        client_connected = 0;
    349                         async_answer_0(callid, EOK);
     350                        ipc_answer_0(callid, EOK);
    350351                       
    351352                        /* Exit thread */
     
    406407                        break;
    407408                case FB_GET_CSIZE:
    408                         async_answer_2(callid, EOK, scr_width, scr_height);
     409                        ipc_answer_2(callid, EOK, scr_width, scr_height);
    409410                        continue;
    410411                case FB_GET_COLOR_CAP:
    411                         async_answer_1(callid, EOK, color ? FB_CCAP_INDEXED :
     412                        ipc_answer_1(callid, EOK, color ? FB_CCAP_INDEXED :
    412413                            FB_CCAP_STYLE);
    413414                        continue;
     
    441442                       
    442443                        if (rows >= 0) {
    443                                 if ((sysarg_t) rows > scr_height) {
     444                                if ((ipcarg_t) rows > scr_height) {
    444445                                        retval = EINVAL;
    445446                                        break;
    446447                                }
    447448                        } else {
    448                                 if ((sysarg_t) (-rows) > scr_height) {
     449                                if ((ipcarg_t) (-rows) > scr_height) {
    449450                                        retval = EINVAL;
    450451                                        break;
     
    477478                        retval = ENOENT;
    478479                }
    479                 async_answer_0(callid, retval);
     480                ipc_answer_0(callid, retval);
    480481        }
    481482}
Note: See TracChangeset for help on using the changeset viewer.