Changeset 984a9ba in mainline for uspace/drv/hid/usbhid
- Timestamp:
- 2018-07-05T09:34:09Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- Location:
- uspace/drv/hid/usbhid
- Files:
-
- 3 edited
-
kbd/kbddev.c (modified) (7 diffs)
-
mouse/mousedev.c (modified) (4 diffs)
-
multimedia/multimedia.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/usbhid/kbd/kbddev.c
r76f566d r984a9ba 72 72 #include "../usbhid.h" 73 73 74 static void default_connection_handler(ddf_fun_t *, cap_call_handle_t,ipc_call_t *);74 static void default_connection_handler(ddf_fun_t *, ipc_call_t *); 75 75 static ddf_dev_ops_t kbdops = { .default_handler = default_connection_handler }; 76 76 … … 148 148 /* IPC method handler */ 149 149 150 /** 151 * Default handler for IPC methods not handled by DDF. 150 /** Default handler for IPC methods not handled by DDF. 152 151 * 153 152 * Currently recognizes only two methods (IPC_M_CONNECT_TO_ME and KBDEV_SET_IND) … … 156 155 * KBDEV_SET_IND sets LED keyboard indicators. 157 156 * 158 * @param fun Device function handling the call. 159 * @param icall_handle Call handle. 160 * @param icall Call data. 161 */ 162 static void 163 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 164 ipc_call_t *icall) 157 * @param fun Device function handling the call. 158 * @param icall Call data. 159 * 160 */ 161 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 165 162 { 166 163 const sysarg_t method = IPC_GET_IMETHOD(*icall); … … 172 169 kbd_dev->mods = IPC_GET_ARG1(*icall); 173 170 usb_kbd_set_led(kbd_dev->hid_dev, kbd_dev); 174 async_answer_0(icall _handle, EOK);171 async_answer_0(icall, EOK); 175 172 break; 176 173 /* … … 184 181 usb_log_warning( 185 182 "Failed to create start console session.\n"); 186 async_answer_0(icall _handle, EAGAIN);183 async_answer_0(icall, EAGAIN); 187 184 break; 188 185 } … … 190 187 kbd_dev->client_sess = sess; 191 188 usb_log_debug("%s: OK", __FUNCTION__); 192 async_answer_0(icall _handle, EOK);189 async_answer_0(icall, EOK); 193 190 } else { 194 191 usb_log_error("%s: console session already set", 195 192 __FUNCTION__); 196 async_answer_0(icall _handle, ELIMIT);193 async_answer_0(icall, ELIMIT); 197 194 } 198 195 break; … … 200 197 usb_log_error("%s: Unknown method: %d.", 201 198 __FUNCTION__, (int) method); 202 async_answer_0(icall _handle, EINVAL);199 async_answer_0(icall, EINVAL); 203 200 break; 204 201 } -
uspace/drv/hid/usbhid/mouse/mousedev.c
r76f566d r984a9ba 56 56 #define NAME "mouse" 57 57 58 static void default_connection_handler(ddf_fun_t *, cap_call_handle_t,ipc_call_t *);58 static void default_connection_handler(ddf_fun_t *, ipc_call_t *); 59 59 60 60 static ddf_dev_ops_t ops = { .default_handler = default_connection_handler }; … … 110 110 /** Default handler for IPC methods not handled by DDF. 111 111 * 112 * @param fun Device function handling the call. 113 * @param icall_handle Call handle. 114 * @param icall Call data. 115 */ 116 static void 117 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 118 ipc_call_t *icall) 112 * @param fun Device function handling the call. 113 * @param icall Call data. 114 * 115 */ 116 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 119 117 { 120 118 usb_mouse_t *mouse_dev = ddf_fun_data_get(fun); … … 122 120 if (mouse_dev == NULL) { 123 121 usb_log_debug("%s: Missing parameters.", __FUNCTION__); 124 async_answer_0(icall _handle, EINVAL);122 async_answer_0(icall, EINVAL); 125 123 return; 126 124 } … … 137 135 usb_log_debug("Console session to %s set ok (%p).", 138 136 ddf_fun_get_name(fun), sess); 139 async_answer_0(icall _handle, EOK);137 async_answer_0(icall, EOK); 140 138 } else { 141 139 usb_log_error("Console session to %s already set.", 142 140 ddf_fun_get_name(fun)); 143 async_answer_0(icall _handle, ELIMIT);141 async_answer_0(icall, ELIMIT); 144 142 async_hangup(sess); 145 143 } 146 144 } else { 147 145 usb_log_debug("%s: Invalid function.", __FUNCTION__); 148 async_answer_0(icall _handle, EINVAL);146 async_answer_0(icall, EINVAL); 149 147 } 150 148 } -
uspace/drv/hid/usbhid/multimedia/multimedia.c
r76f566d r984a9ba 73 73 74 74 75 /** 76 * Default handler for IPC methods not handled by DDF. 75 /** Default handler for IPC methods not handled by DDF. 77 76 * 78 77 * Currently recognizes only one method (IPC_M_CONNECT_TO_ME), in which case it … … 80 79 * later use by the driver to notify about key events. 81 80 * 82 * @param fun Device function handling the call. 83 * @param icall_handle Call handle. 84 * @param icall Call data. 85 */ 86 static void 87 default_connection_handler(ddf_fun_t *fun, cap_call_handle_t icall_handle, 88 ipc_call_t *icall) 81 * @param fun Device function handling the call. 82 * @param icall Call data. 83 * 84 */ 85 static void default_connection_handler(ddf_fun_t *fun, ipc_call_t *icall) 89 86 { 90 87 usb_log_debug(NAME " default_connection_handler()"); … … 99 96 usb_log_debug(NAME " Saved session to console: %p", 100 97 sess); 101 async_answer_0(icall _handle, EOK);98 async_answer_0(icall, EOK); 102 99 } else 103 async_answer_0(icall _handle, ELIMIT);100 async_answer_0(icall, ELIMIT); 104 101 } else 105 async_answer_0(icall _handle, EINVAL);102 async_answer_0(icall, EINVAL); 106 103 } 107 104
Note:
See TracChangeset
for help on using the changeset viewer.
