Changeset ae3a941 in mainline for uspace/drv/bus/usb/ohci/hw_struct


Ignore:
Timestamp:
2018-02-26T16:51:40Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e773f58
Parents:
3692678
Message:

usb: cstyle

Location:
uspace/drv/bus/usb/ohci/hw_struct
Files:
4 edited

Legend:

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

    r3692678 rae3a941  
    8484            | ((ep->endpoint & ED_STATUS_EN_MASK) << ED_STATUS_EN_SHIFT)
    8585            | ((dir[ep->direction] & ED_STATUS_D_MASK) << ED_STATUS_D_SHIFT)
    86             | ((ep->max_packet_size & ED_STATUS_MPS_MASK)
    87                 << ED_STATUS_MPS_SHIFT));
     86            | ((ep->max_packet_size & ED_STATUS_MPS_MASK) << ED_STATUS_MPS_SHIFT));
    8887
    8988        /* Low speed flag */
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h

    r3692678 rae3a941  
    107107#define ED_NEXT_PTR_MASK (0xfffffff0)
    108108#define ED_NEXT_PTR_SHIFT (0)
    109 } __attribute__((packed,aligned(32))) ed_t;
     109} __attribute__((packed, aligned(32))) ed_t;
    110110
    111111void ed_init(ed_t *instance, const endpoint_t *ep, const td_t *td);
     
    204204{
    205205        assert(instance);
    206         return (OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY) ? 1 : 0;
     206        return !!(OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY);
    207207}
    208208
  • uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h

    r3692678 rae3a941  
    6969#define ITD_OFFSET_CC_SHIFT (12)
    7070
    71 } __attribute__((packed,aligned(32))) itd_t;
     71} __attribute__((packed, aligned(32))) itd_t;
    7272
    7373#endif
  • uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h

    r3692678 rae3a941  
    9090         */
    9191        volatile uint32_t be;
    92 } __attribute__((packed,aligned(32))) td_t;
     92} __attribute__((packed, aligned(32))) td_t;
    9393
    9494void td_init(td_t *, const td_t *, usb_direction_t, const void *, size_t, int);
     
    103103{
    104104        assert(instance);
    105         const int cc =(OHCI_MEM32_RD(instance->status)
    106             >> TD_STATUS_CC_SHIFT) & TD_STATUS_CC_MASK;
     105        const int cc = (OHCI_MEM32_RD(instance->status) >> TD_STATUS_CC_SHIFT)
     106                & TD_STATUS_CC_MASK;
    107107        /* This value is changed on transfer completion,
    108108         * either to CC_NOERROR or and error code.
Note: See TracChangeset for help on using the changeset viewer.