Changeset 72af8da in mainline for uspace/drv/ehci-hcd/pci.h
- Timestamp:
- 2011-03-16T18:50:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 42a3a57
- Parents:
- 3e7b7cd (diff), fcf07e6 (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/ehci-hcd/pci.h
r3e7b7cd r72af8da 1 1 /* 2 * Copyright (c) 2011 Jan Vesely2 * Copyright (c) 2011 Vojtech Horky 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 drvusbehci 29 30 * @{ 30 31 */ 31 32 /** @file 32 * @brief UHCI driver33 * PCI related functions needed by EHCI driver. 33 34 */ 34 #i nclude <assert.h>35 # include <stdio.h>35 #ifndef DRV_EHCI_PCI_H 36 #define DRV_EHCI_PCI_H 36 37 37 #include < usb/debug.h>38 #include <ddf/driver.h> 38 39 39 #include "port_status.h" 40 int pci_get_my_registers(ddf_dev_t *, uintptr_t *, size_t *, int *); 41 int pci_enable_interrupts(ddf_dev_t *); 42 int pci_disable_legacy(ddf_dev_t *); 40 43 41 struct flag_name 42 { 43 uint16_t flag; 44 const char *name; 45 }; 46 47 static const struct flag_name flags[] = 48 { 49 { STATUS_SUSPEND, "suspended" }, 50 { STATUS_IN_RESET, "in reset" }, 51 { STATUS_LOW_SPEED, "low speed device" }, 52 { STATUS_ALWAYS_ONE, "always 1 bit" }, 53 { STATUS_RESUME, "resume" }, 54 { STATUS_LINE_D_MINUS, "line D- value" }, 55 { STATUS_LINE_D_PLUS, "line D+ value" }, 56 { STATUS_ENABLED_CHANGED, "enabled changed" }, 57 { STATUS_ENABLED, "enabled" }, 58 { STATUS_CONNECTED_CHANGED, "connected changed" }, 59 { STATUS_CONNECTED, "connected" } 60 }; 61 62 void print_port_status(port_status_t value) 63 { 64 unsigned i = 0; 65 for (;i < sizeof(flags)/sizeof(struct flag_name); ++i) { 66 usb_log_debug2("\t%s status: %s.\n", flags[i].name, 67 ((value & flags[i].flag) != 0) ? "YES" : "NO"); 68 } 69 } 44 #endif 70 45 /** 71 46 * @} 72 47 */ 48
Note:
See TracChangeset
for help on using the changeset viewer.