Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    rc0699467 rffa2c8ef  
    4242#include <io/console.h>
    4343#include <vfs/vfs.h>
    44 #include <ipc/mouseev.h>
     44#include <ipc/mouse.h>
    4545#include <async.h>
    46 #include <async_obsolete.h>
    4746#include <unistd.h>
    4847#include <stdio.h>
     
    5150#include <errno.h>
    5251#include <inttypes.h>
     52
    5353#include "s3c24xx_ts.h"
    5454
    55 // FIXME: remove this header
    56 #include <abi/ipc/methods.h>
    57 
    5855#define NAME "s3c24ser"
    59 #define NAMESPACE "hid"
     56#define NAMESPACE "hid_in"
    6057
    6158static irq_cmd_t ts_irq_cmds[] = {
     
    7370static s3c24xx_ts_t *ts;
    7471
    75 static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall,
    76     void *arg);
     72static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall);
    7773static void s3c24xx_ts_irq_handler(ipc_callid_t iid, ipc_call_t *call);
    7874static void s3c24xx_ts_pen_down(s3c24xx_ts_t *ts);
     
    284280        button = 1;
    285281        press = 0;
    286         async_obsolete_msg_2(ts->client_phone, MOUSEEV_BUTTON_EVENT, button, press);
     282        async_msg_2(ts->client_phone, MEVENT_BUTTON, button, press);
    287283
    288284        s3c24xx_ts_wait_for_int_mode(ts, updn_down);
     
    325321
    326322        /* Send notifications to client. */
    327         async_obsolete_msg_2(ts->client_phone, MOUSEEV_MOVE_EVENT, dx, dy);
    328         async_obsolete_msg_2(ts->client_phone, MOUSEEV_BUTTON_EVENT, button, press);
     323        async_msg_2(ts->client_phone, MEVENT_MOVE, dx, dy);
     324        async_msg_2(ts->client_phone, MEVENT_BUTTON, button, press);
    329325
    330326        ts->last_x = x_pos;
     
    374370
    375371/** Handle mouse client connection. */
    376 static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall,
    377     void *arg)
     372static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall)
    378373{
    379374        ipc_callid_t callid;
     
    385380        while (1) {
    386381                callid = async_get_call(&call);
    387                
    388                 if (!IPC_GET_IMETHOD(call)) {
     382                switch (IPC_GET_IMETHOD(call)) {
     383                case IPC_M_PHONE_HUNGUP:
    389384                        if (ts->client_phone != -1) {
    390                                 async_obsolete_hangup(ts->client_phone);
     385                                async_hangup(ts->client_phone);
    391386                                ts->client_phone = -1;
    392387                        }
     
    394389                        async_answer_0(callid, EOK);
    395390                        return;
    396                 }
    397                
    398                 switch (IPC_GET_IMETHOD(call)) {
    399391                case IPC_M_CONNECT_TO_ME:
    400392                        if (ts->client_phone != -1) {
Note: See TracChangeset for help on using the changeset viewer.