Ignore:
Timestamp:
2011-07-20T15:26:21Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
efcebe1
Parents:
25bef0ff (diff), a701812 (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.

File:
1 edited

Legend:

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

    r25bef0ff r6a44ee4  
    4242#include <io/console.h>
    4343#include <vfs/vfs.h>
    44 #include <ipc/mouse.h>
     44#include <ipc/mouseev.h>
    4545#include <async.h>
     46#include <async_obsolete.h>
    4647#include <unistd.h>
    4748#include <stdio.h>
     
    5051#include <errno.h>
    5152#include <inttypes.h>
    52 
    5353#include "s3c24xx_ts.h"
    5454
     55// FIXME: remove this header
     56#include <kernel/ipc/ipc_methods.h>
     57
    5558#define NAME "s3c24ser"
    56 #define NAMESPACE "hid_in"
     59#define NAMESPACE "hid"
    5760
    5861static irq_cmd_t ts_irq_cmds[] = {
     
    7073static s3c24xx_ts_t *ts;
    7174
    72 static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall);
     75static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall,
     76    void *arg);
    7377static void s3c24xx_ts_irq_handler(ipc_callid_t iid, ipc_call_t *call);
    7478static void s3c24xx_ts_pen_down(s3c24xx_ts_t *ts);
     
    280284        button = 1;
    281285        press = 0;
    282         async_msg_2(ts->client_phone, MEVENT_BUTTON, button, press);
     286        async_obsolete_msg_2(ts->client_phone, MOUSEEV_BUTTON_EVENT, button, press);
    283287
    284288        s3c24xx_ts_wait_for_int_mode(ts, updn_down);
     
    321325
    322326        /* Send notifications to client. */
    323         async_msg_2(ts->client_phone, MEVENT_MOVE, dx, dy);
    324         async_msg_2(ts->client_phone, MEVENT_BUTTON, button, press);
     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);
    325329
    326330        ts->last_x = x_pos;
     
    370374
    371375/** Handle mouse client connection. */
    372 static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall)
     376static void s3c24xx_ts_connection(ipc_callid_t iid, ipc_call_t *icall,
     377    void *arg)
    373378{
    374379        ipc_callid_t callid;
     
    380385        while (1) {
    381386                callid = async_get_call(&call);
    382                 switch (IPC_GET_IMETHOD(call)) {
    383                 case IPC_M_PHONE_HUNGUP:
     387               
     388                if (!IPC_GET_IMETHOD(call)) {
    384389                        if (ts->client_phone != -1) {
    385                                 async_hangup(ts->client_phone);
     390                                async_obsolete_hangup(ts->client_phone);
    386391                                ts->client_phone = -1;
    387392                        }
     
    389394                        async_answer_0(callid, EOK);
    390395                        return;
     396                }
     397               
     398                switch (IPC_GET_IMETHOD(call)) {
    391399                case IPC_M_CONNECT_TO_ME:
    392400                        if (ts->client_phone != -1) {
Note: See TracChangeset for help on using the changeset viewer.