Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7428b92 in mainline


Ignore:
Timestamp:
2017-07-31T19:59:24Z (3 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
master
Children:
174788f
Parents:
73e5b62
Message:

Fixed a typo, added ADD_SET macros for input ctrl context, removed non-working assertions from ADD/DROP macros for input ctrl context (those contain do {} while(0) and thus cannot be chained in this way).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hw_struct/context.h

    r73e5b62 r7428b92  
    125125        uint32_t data [16];
    126126#define XHCI_INPUT_CTRL_CTX_DROP(ctx, idx) \
    127         (assert((idx) > 1 && (idx) < 32), XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx)))
     127        XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx))
     128
     129#define XHCI_INPUT_CTRL_CTX_DROP_SET(ctx, idx) (ctx).data[0] |= (1 << (idx))
     130
    128131#define XHCI_INPUT_CTRL_CTX_ADD(ctx, idx) \
    129         (assert((idx) >= 0 && (idx) < 32), XHCI_DWORD_EXTRACT((ctx).data[1], (idx), (idx)))
     132        XHCI_DWORD_EXTRACT((ctx).data[1], (idx), (idx))
     133
     134#define XHCI_INPUT_CTRL_CTX_ADD_SET(ctx, idx) (ctx).data[1] |= (1 << (idx))
     135   
    130136#define XHCI_INPUT_CTRL_CTX_CONFIG_VALUE(ctx)   XHCI_DWORD_EXTRACT((ctx).data[7],  7,  0)
    131137#define XHCI_INPUT_CTRL_CTX_IFACE_NUMBER(ctx)   XHCI_DWORD_EXTRACT((ctx).data[7], 15,  8)
     
    137143 */
    138144typedef struct xhci_input_ctx {
    139         xhci_input_ctrl_ctx_t ctr_ctx;
     145        xhci_input_ctrl_ctx_t ctrl_ctx;
    140146        xhci_slot_ctx_t slot_ctx;
    141147        xhci_ep_ctx_t endpoint_ctx [31];
Note: See TracChangeset for help on using the changeset viewer.