Changeset 7f810b3 in mainline
- Timestamp:
- 2011-03-12T15:56:20Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67352d2
- Parents:
- 0db3ad6
- Location:
- uspace/drv/uhci-rhd
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-rhd/port.c
r0db3ad6 r7f810b3 44 44 45 45 #include "port.h" 46 #include "port_status.h"47 46 48 47 static int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed); … … 126 125 port_status_t port_status = uhci_port_read_status(instance); 127 126 128 print_port_status(instance->id_string, port_status);127 uhci_port_print_status(instance, port_status); 129 128 130 129 if ((port_status & STATUS_CONNECTED_CHANGED) == 0) … … 158 157 /* Write one to WC bits, to ack changes */ 159 158 uhci_port_write_status(instance, port_status); 160 usb_log_debug("%s: Change statusACK.\n",159 usb_log_debug("%s: status change ACK.\n", 161 160 instance->id_string); 162 161 } -
uspace/drv/uhci-rhd/port.h
r0db3ad6 r7f810b3 36 36 37 37 #include <assert.h> 38 #include <stdint.h> 38 39 #include <ddf/driver.h> 39 #include < stdint.h>40 #include <libarch/ddi.h> /* pio_read and pio_write */ 40 41 #include <usb/usbdevice.h> 41 42 42 #include "port_status.h" 43 typedef uint16_t port_status_t; 44 45 #define STATUS_CONNECTED (1 << 0) 46 #define STATUS_CONNECTED_CHANGED (1 << 1) 47 #define STATUS_ENABLED (1 << 2) 48 #define STATUS_ENABLED_CHANGED (1 << 3) 49 #define STATUS_LINE_D_PLUS (1 << 4) 50 #define STATUS_LINE_D_MINUS (1 << 5) 51 #define STATUS_RESUME (1 << 6) 52 #define STATUS_ALWAYS_ONE (1 << 7) 53 54 #define STATUS_LOW_SPEED (1 << 8) 55 #define STATUS_IN_RESET (1 << 9) 56 #define STATUS_SUSPEND (1 << 12) 43 57 44 58 typedef struct uhci_port … … 72 86 pio_write_16(port->address, value); 73 87 } 88 89 static inline void uhci_port_print_status( 90 uhci_port_t *port, const port_status_t value) 91 { 92 assert(port); 93 usb_log_debug2("%s Port status:%s%s%s%s%s%s%s%s.\n", 94 port->id_string, 95 (value & STATUS_SUSPEND) ? " SUSPENDED," : "", 96 (value & STATUS_IN_RESET) ? " IN RESET," : "", 97 (value & STATUS_LOW_SPEED) ? " LOWSPEED," : "", 98 (value & STATUS_ENABLED_CHANGED) ? " ENABLED-CHANGE," : "", 99 (value & STATUS_ENABLED) ? " ENABLED," : "", 100 (value & STATUS_CONNECTED_CHANGED) ? " CONNECTED-CHANGE," : "", 101 (value & STATUS_CONNECTED) ? " CONNECTED," : "", 102 (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERROR: NO ALWAYS ONE" 103 ); 104 } 74 105 #endif 75 106 /**
Note:
See TracChangeset
for help on using the changeset viewer.