usb_controller.h (193045) | usb_controller.h (193074) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_controller.h 193045 2009-05-29 18:46:57Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_controller.h 193074 2009-05-30 00:22:57Z thompsa $ */ |
2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 30 unchanged lines hidden (view full) --- 40struct usb_setup_params; 41struct usb_hw_ep_profile; 42struct usb_fs_isoc_schedule; 43struct usb_config_descriptor; 44struct usb_endpoint_descriptor; 45 46/* typedefs */ 47 | 2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 30 unchanged lines hidden (view full) --- 40struct usb_setup_params; 41struct usb_hw_ep_profile; 42struct usb_fs_isoc_schedule; 43struct usb_config_descriptor; 44struct usb_endpoint_descriptor; 45 46/* typedefs */ 47 |
48typedef void (usb_bus_mem_sub_cb_t)(struct usb_bus *bus, struct usb_page_cache *pc, struct usb_page *pg, size_t size, size_t align); | 48typedef void (usb_bus_mem_sub_cb_t)(struct usb_bus *bus, struct usb_page_cache *pc, struct usb_page *pg, usb_size_t size, usb_size_t align); |
49typedef void (usb_bus_mem_cb_t)(struct usb_bus *bus, usb_bus_mem_sub_cb_t *scb); 50 51/* 52 * The following structure is used to define all the USB BUS 53 * callbacks. 54 */ 55struct usb_bus_methods { 56 --- 108 unchanged lines hidden (view full) --- 165}; 166 167/* 168 * The following structure is used when generating USB descriptors 169 * from USB templates. 170 */ 171struct usb_temp_setup { 172 void *buf; | 49typedef void (usb_bus_mem_cb_t)(struct usb_bus *bus, usb_bus_mem_sub_cb_t *scb); 50 51/* 52 * The following structure is used to define all the USB BUS 53 * callbacks. 54 */ 55struct usb_bus_methods { 56 --- 108 unchanged lines hidden (view full) --- 165}; 166 167/* 168 * The following structure is used when generating USB descriptors 169 * from USB templates. 170 */ 171struct usb_temp_setup { 172 void *buf; |
173 size_t size; | 173 usb_size_t size; |
174 enum usb_dev_speed usb_speed; 175 uint8_t self_powered; 176 uint8_t bNumEndpoints; 177 uint8_t bInterfaceNumber; 178 uint8_t bAlternateSetting; 179 uint8_t bConfigurationValue; 180 usb_error_t err; 181}; 182 183/* prototypes */ 184 185void usb2_bus_mem_flush_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb); 186uint8_t usb2_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat, usb_bus_mem_cb_t *cb); 187void usb2_bus_mem_free_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb); 188uint16_t usb2_isoc_time_expand(struct usb_bus *bus, uint16_t isoc_time_curr); 189uint16_t usb2_fs_isoc_schedule_isoc_time_expand(struct usb_device *udev, struct usb_fs_isoc_schedule **pp_start, struct usb_fs_isoc_schedule **pp_end, uint16_t isoc_time); 190uint8_t usb2_fs_isoc_schedule_alloc(struct usb_fs_isoc_schedule *fss, uint8_t *pstart, uint16_t len); 191 192#endif /* _USB2_CONTROLLER_H_ */ | 174 enum usb_dev_speed usb_speed; 175 uint8_t self_powered; 176 uint8_t bNumEndpoints; 177 uint8_t bInterfaceNumber; 178 uint8_t bAlternateSetting; 179 uint8_t bConfigurationValue; 180 usb_error_t err; 181}; 182 183/* prototypes */ 184 185void usb2_bus_mem_flush_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb); 186uint8_t usb2_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat, usb_bus_mem_cb_t *cb); 187void usb2_bus_mem_free_all(struct usb_bus *bus, usb_bus_mem_cb_t *cb); 188uint16_t usb2_isoc_time_expand(struct usb_bus *bus, uint16_t isoc_time_curr); 189uint16_t usb2_fs_isoc_schedule_isoc_time_expand(struct usb_device *udev, struct usb_fs_isoc_schedule **pp_start, struct usb_fs_isoc_schedule **pp_end, uint16_t isoc_time); 190uint8_t usb2_fs_isoc_schedule_alloc(struct usb_fs_isoc_schedule *fss, uint8_t *pstart, uint16_t len); 191 192#endif /* _USB2_CONTROLLER_H_ */ |