Changeset 2a0b1dd in mainline for uspace/drv/bus/usb/ohci/root_hub.c


Ignore:
Timestamp:
2011-07-11T14:21:58Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
03e3029
Parents:
b7c2757
Message:

OHCI: Root hub: Use named flags instead of numbers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/root_hub.c

    rb7c2757 r2a0b1dd  
    420420/*----------------------------------------------------------------------------*/
    421421/**
    422  * Create answer to port status_request.
     422 * Create answer to hub status_request.
    423423 *
    424424 * This copies flags in hub status register into the buffer. The format of the
     
    436436        assert(request);
    437437
    438         /* bits, 0,1,16,17 -- TODO: What do they mean?? Why not 0x0303 */
    439         const uint32_t mask = 1 | (1 << 1) | (1 << 16) | (1 << 17);
    440         const uint32_t data = mask & instance->registers->rh_status;
     438        const uint32_t data = instance->registers->rh_status &
     439            (RHS_LPS_FLAG | RHS_LPSC_FLAG | RHS_OCI_FLAG | RHS_OCIC_FLAG);
    441440        memcpy(request->data_buffer, &data, 4);
    442441        request->transfered_size = 4;
    443 
    444442        return EOK;
    445443}
Note: See TracChangeset for help on using the changeset viewer.