Changeset 0f79283b in mainline for uspace/lib/usb
- Timestamp:
 - 2018-01-18T12:39:27Z (8 years ago)
 - Branches:
 - lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
 - Children:
 - 2bff2cc2
 - Parents:
 - babcc423
 - Location:
 - uspace/lib/usb
 - Files:
 - 
      
- 2 edited
 
- 
          
  include/usb/port.h (modified) (3 diffs)
 - 
          
  src/port.c (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/lib/usb/include/usb/port.h
rbabcc423 r0f79283b 41 41 * 42 42 * This subsystem abstracts the rather complicated state machine, and offers 43 * a simple call interface to announce events, and a callback structure for44 * implementations to supply the hardware-dependent part.43 * a simple interface to announce events and leave the fibril management on the 44 * library. 45 45 */ 46 46 … … 65 65 /** Current state of the port */ 66 66 usb_port_state_t state; 67 /** A speed of the device connected (if any). Valid unless state == PORT_DISABLED. */68 usb_speed_t speed;69 67 /** CV signalled on fibril exit. */ 70 68 fibril_condvar_t finished_cv; … … 87 85 void usb_port_init(usb_port_t *); 88 86 int usb_port_connected(usb_port_t *, usb_port_enumerate_t); 89 void usb_port_enabled(usb_port_t * , usb_speed_t);87 void usb_port_enabled(usb_port_t *); 90 88 void usb_port_disabled(usb_port_t *, usb_port_remove_t); 91 89 void usb_port_fini(usb_port_t *);  - 
      
uspace/lib/usb/src/port.c
rbabcc423 r0f79283b 41 41 * 42 42 * This subsystem abstracts the rather complicated state machine, and offers 43 * a simple call interface to announce events, and a callback structure for44 * implementations to supply the hardware-dependent part.43 * a simple interface to announce events and leave the fibril management on the 44 * library. 45 45 */ 46 46 … … 127 127 } 128 128 129 void usb_port_enabled(usb_port_t *port, usb_speed_t speed) 130 { 131 assert(port); 132 133 fibril_mutex_lock(&port->guard); 134 port->speed = speed; 129 void usb_port_enabled(usb_port_t *port) 130 { 131 assert(port); 132 133 fibril_mutex_lock(&port->guard); 135 134 fibril_condvar_broadcast(&port->enabled_cv); 136 135 fibril_mutex_unlock(&port->guard);  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  