diff options
Diffstat (limited to 'sys/dev/usb/usb_controller.h')
-rw-r--r-- | sys/dev/usb/usb_controller.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/sys/dev/usb/usb_controller.h b/sys/dev/usb/usb_controller.h index 48c20cb..0cd4a07 100644 --- a/sys/dev/usb/usb_controller.h +++ b/sys/dev/usb/usb_controller.h @@ -33,38 +33,38 @@ /* structure prototypes */ -struct usb2_bus; -struct usb2_page; -struct usb2_pipe; -struct usb2_page_cache; -struct usb2_setup_params; -struct usb2_hw_ep_profile; -struct usb2_fs_isoc_schedule; -struct usb2_config_descriptor; -struct usb2_endpoint_descriptor; +struct usb_bus; +struct usb_page; +struct usb_pipe; +struct usb_page_cache; +struct usb_setup_params; +struct usb_hw_ep_profile; +struct usb_fs_isoc_schedule; +struct usb_config_descriptor; +struct usb_endpoint_descriptor; /* typedefs */ -typedef void (usb2_bus_mem_sub_cb_t)(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, usb2_size_t size, usb2_size_t align); -typedef void (usb2_bus_mem_cb_t)(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *scb); +typedef void (usb2_bus_mem_sub_cb_t)(struct usb_bus *bus, struct usb_page_cache *pc, struct usb_page *pg, usb2_size_t size, usb2_size_t align); +typedef void (usb2_bus_mem_cb_t)(struct usb_bus *bus, usb2_bus_mem_sub_cb_t *scb); /* * The following structure is used to define all the USB BUS * callbacks. */ -struct usb2_bus_methods { +struct usb_bus_methods { /* USB Device and Host mode - Mandatory */ usb2_handle_request_t *roothub_exec; - void (*pipe_init) (struct usb2_device *, struct usb2_endpoint_descriptor *, struct usb2_pipe *); - void (*xfer_setup) (struct usb2_setup_params *); - void (*xfer_unsetup) (struct usb2_xfer *); - void (*get_dma_delay) (struct usb2_bus *, uint32_t *); - void (*device_suspend) (struct usb2_device *); - void (*device_resume) (struct usb2_device *); - void (*set_hw_power) (struct usb2_bus *); + void (*pipe_init) (struct usb_device *, struct usb_endpoint_descriptor *, struct usb_pipe *); + void (*xfer_setup) (struct usb_setup_params *); + void (*xfer_unsetup) (struct usb_xfer *); + void (*get_dma_delay) (struct usb_bus *, uint32_t *); + void (*device_suspend) (struct usb_device *); + void (*device_resume) (struct usb_device *); + void (*set_hw_power) (struct usb_bus *); /* * The following flag is set if one or more control transfers are @@ -94,9 +94,9 @@ struct usb2_bus_methods { /* USB Device mode only - Mandatory */ - void (*get_hw_ep_profile) (struct usb2_device *udev, const struct usb2_hw_ep_profile **ppf, uint8_t ep_addr); - void (*set_stall) (struct usb2_device *udev, struct usb2_xfer *xfer, struct usb2_pipe *pipe); - void (*clear_stall) (struct usb2_device *udev, struct usb2_pipe *pipe); + void (*get_hw_ep_profile) (struct usb_device *udev, const struct usb_hw_ep_profile **ppf, uint8_t ep_addr); + void (*set_stall) (struct usb_device *udev, struct usb_xfer *xfer, struct usb_pipe *pipe); + void (*clear_stall) (struct usb_device *udev, struct usb_pipe *pipe); }; @@ -104,7 +104,7 @@ struct usb2_bus_methods { * The following structure is used to define all the USB pipe * callbacks. */ -struct usb2_pipe_methods { +struct usb_pipe_methods { /* Mandatory USB Device and Host mode callbacks: */ @@ -123,7 +123,7 @@ struct usb2_pipe_methods { * The following structure keeps information about what a hardware USB * endpoint supports. */ -struct usb2_hw_ep_profile { +struct usb_hw_ep_profile { uint16_t max_in_frame_size; /* IN-token direction */ uint16_t max_out_frame_size; /* OUT-token direction */ uint8_t is_simplex:1; @@ -140,8 +140,8 @@ struct usb2_hw_ep_profile { * The following structure is used when trying to allocate hardware * endpoints for an USB configuration in USB device side mode. */ -struct usb2_hw_ep_scratch_sub { - const struct usb2_hw_ep_profile *pf; +struct usb_hw_ep_scratch_sub { + const struct usb_hw_ep_profile *pf; uint16_t max_frame_size; uint8_t hw_endpoint_out; uint8_t hw_endpoint_in; @@ -154,12 +154,12 @@ struct usb2_hw_ep_scratch_sub { * The following structure is used when trying to allocate hardware * endpoints for an USB configuration in USB device side mode. */ -struct usb2_hw_ep_scratch { - struct usb2_hw_ep_scratch_sub ep[USB_EP_MAX]; - struct usb2_hw_ep_scratch_sub *ep_max; - struct usb2_config_descriptor *cd; - struct usb2_device *udev; - struct usb2_bus_methods *methods; +struct usb_hw_ep_scratch { + struct usb_hw_ep_scratch_sub ep[USB_EP_MAX]; + struct usb_hw_ep_scratch_sub *ep_max; + struct usb_config_descriptor *cd; + struct usb_device *udev; + struct usb_bus_methods *methods; uint8_t bmOutAlloc[(USB_EP_MAX + 15) / 16]; uint8_t bmInAlloc[(USB_EP_MAX + 15) / 16]; }; @@ -168,7 +168,7 @@ struct usb2_hw_ep_scratch { * The following structure is used when generating USB descriptors * from USB templates. */ -struct usb2_temp_setup { +struct usb_temp_setup { void *buf; usb2_size_t size; enum usb_dev_speed usb_speed; @@ -182,11 +182,11 @@ struct usb2_temp_setup { /* prototypes */ -void usb2_bus_mem_flush_all(struct usb2_bus *bus, usb2_bus_mem_cb_t *cb); -uint8_t usb2_bus_mem_alloc_all(struct usb2_bus *bus, bus_dma_tag_t dmat, usb2_bus_mem_cb_t *cb); -void usb2_bus_mem_free_all(struct usb2_bus *bus, usb2_bus_mem_cb_t *cb); -uint16_t usb2_isoc_time_expand(struct usb2_bus *bus, uint16_t isoc_time_curr); -uint16_t usb2_fs_isoc_schedule_isoc_time_expand(struct usb2_device *udev, struct usb2_fs_isoc_schedule **pp_start, struct usb2_fs_isoc_schedule **pp_end, uint16_t isoc_time); -uint8_t usb2_fs_isoc_schedule_alloc(struct usb2_fs_isoc_schedule *fss, uint8_t *pstart, uint16_t len); +void usb2_bus_mem_flush_all(struct usb_bus *bus, usb2_bus_mem_cb_t *cb); +uint8_t usb2_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat, usb2_bus_mem_cb_t *cb); +void usb2_bus_mem_free_all(struct usb_bus *bus, usb2_bus_mem_cb_t *cb); +uint16_t usb2_isoc_time_expand(struct usb_bus *bus, uint16_t isoc_time_curr); +uint16_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); +uint8_t usb2_fs_isoc_schedule_alloc(struct usb_fs_isoc_schedule *fss, uint8_t *pstart, uint16_t len); #endif /* _USB2_CONTROLLER_H_ */ |