Changeset 58563585 in mainline for uspace/lib/usbhost/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/usbhost/include/usb/host
Files:
2 edited

Legend:

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

    r7a67416 r58563585  
    8888} endpoint_t;
    8989
    90 endpoint_t * endpoint_create(usb_address_t address, usb_endpoint_t endpoint,
    91     usb_direction_t direction, usb_transfer_type_t type, usb_speed_t speed,
    92     size_t max_packet_size, unsigned packets, size_t bw,
    93     usb_address_t tt_address, unsigned tt_port);
    94 void endpoint_destroy(endpoint_t *instance);
     90extern endpoint_t *endpoint_create(usb_address_t, usb_endpoint_t,
     91    usb_direction_t, usb_transfer_type_t, usb_speed_t, size_t, unsigned int,
     92    size_t, usb_address_t, unsigned int);
     93extern void endpoint_destroy(endpoint_t *);
    9594
    96 void endpoint_add_ref(endpoint_t *instance);
    97 void endpoint_del_ref(endpoint_t *instance);
     95extern void endpoint_add_ref(endpoint_t *);
     96extern void endpoint_del_ref(endpoint_t *);
    9897
    99 void endpoint_set_hc_data(endpoint_t *instance,
    100     void *data, int (*toggle_get)(void *), void (*toggle_set)(void *, int));
    101 void endpoint_clear_hc_data(endpoint_t *instance);
     98extern void endpoint_set_hc_data(endpoint_t *, void *, int (*)(void *),
     99    void (*)(void *, int));
     100extern void endpoint_clear_hc_data(endpoint_t *);
    102101
    103 void endpoint_use(endpoint_t *instance);
    104 void endpoint_release(endpoint_t *instance);
     102extern void endpoint_use(endpoint_t *);
     103extern void endpoint_release(endpoint_t *);
    105104
    106 int endpoint_toggle_get(endpoint_t *instance);
    107 void endpoint_toggle_set(endpoint_t *instance, int toggle);
     105extern int endpoint_toggle_get(endpoint_t *);
     106extern void endpoint_toggle_set(endpoint_t *, int);
    108107
    109108/** list_get_instance wrapper.
     109 *
    110110 * @param item Pointer to link member.
     111 *
    111112 * @return Pointer to endpoint_t structure.
     113 *
    112114 */
    113115static inline endpoint_t * endpoint_get_instance(link_t *item)
     
    116118}
    117119#endif
     120
    118121/**
    119122 * @}
  • uspace/lib/usbhost/include/usb/host/hcd.h

    r7a67416 r58563585  
    8181};
    8282
    83 void hcd_init(hcd_t *hcd, usb_speed_t max_speed, size_t bandwidth,
    84     bw_count_func_t bw_count);
     83extern void hcd_init(hcd_t *, usb_speed_t, size_t, bw_count_func_t);
    8584
    8685static inline void hcd_set_implementation(hcd_t *hcd, void *data,
     
    102101}
    103102
    104 usb_address_t hcd_request_address(hcd_t *hcd, usb_speed_t speed);
     103extern usb_address_t hcd_request_address(hcd_t *, usb_speed_t);
    105104
    106 int hcd_release_address(hcd_t *hcd, usb_address_t address);
     105extern int hcd_release_address(hcd_t *, usb_address_t);
    107106
    108 int hcd_reserve_default_address(hcd_t *hcd, usb_speed_t speed);
     107extern int hcd_reserve_default_address(hcd_t *, usb_speed_t);
    109108
    110109static inline int hcd_release_default_address(hcd_t *hcd)
     
    113112}
    114113
    115 int hcd_add_ep(hcd_t *hcd, usb_target_t target, usb_direction_t dir,
    116     usb_transfer_type_t type, size_t max_packet_size, unsigned packets,
    117     size_t size, usb_address_t tt_address, unsigned tt_port);
     114extern int hcd_add_ep(hcd_t *, usb_target_t, usb_direction_t,
     115    usb_transfer_type_t, size_t, unsigned int, size_t, usb_address_t,
     116    unsigned int);
    118117
    119 int hcd_remove_ep(hcd_t *hcd, usb_target_t target, usb_direction_t dir);
     118extern int hcd_remove_ep(hcd_t *, usb_target_t, usb_direction_t);
    120119
    121 int hcd_send_batch(hcd_t *hcd, usb_target_t target, usb_direction_t direction,
    122     void *data, size_t size, uint64_t setup_data,
    123     usbhc_iface_transfer_in_callback_t in,
    124     usbhc_iface_transfer_out_callback_t out, void *arg, const char* name);
     120extern int hcd_send_batch(hcd_t *, usb_target_t, usb_direction_t, void *,
     121    size_t, uint64_t, usbhc_iface_transfer_in_callback_t,
     122    usbhc_iface_transfer_out_callback_t, void *, const char *);
    125123
    126 ssize_t hcd_send_batch_sync(hcd_t *hcd, usb_target_t target,
    127     usb_direction_t dir, void *data, size_t size, uint64_t setup_data,
    128     const char* name);
     124extern ssize_t hcd_send_batch_sync(hcd_t *, usb_target_t, usb_direction_t,
     125    void *, size_t, uint64_t, const char *);
    129126
    130127#endif
     128
    131129/**
    132130 * @}
Note: See TracChangeset for help on using the changeset viewer.