Changeset 51c1d500 in mainline for uspace/drv/bus/usb/xhci/hw_struct/context.h
- Timestamp:
- 2018-01-20T17:16:33Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6271a34
- Parents:
- abb5d08
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hw_struct/context.h
rabb5d08 r51c1d500 179 179 #define XHCI_CTX_SIZE_SMALL 32 180 180 #define XHCI_ONE_CTX_SIZE(hc) (XHCI_CTX_SIZE_SMALL << hc->csz) 181 #define XHCI_SLOT_CTX_OFFSET 0 182 #define XHCI_EP_ARRAY_OFFSET 1 183 #define XHCI_DEVICE_CTX_SIZE(hc) ((XHCI_EP_ARRAY_OFFSET + XHCI_EP_COUNT) * XHCI_ONE_CTX_SIZE(hc)) 181 #define XHCI_DEVICE_CTX_SIZE(hc) ((1 + XHCI_EP_COUNT) * XHCI_ONE_CTX_SIZE(hc)) 184 182 185 183 /** 186 184 * Device context: section 6.2.1 187 185 */ 188 #define XHCI_GET_SLOT_CTX(dev_ctx, hc) (xhci_slot_ctx_t *)((char*)dev_ctx + XHCI_SLOT_CTX_OFFSET * XHCI_ONE_CTX_SIZE(hc)) 189 #define XHCI_GET_EP_CTX(dev_ctx, hc, dci) (xhci_ep_ctx_t *)((char*)dev_ctx + (dci + XHCI_EP_ARRAY_OFFSET) * XHCI_ONE_CTX_SIZE(hc)) 186 #define XHCI_GET_DC_FIELD(dev_ctx, hc, dci) ((char*)dev_ctx + (dci) * XHCI_ONE_CTX_SIZE(hc)) 187 #define XHCI_GET_EP_CTX(dev_ctx, hc, dci) ((xhci_ep_ctx_t *) XHCI_GET_DC_FIELD(dev_ctx, hc, dci)) 188 #define XHCI_GET_SLOT_CTX(dev_ctx, hc) ((xhci_slot_ctx_t *) XHCI_GET_DC_FIELD(dev_ctx, hc, 0)) 190 189 191 190 /**
Note:
See TracChangeset
for help on using the changeset viewer.