Changeset 63b4f90 in mainline for uspace/drv/vhc
- Timestamp:
- 2010-11-19T18:36:29Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 91db50ac
- Parents:
- 3f0a7971
- Location:
- uspace/drv/vhc
- Files:
-
- 2 added
- 14 moved
-
Makefile (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/Makefile ) (1 diff)
-
conn.h (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/conn.h ) (2 diffs)
-
conndev.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/conndev.c )
-
connhost.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/connhost.c ) (1 diff)
-
debug.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/debug.c )
-
devices.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/devices.c ) (1 diff)
-
devices.h (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/devices.h )
-
hc.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/hc.c )
-
hc.h (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/hc.h )
-
hcd.c (added)
-
hub.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/hub.c )
-
hub.h (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/hub.h )
-
hubintern.h (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/hubintern.h )
-
hubops.c (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/hubops.c )
-
vhc.ma (added)
-
vhcd.h (moved) (moved from uspace/srv/hw/bus/usb/hcd/virtual/vhcd.h ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/Makefile
r3f0a7971 r63b4f90 27 27 # 28 28 29 USPACE_PREFIX = ../../../../../.. 30 LIBS = $(LIBUSB_PREFIX)/libusb.a $(LIBUSBVIRT_PREFIX)/libusbvirt.a 31 EXTRA_CFLAGS = -I$(LIB_PREFIX) 32 BINARY = vhcd 29 USPACE_PREFIX = ../.. 30 LIBS = \ 31 $(LIBUSB_PREFIX)/libusb.a \ 32 $(LIBUSBVIRT_PREFIX)/libusbvirt.a \ 33 $(LIBDRV_PREFIX)/libdrv.a 34 EXTRA_CFLAGS += \ 35 -I$(LIB_PREFIX) \ 36 -I$(LIBDRV_PREFIX)/include 37 BINARY = vhc 33 38 34 39 SOURCES = \ -
uspace/drv/vhc/conn.h
r3f0a7971 r63b4f90 37 37 38 38 #include <usb/hcd.h> 39 #include <usb/hcdhubd.h> 39 40 #include "vhcd.h" 40 41 #include "devices.h" … … 42 43 void connection_handler_host(ipcarg_t); 43 44 void connection_handler_device(ipcarg_t, virtdev_connection_t *); 45 usb_hcd_transfer_ops_t vhc_transfer_ops; 44 46 45 47 #endif -
uspace/drv/vhc/connhost.c
r3f0a7971 r63b4f90 264 264 } 265 265 266 static int enqueue_transfer_out(usb_hc_device_t *hc, 267 usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint, 268 void *buffer, size_t size, 269 usb_hcd_transfer_callback_out_t callback, void *arg) 270 { 271 printf(NAME ": transfer OUT [%d.%d (%s); %u]\n", 272 dev->address, endpoint->endpoint, 273 usb_str_transfer_type(endpoint->transfer_type), 274 size); 275 return ENOTSUP; 276 } 277 278 static int enqueue_transfer_setup(usb_hc_device_t *hc, 279 usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint, 280 void *buffer, size_t size, 281 usb_hcd_transfer_callback_out_t callback, void *arg) 282 { 283 printf(NAME ": transfer SETUP [%d.%d (%s); %u]\n", 284 dev->address, endpoint->endpoint, 285 usb_str_transfer_type(endpoint->transfer_type), 286 size); 287 return ENOTSUP; 288 } 289 290 static int enqueue_transfer_in(usb_hc_device_t *hc, 291 usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint, 292 void *buffer, size_t size, 293 usb_hcd_transfer_callback_in_t callback, void *arg) 294 { 295 printf(NAME ": transfer IN [%d.%d (%s); %u]\n", 296 dev->address, endpoint->endpoint, 297 usb_str_transfer_type(endpoint->transfer_type), 298 size); 299 return ENOTSUP; 300 } 301 302 303 usb_hcd_transfer_ops_t vhc_transfer_ops = { 304 .transfer_out = enqueue_transfer_out, 305 .transfer_in = enqueue_transfer_in, 306 .transfer_setup = enqueue_transfer_setup 307 }; 308 266 309 /** 267 310 * @} -
uspace/drv/vhc/devices.c
r3f0a7971 r63b4f90 53 53 pos = pos->next) 54 54 55 LIST_INITIALIZE(devices);55 static LIST_INITIALIZE(devices); 56 56 57 57 /** Create virtual device. -
uspace/drv/vhc/vhcd.h
r3f0a7971 r63b4f90 36 36 #define VHCD_VHCD_H_ 37 37 38 #define NAME " hcd-virt"38 #define NAME "vhc" 39 39 #define NAME_DEV "hcd-virt-dev" 40 40 #define NAMESPACE "usb"
Note:
See TracChangeset
for help on using the changeset viewer.
