Changes in uspace/lib/drv/generic/remote_usbhc.c [27736cf:bbce2c2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_usbhc.c
r27736cf rbbce2c2 55 55 static remote_iface_func_ptr_t remote_usbhc_iface_ops[] = { 56 56 [IPC_M_USBHC_REQUEST_ADDRESS] = remote_usbhc_request_address, 57 [IPC_M_USBHC_RELEASE_ADDRESS] = remote_usbhc_release_address,58 57 [IPC_M_USBHC_BIND_ADDRESS] = remote_usbhc_bind_address, 59 58 [IPC_M_USBHC_GET_HANDLE_BY_ADDRESS] = remote_usbhc_find_by_address, 59 [IPC_M_USBHC_RELEASE_ADDRESS] = remote_usbhc_release_address, 60 60 61 61 [IPC_M_USBHC_REGISTER_ENDPOINT] = remote_usbhc_register_endpoint, … … 118 118 } 119 119 120 usb_address_t address = DEV_IPC_GET_ARG1(*call); 121 const bool strict = DEV_IPC_GET_ARG2(*call); 122 const usb_speed_t speed = DEV_IPC_GET_ARG3(*call); 123 124 const int rc = usb_iface->request_address(fun, &address, strict, speed); 120 usb_speed_t speed = DEV_IPC_GET_ARG1(*call); 121 122 usb_address_t address; 123 int rc = usb_iface->request_address(fun, speed, &address); 125 124 if (rc != EOK) { 126 125 async_answer_0(callid, rc); … … 234 233 235 234 #define _INIT_FROM_HIGH_DATA2(type, var, arg_no) \ 236 type var = (type) (DEV_IPC_GET_ARG##arg_no(*call) >>16)235 type var = (type) DEV_IPC_GET_ARG##arg_no(*call) / (1 << 16) 237 236 #define _INIT_FROM_LOW_DATA2(type, var, arg_no) \ 238 type var = (type) (DEV_IPC_GET_ARG##arg_no(*call) & 0xffff) 237 type var = (type) DEV_IPC_GET_ARG##arg_no(*call) % (1 << 16) 238 #define _INIT_FROM_HIGH_DATA3(type, var, arg_no) \ 239 type var = (type) DEV_IPC_GET_ARG##arg_no(*call) / (1 << 16) 240 #define _INIT_FROM_MIDDLE_DATA3(type, var, arg_no) \ 241 type var = (type) (DEV_IPC_GET_ARG##arg_no(*call) / (1 << 8)) % (1 << 8) 242 #define _INIT_FROM_LOW_DATA3(type, var, arg_no) \ 243 type var = (type) DEV_IPC_GET_ARG##arg_no(*call) % (1 << 8) 239 244 240 245 const usb_target_t target = { .packed = DEV_IPC_GET_ARG1(*call) }; 241 246 242 _INIT_FROM_HIGH_DATA2(usb_transfer_type_t, transfer_type, 2); 243 _INIT_FROM_LOW_DATA2(usb_direction_t, direction, 2); 247 _INIT_FROM_HIGH_DATA3(usb_speed_t, speed, 2); 248 _INIT_FROM_MIDDLE_DATA3(usb_transfer_type_t, transfer_type, 2); 249 _INIT_FROM_LOW_DATA3(usb_direction_t, direction, 2); 244 250 245 251 _INIT_FROM_HIGH_DATA2(size_t, max_packet_size, 3); … … 248 254 #undef _INIT_FROM_HIGH_DATA2 249 255 #undef _INIT_FROM_LOW_DATA2 250 251 int rc = usb_iface->register_endpoint(fun, target.address, 256 #undef _INIT_FROM_HIGH_DATA3 257 #undef _INIT_FROM_MIDDLE_DATA3 258 #undef _INIT_FROM_LOW_DATA3 259 260 int rc = usb_iface->register_endpoint(fun, target.address, speed, 252 261 target.endpoint, transfer_type, direction, max_packet_size, interval); 253 262
Note:
See TracChangeset
for help on using the changeset viewer.