Changeset 7c3fb9b in mainline for uspace/lib/usbhost


Ignore:
Timestamp:
2018-05-17T08:29:01Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ff23ff
Parents:
fac0ac7
git-author:
Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
Message:

Fix block comment formatting (ccheck).

Location:
uspace/lib/usbhost
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/hcd.h

    rfac0ac7 r7c3fb9b  
    4545typedef struct device device_t;
    4646
    47 /* Treat this header as read-only in driver code.
     47/*
     48 * Treat this header as read-only in driver code.
    4849 * It could be opaque, but why to complicate matters.
    4950 */
     
    7172
    7273        /** Size of the device data to be allocated, and passed as the
    73          * hc_device_t. */
     74         * hc_device_t.
     75         */
    7476        size_t hc_device_size;
    7577
  • uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h

    rfac0ac7 r7c3fb9b  
    9797 * Printf formatting string for dumping usb_transfer_batch_t.
    9898 *  [address:endpoint speed transfer_type-direction buffer_sizeB/max_packet_size]
    99  * */
     99 */
    100100#define USB_TRANSFER_BATCH_FMT "[%d:%d %s %s-%s %zuB/%zu]"
    101101
  • uspace/lib/usbhost/include/usb/host/utils/malloc32.h

    rfac0ac7 r7c3fb9b  
    4343#include <stdint.h>
    4444
    45 /* Generic TDs and EDs require 16byte alignment,
     45/*
     46 * Generic TDs and EDs require 16byte alignment,
    4647 * Isochronous TD require 32byte alignment,
    4748 * buffers do not have to be aligned.
     
    8384
    8485        if (ret == EOK) {
    85                 /* Poison, accessing it should be enough to make sure
    86                  * the location is mapped, but poison works better */
     86                /*
     87                 * Poison, accessing it should be enough to make sure
     88                 * the location is mapped, but poison works better
     89                 */
    8790                memset(address, 0x5, real_size);
    8891                return address;
  • uspace/lib/usbhost/src/bandwidth.c

    rfac0ac7 r7c3fb9b  
    7070        const size_t packet_count = ep->packets_per_uframe;
    7171
    72         /* TODO: It may be that ISO and INT transfers use only one packet per
    73          * transaction, but I did not find text in USB spec to confirm this */
     72        /*
     73         * TODO: It may be that ISO and INT transfers use only one packet per
     74         * transaction, but I did not find text in USB spec to confirm this
     75         */
    7476        /* NOTE: All data packets will be considered to be max_packet_size */
    7577        switch (ep->device->speed) {
    7678        case USB_SPEED_LOW:
    7779                assert(type == USB_TRANSFER_INTERRUPT);
    78                 /* Protocol overhead 13B
     80                /*
     81                 * Protocol overhead 13B
    7982                 * (3 SYNC bytes, 3 PID bytes, 2 Endpoint + CRC bytes, 2
    8083                 * CRC bytes, and a 3-byte interpacket delay)
    81                  * see USB spec page 45-46. */
     84                 * see USB spec page 45-46.
     85                 */
    8286                /* Speed penalty 8: low speed is 8-times slower*/
    8387                return packet_count * (13 + max_packet_size) * 8;
    8488        case USB_SPEED_FULL:
    85                 /* Interrupt transfer overhead see above
    86                  * or page 45 of USB spec */
     89                /*
     90                 * Interrupt transfer overhead see above
     91                 * or page 45 of USB spec
     92                 */
    8793                if (type == USB_TRANSFER_INTERRUPT)
    8894                        return packet_count * (13 + max_packet_size);
    8995
    9096                assert(type == USB_TRANSFER_ISOCHRONOUS);
    91                 /* Protocol overhead 9B
     97                /*
     98                 * Protocol overhead 9B
    9299                 * (2 SYNC bytes, 2 PID bytes, 2 Endpoint + CRC bytes, 2 CRC
    93100                 * bytes, and a 1-byte interpacket delay)
    94                  * see USB spec page 42 */
     101                 * see USB spec page 42
     102                 */
    95103                return packet_count * (9 + max_packet_size);
    96104        default:
  • uspace/lib/usbhost/src/hcd.c

    rfac0ac7 r7c3fb9b  
    120120                bus->ops->interrupt(bus, status);
    121121                status = 0;
    122                 /* We should wait 1 frame - 1ms here, but this polling is a
     122                /*
     123                 * We should wait 1 frame - 1ms here, but this polling is a
    123124                 * lame crutch anyway so don't hog the system. 10ms is still
    124                  * good enough for emergency mode */
     125                 * good enough for emergency mode
     126                 */
    125127                async_usleep(10000);
    126128        }
Note: See TracChangeset for help on using the changeset viewer.