Changeset a24d6825 in mainline
- Timestamp:
- 2014-01-23T23:15:18Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3de7a62
- Parents:
- f9351b1
- Location:
- uspace/drv/bus/usb/ehci
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/Makefile
rf9351b1 ra24d6825 49 49 endpoint_list.c \ 50 50 hc.c \ 51 hw_struct/queue_head.c \ 51 52 main.c \ 52 53 res.c -
uspace/drv/bus/usb/ehci/ehci_endpoint.c
rf9351b1 ra24d6825 85 85 } 86 86 87 //qh_init(ehci_ep->qh, ep);87 qh_init(ehci_ep->qh, ep); 88 88 endpoint_set_hc_data( 89 89 ep, ehci_ep, ehci_ep_toggle_get, ehci_ep_toggle_set); -
uspace/drv/bus/usb/ehci/hw_struct/queue_head.h
rf9351b1 ra24d6825 37 37 #include <assert.h> 38 38 #include <sys/types.h> 39 #include <usb/host/endpoint.h> 39 40 40 41 #include "link_pointer.h" … … 48 49 #define QH_EP_CHAR_RL_SHIFT 28 49 50 #define QH_EP_CHAR_C_FLAG (1 << 27) 50 #define QH_EP_CHAR_LENGTH_MASK 0x7ff 51 #define QH_EP_CHAR_LENGTH_SHIFT 16 51 #define QH_EP_CHAR_MAX_LENGTH_MASK 0x7ff 52 #define QH_EP_CHAR_MAX_LENGTH_SHIFT 16 53 #define QH_EP_CHAR_MAX_LENGTH_SET(len) \ 54 (((len) & QH_EP_CHAR_MAX_LENGTH_MASK) << QH_EP_CHAR_MAX_LENGTH_SHIFT) 55 #define QH_EP_CHAR_MAX_LENGTH_GET(val) \ 56 (((val) >> QH_EP_CHAR_MAX_LENGTH_SHIFT) & QH_EP_CHAR_MAX_LENGTH_MASK) 52 57 #define QH_EP_CHAR_H_FLAG (1 << 15) 53 58 #define QH_EP_CHAR_DTC_FLAG (1 << 14) 54 #define QH_EP_CHAR_EPS_MASK 0x3 55 #define QH_EP_CHAR_EPS_SHIFT 12 56 #define QH_EP_CHAR_EPS_FS 0x0 57 #define QH_EP_CHAR_EPS_LS 0x1 58 #define QH_EP_CHAR_EPS_HS 0x2 59 #define QH_EP_CHAR_EPS_FS (0x0 << 12) 60 #define QH_EP_CHAR_EPS_LS (0x1 << 12) 61 #define QH_EP_CHAR_EPS_HS (0x2 << 12) 62 #define QH_EP_CHAR_EPS_MASK (0x3 << 12) 59 63 #define QH_EP_CHAR_EP_MASK 0xf 60 64 #define QH_EP_CHAR_EP_SHIFT 8 65 #define QH_EP_CHAR_EP_SET(num) \ 66 (((num) & QH_EP_CHAR_EP_MASK) << QH_EP_CHAR_EP_SHIFT) 67 #define QH_EP_CHAR_ADDR_GET(val) \ 68 (((val) >> QH_EP_CHAR_ADDR_SHIFT) & QH_EP_CHAR_ADDR_MASK) 61 69 #define QH_EP_CHAR_INACT_FLAG (1 << 7) 62 70 #define QH_EP_CHAR_ADDR_MASK 0x3f 63 71 #define QH_EP_CHAR_ADDR_SHIFT 0 72 #define QH_EP_CHAR_ADDR_SET(addr) \ 73 (((addr) & QH_EP_CHAR_ADDR_MASK) << QH_EP_CHAR_ADDR_SHIFT) 74 #define QH_EP_CHAR_ADDR_GET(val) \ 75 (((val) >> QH_EP_CHAR_ADDR_SHIFT) & QH_EP_CHAR_ADDR_MASK) 64 76 65 77 volatile uint32_t ep_cap; 66 78 #define QH_EP_CAP_MULTI_MASK 0x3 67 79 #define QH_EP_CAP_MULTI_SHIFT 30 80 #define QH_EP_CAP_MULTI_SET(count) \ 81 (((count) & QH_EP_CAP_MULTI_MASK) << QH_EP_CAP_MULTI_SHIFT) 68 82 #define QH_EP_CAP_PORT_MASK 0x7f 69 83 #define QH_EP_CAP_PORT_SHIFT 23 84 #define QH_EP_CAP_TT_PORT_SET(addr) \ 85 (((addr) & QH_EP_CAP_HUB_MASK) << QH_EP_CAP_HUB_SHIFT) 70 86 #define QH_EP_CAP_HUB_MASK 0x7f 71 87 #define QH_EP_CAP_HUB_SHIFT 16 88 #define QH_EP_CAP_TT_ADDR_SET(addr) \ 89 (((addr) & QH_EP_CAP_HUB_MASK) << QH_EP_CAP_HUB_SHIFT) 72 90 #define QH_EP_CAP_C_MASK_MASK 0xff 73 91 #define QH_EP_CAP_C_MASK_SHIFT 8 92 #define QH_EP_CAP_C_MASK_SET(val) \ 93 (((val) & QH_EP_CAP_C_MASK_MASK) << QH_EP_CAP_C_MASK_SHIFT) 74 94 #define QH_EP_CAP_S_MASK_MASK 0xff 75 #define QH_EP_CAP_S_MASL_SHIFT 0 95 #define QH_EP_CAP_S_MASK_SHIFT 0 96 #define QH_EP_CAP_S_MASK_SET(val) \ 97 (((val) & QH_EP_CAP_S_MASK_MASK) << QH_EP_CAP_S_MASK_SHIFT) 76 98 77 99 link_pointer_t current; … … 118 140 } qh_t; 119 141 120 142 void qh_init(qh_t *instance, const endpoint_t *ep); 121 143 #endif 122 144 /**
Note:
See TracChangeset
for help on using the changeset viewer.