Changeset ffa2c8ef in mainline for uspace/srv/hid/adb_mouse
- Timestamp:
- 2011-01-29T11:36:08Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46b881c
- Parents:
- 64d2b10
- Location:
- uspace/srv/hid/adb_mouse
- Files:
-
- 2 edited
-
adb_dev.c (modified) (3 diffs)
-
adb_mouse.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/adb_mouse/adb_dev.c
r64d2b10 rffa2c8ef 34 34 */ 35 35 36 #include <ipc/ipc.h>37 36 #include <ipc/adb.h> 38 37 #include <async.h> … … 68 67 69 68 /* NB: The callback connection is slotted for removal */ 70 sysarg_t taskhash; 71 sysarg_t phonehash; 72 if (ipc_connect_to_me(dev_phone, 0, 0, 0, &taskhash, &phonehash) != 0) { 69 if (async_connect_to_me(dev_phone, 0, 0, 0, adb_dev_events) != 0) { 73 70 printf(NAME ": Failed to create callback from device\n"); 74 71 return false; 75 72 } 76 77 async_new_connection(taskhash, phonehash, 0, NULL, adb_dev_events); 78 73 79 74 return 0; 80 75 } … … 100 95 retval = ENOENT; 101 96 } 102 ipc_answer_0(callid, retval);97 async_answer_0(callid, retval); 103 98 } 104 99 } -
uspace/srv/hid/adb_mouse/adb_mouse.c
r64d2b10 rffa2c8ef 39 39 */ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/mouse.h> 43 42 #include <stdio.h> … … 98 97 int retval; 99 98 100 ipc_answer_0(iid, EOK);99 async_answer_0(iid, EOK); 101 100 102 101 while (1) { … … 105 104 case IPC_M_PHONE_HUNGUP: 106 105 if (client_phone != -1) { 107 ipc_hangup(client_phone);106 async_hangup(client_phone); 108 107 client_phone = -1; 109 108 } 110 109 111 ipc_answer_0(callid, EOK);110 async_answer_0(callid, EOK); 112 111 return; 113 112 case IPC_M_CONNECT_TO_ME: … … 122 121 retval = EINVAL; 123 122 } 124 ipc_answer_0(callid, retval);123 async_answer_0(callid, retval); 125 124 } 126 125 }
Note:
See TracChangeset
for help on using the changeset viewer.
