Changeset 56e9fb0 in mainline for uspace/lib/usb/include/usb/usb.h


Ignore:
Timestamp:
2011-09-14T18:52:40Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
365e29e2
Parents:
8e3d17f
Message:

usb: add support for packing target_t type into uint32_t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/usb.h

    r8e3d17f r56e9fb0  
    106106 * Negative values could be used to indicate error.
    107107 */
    108 typedef int usb_address_t;
     108typedef int16_t usb_address_t;
    109109
    110110/** Default USB address. */
     
    116116 * Negative values could be used to indicate error.
    117117 */
    118 typedef int usb_endpoint_t;
     118typedef int16_t usb_endpoint_t;
    119119
    120120/** Maximum endpoint number in USB 1.1.
     
    126126 * Pair address + endpoint is identification of transaction recipient.
    127127 */
    128 typedef struct {
    129         usb_address_t address;
    130         usb_endpoint_t endpoint;
     128typedef union {
     129        struct {
     130                usb_address_t address;
     131                usb_endpoint_t endpoint;
     132        } __attribute__((packed));
     133        uint32_t packed;
    131134} usb_target_t;
    132135
Note: See TracChangeset for help on using the changeset viewer.