Changeset a35b458 in mainline for uspace/srv/hid/input/proto/mousedev.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/proto/mousedev.c
r3061bc1 ra35b458 59 59 if (mousedev == NULL) 60 60 return NULL; 61 61 62 62 mousedev->mouse_dev = mdev; 63 63 64 64 return mousedev; 65 65 } … … 75 75 /* Mousedev device structure */ 76 76 mousedev_t *mousedev = (mousedev_t *) arg; 77 77 78 78 while (true) { 79 79 ipc_call_t call; 80 80 ipc_callid_t callid = async_get_call(&call); 81 81 82 82 if (!IPC_GET_IMETHOD(call)) { 83 83 mousedev_destroy(mousedev); 84 84 return; 85 85 } 86 86 87 87 errno_t retval; 88 88 89 89 switch (IPC_GET_IMETHOD(call)) { 90 90 case MOUSEEV_MOVE_EVENT: … … 109 109 break; 110 110 } 111 111 112 112 async_answer_0(callid, retval); 113 113 } … … 122 122 return ENOENT; 123 123 } 124 124 125 125 mousedev_t *mousedev = mousedev_new(mdev); 126 126 if (mousedev == NULL) { … … 130 130 return ENOMEM; 131 131 } 132 132 133 133 async_exch_t *exch = async_exchange_begin(sess); 134 134 if (exch == NULL) { … … 139 139 return ENOENT; 140 140 } 141 141 142 142 port_id_t port; 143 143 errno_t rc = async_create_callback_port(exch, INTERFACE_MOUSE_CB, 0, 0, 144 144 mousedev_callback_conn, mousedev, &port); 145 145 146 146 async_exchange_end(exch); 147 147 async_hangup(sess); 148 148 149 149 if (rc != EOK) { 150 150 printf("%s: Failed creating callback connection from '%s'.\n", … … 153 153 return rc; 154 154 } 155 155 156 156 return EOK; 157 157 }
Note:
See TracChangeset
for help on using the changeset viewer.