Changeset b7fd2a0 in mainline for uspace/app/vuhid
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/app/vuhid
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/vuhid/device.c
r36f0738 rb7fd2a0 41 41 #include <usb/classes/classes.h> 42 42 43 static int on_data_from_device(usbvirt_device_t *dev,43 static errno_t on_data_from_device(usbvirt_device_t *dev, 44 44 usb_endpoint_t ep, usb_transfer_type_t tr_type, 45 45 void *data, size_t data_size, size_t *actual_size) … … 58 58 } 59 59 60 static int on_data_to_device(usbvirt_device_t *dev,60 static errno_t on_data_to_device(usbvirt_device_t *dev, 61 61 usb_endpoint_t ep, usb_transfer_type_t tr_type, 62 62 const void *data, size_t data_size) … … 75 75 } 76 76 77 static int interface_life_fibril(void *arg)77 static errno_t interface_life_fibril(void *arg) 78 78 { 79 79 vuhid_interface_t *iface = arg; … … 109 109 } 110 110 111 int add_interface_by_id(vuhid_interface_t **interfaces, const char *id,111 errno_t add_interface_by_id(vuhid_interface_t **interfaces, const char *id, 112 112 usbvirt_device_t *dev) 113 113 { … … 161 161 162 162 /* From now on, in case of errors, we goto to error_leave */ 163 int rc;163 errno_t rc; 164 164 165 165 /* -
uspace/app/vuhid/hids/bootkbd.c
r36f0738 rb7fd2a0 101 101 }; 102 102 103 static int on_data_out(vuhid_interface_t *iface,103 static errno_t on_data_out(vuhid_interface_t *iface, 104 104 const void *buffer, size_t buffer_size) 105 105 { -
uspace/app/vuhid/life.c
r36f0738 rb7fd2a0 56 56 57 57 58 int interface_live_on_data_in(vuhid_interface_t *iface,58 errno_t interface_live_on_data_in(vuhid_interface_t *iface, 59 59 void *buffer, size_t buffer_size, size_t *act_buffer_size) 60 60 { -
uspace/app/vuhid/main.c
r36f0738 rb7fd2a0 216 216 /* Determine which interfaces to initialize. */ 217 217 for (int i = optind; i < argc; i++) { 218 int rc = add_interface_by_id(available_hid_interfaces, argv[i],218 errno_t rc = add_interface_by_id(available_hid_interfaces, argv[i], 219 219 &hid_dev); 220 220 if (rc != EOK) { … … 234 234 } 235 235 236 const int rc = usbvirt_device_plug(&hid_dev, controller);236 const errno_t rc = usbvirt_device_plug(&hid_dev, controller); 237 237 if (rc != EOK) { 238 238 printf("Unable to start communication with VHCD `%s': %s.\n", -
uspace/app/vuhid/stdreq.c
r36f0738 rb7fd2a0 43 43 vuhid_data_t *vuhid = device->device_data 44 44 45 int req_get_descriptor(usbvirt_device_t *device,45 errno_t req_get_descriptor(usbvirt_device_t *device, 46 46 const usb_device_request_setup_packet_t *setup_packet, 47 47 uint8_t *data, size_t *act_size) … … 70 70 } 71 71 72 int req_set_protocol(usbvirt_device_t *device,72 errno_t req_set_protocol(usbvirt_device_t *device, 73 73 const usb_device_request_setup_packet_t *setup_packet, 74 74 uint8_t *data, size_t *act_size) … … 89 89 } 90 90 91 int req_set_report(usbvirt_device_t *device,91 errno_t req_set_report(usbvirt_device_t *device, 92 92 const usb_device_request_setup_packet_t *setup_packet, 93 93 uint8_t *data, size_t *act_size) … … 109 109 110 110 /* SET_REPORT is translated to data out */ 111 int rc = iface->on_data_out(iface, data, data_length);111 errno_t rc = iface->on_data_out(iface, data, data_length); 112 112 113 113 return rc; -
uspace/app/vuhid/stdreq.h
r36f0738 rb7fd2a0 38 38 #include <usbvirt/device.h> 39 39 40 int req_get_descriptor(usbvirt_device_t *device,40 errno_t req_get_descriptor(usbvirt_device_t *device, 41 41 const usb_device_request_setup_packet_t *setup_packet, 42 42 uint8_t *data, size_t *act_size); 43 43 44 int req_set_protocol(usbvirt_device_t *device,44 errno_t req_set_protocol(usbvirt_device_t *device, 45 45 const usb_device_request_setup_packet_t *setup_packet, 46 46 uint8_t *data, size_t *act_size); 47 47 48 int req_set_report(usbvirt_device_t *device,48 errno_t req_set_report(usbvirt_device_t *device, 49 49 const usb_device_request_setup_packet_t *setup_packet, 50 50 uint8_t *data, size_t *act_size); -
uspace/app/vuhid/virthid.h
r36f0738 rb7fd2a0 70 70 size_t out_data_size; 71 71 72 int (*on_data_in)(vuhid_interface_t *, void *, size_t, size_t *);73 int (*on_data_out)(vuhid_interface_t *, const void *, size_t);72 errno_t (*on_data_in)(vuhid_interface_t *, void *, size_t, size_t *); 73 errno_t (*on_data_out)(vuhid_interface_t *, const void *, size_t); 74 74 void (*live)(vuhid_interface_t *); 75 75 … … 114 114 } __attribute__ ((packed)) hid_descriptor_t; 115 115 116 int add_interface_by_id(vuhid_interface_t **, const char *, usbvirt_device_t *);116 errno_t add_interface_by_id(vuhid_interface_t **, const char *, usbvirt_device_t *); 117 117 void wait_for_interfaces_death(usbvirt_device_t *); 118 118 119 119 void interface_life_live(vuhid_interface_t *); 120 int interface_live_on_data_in(vuhid_interface_t *, void *, size_t, size_t *);120 errno_t interface_live_on_data_in(vuhid_interface_t *, void *, size_t, size_t *); 121 121 122 122
Note:
See TracChangeset
for help on using the changeset viewer.