Changeset 58563585 in mainline for uspace/lib/usb/include


Ignore:
Timestamp:
2016-08-31T11:15:39Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
10cb47e
Parents:
7a67416
Message:

code review and cstyle cleanup (no change in functionality)

Location:
uspace/lib/usb/include/usb
Files:
5 edited

Legend:

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

    r7a67416 r58563585  
    110110         */
    111111        uint8_t characteristics;
     112
    112113#define HUB_CHAR_POWER_PER_PORT_FLAG    (1 << 0)
    113114#define HUB_CHAR_NO_POWER_SWITCH_FLAG   (1 << 1)
     
    196197 */
    197198/* 7 (basic size) + 2*32 (port bitmasks) */
    198 #define USB_HUB_MAX_DESCRIPTOR_SIZE (7 + 2 * 32)
     199#define USB_HUB_MAX_DESCRIPTOR_SIZE  (7 + 2 * 32)
    199200
    200201#endif
  • uspace/lib/usb/include/usb/debug.h

    r7a67416 r58563585  
    3838#include <sys/types.h>
    3939#include <io/log.h>
    40 
    4140
    4241void usb_dump_standard_descriptor(FILE *, const char *, const char *,
  • uspace/lib/usb/include/usb/descriptor.h

    r7a67416 r58563585  
    4545        USB_DESCTYPE_INTERFACE = 4,
    4646        USB_DESCTYPE_ENDPOINT = 5,
    47         /* New in USB2.0 */
     47        /* New in USB 2.0 */
    4848        USB_DESCTYPE_DEVICE_QUALIFIER = 6,
    4949        USB_DESCTYPE_OTHER_SPEED_CONFIGURATION = 7,
     
    202202         * HS INT and ISO transfers. */
    203203        uint16_t max_packet_size;
     204
    204205#define ED_MPS_PACKET_SIZE_MASK  0x3ff
    205206#define ED_MPS_PACKET_SIZE_GET(value) \
     
    207208#define ED_MPS_TRANS_OPPORTUNITIES_GET(value) \
    208209        ((((value) >> 10) & 0x3) + 1)
     210
    209211        /** Polling interval in milliseconds.
    210212         * Ignored for bulk and control endpoints.
  • uspace/lib/usb/include/usb/dev.h

    r7a67416 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup libusb
    2930 * @{
    3031 */
     32
    3133/** @file
    3234 * Common USB types and functions.
    3335 */
     36
    3437#ifndef LIBUSB_DEV_H_
    3538#define LIBUSB_DEV_H_
     
    3740#include <devman.h>
    3841
    39 int usb_resolve_device_handle(const char *, devman_handle_t *);
     42extern int usb_resolve_device_handle(const char *, devman_handle_t *);
     43
    4044#endif
     45
    4146/**
    4247 * @}
  • uspace/lib/usb/include/usb/usb.h

    r7a67416 r58563585  
    114114/** Default USB address. */
    115115#define USB_ADDRESS_DEFAULT 0
     116
    116117/** Maximum address number in USB 1.1. */
    117118#define USB11_ADDRESS_MAX 127
     
    121122 *
    122123 * @param ep USB address.
     124 *
    123125 * @return True, if value is wihtin limits, false otherwise.
     126 *
    124127 */
    125128static inline bool usb_address_is_valid(usb_address_t a)
     
    135138/** Default control endpoint */
    136139#define USB_ENDPOINT_DEFAULT_CONTROL 0
     140
    137141/** Maximum endpoint number in USB 1.1. */
    138142#define USB11_ENDPOINT_MAX 16
     
    141145 *
    142146 * @param ep USB endpoint number.
     147 *
    143148 * @return True, if value is wihtin limits, false otherwise.
     149 *
    144150 */
    145151static inline bool usb_endpoint_is_valid(usb_endpoint_t ep)
     
    160166        uint32_t packed;
    161167} usb_target_t;
    162 
    163168
    164169/** Check USB target for allowed values (address and endpoint).
Note: See TracChangeset for help on using the changeset viewer.