Changeset c280d7e in mainline for uspace/lib/usbhost/src/ddf_helpers.c
- Timestamp:
- 2018-01-20T03:02:36Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 60d3f35
- Parents:
- 3cdaa7f
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-20 03:02:32)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-20 03:02:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/ddf_helpers.c
r3cdaa7f rc280d7e 224 224 } 225 225 226 /** Gets handle of the respective device. 226 /** 227 * Gets description of the device that is calling. 227 228 * 228 229 * @param[in] fun Device function. 229 * @param[out] handle Place to write the handle.230 * @param[out] desc Device descriptor to be filled. 230 231 * @return Error code. 231 232 */ 232 static int get_my_device_handle(ddf_fun_t *fun, devman_handle_t *handle) 233 { 234 assert(fun); 235 if (handle) 236 *handle = ddf_fun_get_handle(fun); 233 static int get_device_description(ddf_fun_t *fun, usb_device_desc_t *desc) 234 { 235 assert(fun); 236 device_t *dev = ddf_fun_data_get(fun); 237 assert(dev); 238 239 if (!desc) 240 return EOK; 241 242 *desc = (usb_device_desc_t) { 243 .address = dev->address, 244 .speed = dev->speed, 245 .handle = ddf_fun_get_handle(fun), 246 .iface = -1, 247 }; 237 248 return EOK; 238 249 } … … 290 301 /** USB device interface */ 291 302 static usb_iface_t usb_iface = { 292 .get_my_de vice_handle = get_my_device_handle,303 .get_my_description = get_device_description, 293 304 }; 294 305
Note:
See TracChangeset
for help on using the changeset viewer.