Changeset aca85e4 in mainline
- Timestamp:
- 2010-12-05T10:19:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 818dc00
- Parents:
- 35537a7 (diff), f995350 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 5 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/Makefile
r35537a7 raca85e4 31 31 BINARY = tester 32 32 33 LIBS += $(LIBUSB_PREFIX)/libusb.a 34 EXTRA_CFLAGS += -I$(LIBUSB_PREFIX)/include 35 33 36 SOURCES = \ 34 37 tester.c \ 38 adt/usbaddrkeep.c \ 35 39 thread/thread1.c \ 36 40 print/print1.c \ -
uspace/app/tester/tester.c
r35537a7 raca85e4 65 65 #include "mm/malloc1.def" 66 66 #include "hw/serial/serial1.def" 67 #include "adt/usbaddrkeep.def" 67 68 {NULL, NULL, NULL, false} 68 69 }; -
uspace/app/tester/tester.h
r35537a7 raca85e4 82 82 extern const char *test_malloc1(void); 83 83 extern const char *test_serial1(void); 84 extern const char *test_usbaddrkeep(void); 84 85 85 86 extern test_t tests[]; -
uspace/drv/vhc/Makefile
r35537a7 raca85e4 39 39 40 40 SOURCES = \ 41 addrmgm.c \42 41 conndev.c \ 43 42 connhost.c \ -
uspace/drv/vhc/conn.h
r35537a7 raca85e4 48 48 49 49 void address_init(void); 50 int reserve_default_address(device_t *);51 int release_default_address(device_t *);52 int request_address(device_t *, usb_address_t *);53 int release_address(device_t *, usb_address_t);54 int bind_address(device_t *, usb_address_t, devman_handle_t);55 50 56 int tell_address(device_t *, devman_handle_t, usb_address_t *);57 51 58 52 void default_connection_handler(device_t *, ipc_callid_t, ipc_call_t *); -
uspace/drv/vhc/connhost.c
r35537a7 raca85e4 36 36 #include <errno.h> 37 37 #include <usb/usb.h> 38 #include <usb/hcd.h> 38 39 39 40 #include "vhcd.h" … … 218 219 } 219 220 221 static usb_address_keeping_t addresses; 222 223 224 static int reserve_default_address(device_t *dev) 225 { 226 usb_address_keeping_reserve_default(&addresses); 227 return EOK; 228 } 229 230 static int release_default_address(device_t *dev) 231 { 232 usb_address_keeping_release_default(&addresses); 233 return EOK; 234 } 235 236 static int request_address(device_t *dev, usb_address_t *address) 237 { 238 usb_address_t addr = usb_address_keeping_request(&addresses); 239 if (addr < 0) { 240 return (int)addr; 241 } 242 243 *address = addr; 244 return EOK; 245 } 246 247 static int release_address(device_t *dev, usb_address_t address) 248 { 249 return usb_address_keeping_release(&addresses, address); 250 } 251 252 static int bind_address(device_t *dev, usb_address_t address, 253 devman_handle_t handle) 254 { 255 usb_address_keeping_devman_bind(&addresses, address, handle); 256 return EOK; 257 } 258 259 static int tell_address(device_t *dev, devman_handle_t handle, 260 usb_address_t *address) 261 { 262 usb_address_t addr = usb_address_keeping_find(&addresses, handle); 263 if (addr < 0) { 264 return addr; 265 } 266 267 *address = addr; 268 return EOK; 269 } 270 271 void address_init(void) 272 { 273 usb_address_keeping_init(&addresses, 50); 274 } 220 275 221 276 usbhc_iface_t vhc_iface = { -
uspace/lib/usb/Makefile
r35537a7 raca85e4 33 33 34 34 SOURCES = \ 35 src/addrkeep.c \ 35 36 src/hcdhubd.c \ 36 37 src/hcdrv.c \ … … 38 39 src/remotedrv.c \ 39 40 src/usb.c \ 41 src/usbdrvreq.c \ 40 42 src/usbdrv.c 41 43 -
uspace/lib/usb/include/usb/usb.h
r35537a7 raca85e4 69 69 typedef int usb_address_t; 70 70 71 /** Default USB address. */ 72 #define USB_ADDRESS_DEFAULT 0 73 71 74 /** USB endpoint number type. 72 75 * Negative values could be used to indicate error. -
uspace/lib/usb/include/usb/usbdrv.h
r35537a7 raca85e4 36 36 #define LIBUSB_USBDRV_H_ 37 37 38 #include "usb.h"38 #include <usb/usb.h> 39 39 #include <driver.h> 40 40 … … 70 70 int usb_drv_async_wait_for(usb_handle_t); 71 71 72 73 int usb_drv_req_set_address(int, usb_address_t, usb_address_t); 74 72 75 #endif 73 76 /**
Note:
See TracChangeset
for help on using the changeset viewer.