Changeset b8a3cda in mainline for uspace/srv/hw/bus/usb/hcd/virtual/hub.c
- Timestamp:
- 2010-10-22T14:57:03Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7a7bfeb3
- Parents:
- 954ea70
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/bus/usb/hcd/virtual/hub.c
r954ea70 rb8a3cda 37 37 #include <usbvirt/device.h> 38 38 #include <errno.h> 39 #include <stdlib.h> 39 40 40 41 #include "vhcd.h" … … 143 144 hub_device_t hub_dev; 144 145 146 static int send_data(struct usbvirt_device *dev, 147 usb_endpoint_t endpoint, void *buffer, size_t size) 148 { 149 usb_target_t target = { dev->address, endpoint }; 150 void *my_buffer = NULL; 151 if (size > 0) { 152 my_buffer = malloc(size); 153 memcpy(my_buffer, buffer, size); 154 } 155 hc_fillin_transaction_from_device(target, my_buffer, size); 156 157 return EOK; 158 } 159 145 160 void hub_init(void) 146 161 { … … 155 170 156 171 usbvirt_connect_local(&virthub_dev); 172 virthub_dev.send_data = send_data; 157 173 158 174 printf("%s: virtual hub (%d ports) created.\n", NAME, HUB_PORT_COUNT);
Note:
See TracChangeset
for help on using the changeset viewer.