Changeset 361e61b in mainline for uspace/drv/uhci-hcd/uhci_rh.h
- Timestamp:
- 2011-03-21T14:23:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 55e388a1
- Parents:
- c32688d (diff), 48fe0c9 (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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_rh.h
rc32688d r361e61b 1 1 /* 2 * Copyright (c) 201 0Jan Vesely2 * Copyright (c) 2011 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /** @addtogroup usb 28 29 /** @addtogroup drvusbuhci 29 30 * @{ 30 31 */ … … 32 33 * @brief UHCI driver 33 34 */ 34 #ifndef DRV_UHCI_ TD_PORT_STATUS_H35 #define DRV_UHCI_ TD_PORT_STATUS_H35 #ifndef DRV_UHCI_UHCI_RH_H 36 #define DRV_UHCI_UHCI_RH_H 36 37 37 #include <libarch/ddi.h> /* pio_read and pio_write */ 38 #include <ddf/driver.h> 39 #include <ops/hw_res.h> 38 40 39 #include <stdint.h> 41 typedef struct uhci_rh { 42 hw_resource_list_t resource_list; 43 hw_resource_t io_regs; 44 } uhci_rh_t; 40 45 41 typedef uint16_t port_status_t; 46 int uhci_rh_init( 47 uhci_rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size); 42 48 43 #define STATUS_CONNECTED (1 << 0)44 #define STATUS_CONNECTED_CHANGED (1 << 1)45 #define STATUS_ENABLED (1 << 2)46 #define STATUS_ENABLED_CHANGED (1 << 3)47 #define STATUS_LINE_D_PLUS (1 << 4)48 #define STATUS_LINE_D_MINUS (1 << 5)49 #define STATUS_RESUME (1 << 6)50 #define STATUS_ALWAYS_ONE (1 << 7)51 52 #define STATUS_LOW_SPEED (1 << 8)53 #define STATUS_IN_RESET (1 << 9)54 #define STATUS_SUSPEND (1 << 12)55 56 static inline port_status_t port_status_read(port_status_t * address)57 { return pio_read_16(address); }58 59 static inline void port_status_write(60 port_status_t *address, port_status_t value)61 { pio_write_16(address, value); }62 63 void print_port_status(const port_status_t status);64 49 #endif 65 50 /**
Note:
See TracChangeset
for help on using the changeset viewer.