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

Changeset d69c698 in mainline


Ignore:
Timestamp:
2012-03-16T20:52:36Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
33cffa7
Parents:
bfb3d60
Message:

lbusbdev: Add more packed attributes and a compile time check for the structure size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/request.h

    rbfb3d60 rd69c698  
    9393        uint8_t request;
    9494        /** Main parameter to the request. */
    95         union {
     95        union __attribute__ ((packed)) {
    9696                uint16_t value;
    9797                /* FIXME: add #ifdefs according to host endianness */
    98                 struct {
     98                struct __attribute__ ((packed)) {
    9999                        uint8_t value_low;
    100100                        uint8_t value_high;
     
    108108        uint16_t length;
    109109} __attribute__ ((packed)) usb_device_request_setup_packet_t;
     110
     111int assert[(sizeof(usb_device_request_setup_packet_t) == 8) ? 1: -1];
    110112
    111113int usb_control_request_set(usb_pipe_t *,
Note: See TracChangeset for help on using the changeset viewer.