Changeset 57e06ef in mainline
- Timestamp:
- 2011-10-28T22:19:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2fd1f0c6
- Parents:
- 48ae3ef
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/endpoint_list.c
r48ae3ef r57e06ef 73 73 * Does not check whether this replaces an existing list. 74 74 */ 75 void endpoint_list_set_next(endpoint_list_t *instance, endpoint_list_t *next) 75 void endpoint_list_set_next( 76 const endpoint_list_t *instance, const endpoint_list_t *next) 76 77 { 77 78 assert(instance); -
uspace/drv/bus/usb/ohci/endpoint_list.h
r48ae3ef r57e06ef 68 68 69 69 int endpoint_list_init(endpoint_list_t *instance, const char *name); 70 void endpoint_list_set_next(endpoint_list_t *instance, endpoint_list_t *next); 70 void endpoint_list_set_next( 71 const endpoint_list_t *instance, const endpoint_list_t *next); 71 72 void endpoint_list_add_ep(endpoint_list_t *instance, ohci_endpoint_t *ep); 72 73 void endpoint_list_remove_ep(endpoint_list_t *instance, ohci_endpoint_t *ep); -
uspace/drv/bus/usb/ohci/hc.c
r48ae3ef r57e06ef 221 221 } 222 222 /*----------------------------------------------------------------------------*/ 223 void hc_enqueue_endpoint(hc_t *instance, endpoint_t *ep) 224 { 223 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep) 224 { 225 assert(instance); 226 assert(ep); 227 225 228 endpoint_list_t *list = &instance->lists[ep->transfer_type]; 226 229 ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep); 230 assert(list); 231 assert(ohci_ep); 232 227 233 /* Enqueue ep */ 228 234 switch (ep->transfer_type) { … … 247 253 } 248 254 /*----------------------------------------------------------------------------*/ 249 void hc_dequeue_endpoint(hc_t *instance, endpoint_t *ep) 250 { 255 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep) 256 { 257 assert(instance); 258 assert(ep); 259 251 260 /* Dequeue ep */ 252 261 endpoint_list_t *list = &instance->lists[ep->transfer_type]; 253 262 ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep); 263 264 assert(list); 265 assert(ohci_ep); 254 266 switch (ep->transfer_type) { 255 267 case USB_TRANSFER_CONTROL: -
uspace/drv/bus/usb/ohci/hc.h
r48ae3ef r57e06ef 86 86 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ }; 87 87 88 void hc_enqueue_endpoint(hc_t *instance, endpoint_t *ep);89 void hc_dequeue_endpoint(hc_t *instance, endpoint_t *ep);88 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep); 89 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep); 90 90 91 91 void hc_interrupt(hc_t *instance, uint32_t status); -
uspace/drv/bus/usb/ohci/ohci_endpoint.c
r48ae3ef r57e06ef 65 65 * 66 66 * @param[in] ep USBD endpoint structure 67 * @return pointer to a new hcd endpoint structure, NULL on failure.67 * @return Error code. 68 68 */ 69 69 int ohci_endpoint_init(hcd_t *hcd, endpoint_t *ep) … … 90 90 endpoint_set_hc_data( 91 91 ep, ohci_ep, ohci_ep_toggle_get, ohci_ep_toggle_set); 92 ohci_ep->hcd = hcd;93 92 hc_enqueue_endpoint(hcd->private_data, ep); 94 93 return EOK; … … 97 96 /** Disposes hcd endpoint structure 98 97 * 99 * @param[in] hcd_ep endpoint structure 98 * @param[in] hcd driver using this instance. 99 * @param[in] ep endpoint structure. 100 100 */ 101 101 void ohci_endpoint_fini(hcd_t *hcd, endpoint_t *ep) -
uspace/drv/bus/usb/ohci/ohci_endpoint.h
r48ae3ef r57e06ef 51 51 /** Linked list used by driver software */ 52 52 link_t link; 53 /** Device using this ep */54 hcd_t *hcd;55 53 } ohci_endpoint_t; 56 54 … … 62 60 * @return Pointer to assigned hcd endpoint structure 63 61 */ 64 static inline ohci_endpoint_t * ohci_endpoint_get( endpoint_t *ep)62 static inline ohci_endpoint_t * ohci_endpoint_get(const endpoint_t *ep) 65 63 { 66 64 assert(ep);
Note:
See TracChangeset
for help on using the changeset viewer.