Changeset 99a1a56 in mainline
- Timestamp:
- 2011-11-05T13:37:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 904dcc6
- Parents:
- 37e4025
- Location:
- uspace/lib/usbdev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/poll.h
r37e4025 r99a1a56 84 84 } usb_device_auto_polling_t; 85 85 86 int usb_device_auto_polling(usb_device_t *, size_t, usb_device_auto_polling_t *,87 size_t, void *);86 int usb_device_auto_polling(usb_device_t *, size_t, 87 const usb_device_auto_polling_t *, size_t, void *); 88 88 89 89 typedef bool (*usb_polling_callback_t)(usb_device_t *, -
uspace/lib/usbdev/include/usb/dev/request.h
r37e4025 r99a1a56 130 130 int usb_request_set_descriptor(usb_pipe_t *, usb_request_type_t, 131 131 usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void *, size_t); 132 132 133 int usb_request_get_configuration(usb_pipe_t *, uint8_t *); 133 134 int usb_request_set_configuration(usb_pipe_t *, uint8_t); -
uspace/lib/usbdev/src/devpoll.c
r37e4025 r99a1a56 213 213 } 214 214 215 usb_device_auto_polling_t *auto_polling 216 = malloc(sizeof(usb_device_auto_polling_t)); 217 if (auto_polling == NULL) { 218 return ENOMEM; 219 } 220 221 auto_polling->debug = 1; 222 auto_polling->auto_clear_halt = true; 223 auto_polling->delay = 0; 224 auto_polling->max_failures = MAX_FAILED_ATTEMPTS; 225 auto_polling->on_data = callback; 226 auto_polling->on_polling_end = terminated_callback; 227 auto_polling->on_error = NULL; 228 229 int rc = usb_device_auto_polling(dev, pipe_index, auto_polling, 215 const usb_device_auto_polling_t auto_polling = { 216 .debug = 1, 217 .auto_clear_halt = true, 218 .delay = 0, 219 .max_failures = MAX_FAILED_ATTEMPTS, 220 .on_data = callback, 221 .on_polling_end = terminated_callback, 222 .on_error = NULL, 223 }; 224 225 return usb_device_auto_polling(dev, pipe_index, &auto_polling, 230 226 request_size, arg); 231 232 free(auto_polling);233 234 return rc;235 227 } 236 228 … … 253 245 */ 254 246 int usb_device_auto_polling(usb_device_t *dev, size_t pipe_index, 255 usb_device_auto_polling_t *polling,247 const usb_device_auto_polling_t *polling, 256 248 size_t request_size, void *arg) 257 249 {
Note:
See TracChangeset
for help on using the changeset viewer.