source: mainline/uspace/drv/bus/usb/usbhub/port.h@ 39f1c86

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 39f1c86 was 0f79283b, checked in by Ondřej Hlavatý <aearsis@…>, 8 years ago

usb: remove speed storing (and fix that misuse in xhci rh)

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[2ad98fd]1/*
2 * Copyright (c) 2011 Vojtech Horky
[3b617579]3 * Copyright (c) 2011 Jan Vesely
[c4e84ed6]4 * Copyright (c) 2017 Ondra Hlavaty
[2ad98fd]5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * - Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * - Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * - The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
[58563585]30
[2ad98fd]31/** @addtogroup drvusbhub
32 * @{
33 */
34/** @file
[94f8c363]35 * Hub port handling.
[2ad98fd]36 */
[58563585]37
[a1cb170]38#ifndef DRV_USBHUB_PORT_H
39#define DRV_USBHUB_PORT_H
[2ad98fd]40
[7d521e24]41#include <usb/dev/driver.h>
[aff1880]42#include <usb/classes/hub.h>
[94f8c363]43#include <usb/port.h>
[2ad98fd]44
[6626bba9]45typedef struct usb_hub_dev usb_hub_dev_t;
[2ad98fd]46
47/** Information about single port on a hub. */
48typedef struct {
[94f8c363]49 usb_port_t base;
[c4e84ed6]50 /* Parenting hub */
51 usb_hub_dev_t *hub;
[0918382f]52 /** Port number as reported in descriptors. */
[58563585]53 unsigned int port_number;
[0f79283b]54 /** Speed at the time of enabling the port */
55 usb_speed_t speed;
[2ad98fd]56} usb_hub_port_t;
57
[c4e84ed6]58void usb_hub_port_init(usb_hub_port_t *, usb_hub_dev_t *, unsigned int);
[58563585]59
[94f8c363]60void usb_hub_port_process_interrupt(usb_hub_port_t *port);
[2ad98fd]61
62#endif
[58563585]63
[2ad98fd]64/**
65 * @}
66 */
Note: See TracBrowser for help on using the repository browser.