Changeset ae3a941 in mainline for uspace/lib/usbdev


Ignore:
Timestamp:
2018-02-26T16:51:40Z (7 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/lib/usbdev
Files:
5 edited

Legend:

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

    r3692678 rae3a941  
    5959
    6060/* DDF parts */
    61 errno_t usb_device_create_ddf(ddf_dev_t *, const usb_endpoint_description_t **, const char **);
     61errno_t usb_device_create_ddf(ddf_dev_t *,
     62    const usb_endpoint_description_t **, const char **);
    6263void usb_device_destroy_ddf(ddf_dev_t *);
    6364
     
    6869}
    6970
    70 usb_device_t * usb_device_create(devman_handle_t);
     71usb_device_t *usb_device_create(devman_handle_t);
    7172void usb_device_destroy(usb_device_t *);
    7273
    73 const char * usb_device_get_name(usb_device_t *);
     74const char *usb_device_get_name(usb_device_t *);
    7475ddf_fun_t *usb_device_ddf_fun_create(usb_device_t *, fun_type_t, const char *);
    7576
    76 async_exch_t * usb_device_bus_exchange_begin(usb_device_t *);
     77async_exch_t *usb_device_bus_exchange_begin(usb_device_t *);
    7778void usb_device_bus_exchange_end(async_exch_t *);
    7879
     
    9596devman_handle_t usb_device_get_devman_handle(const usb_device_t *);
    9697
    97 const usb_device_descriptors_t * usb_device_descriptors(usb_device_t *);
     98const usb_device_descriptors_t *usb_device_descriptors(usb_device_t *);
    9899
    99 const usb_alternate_interfaces_t * usb_device_get_alternative_ifaces(
     100const usb_alternate_interfaces_t *usb_device_get_alternative_ifaces(
    100101    usb_device_t *);
    101102
    102 void * usb_device_data_alloc(usb_device_t *, size_t);
    103 void * usb_device_data_get(usb_device_t *);
     103void *usb_device_data_alloc(usb_device_t *, size_t);
     104void *usb_device_data_get(usb_device_t *);
    104105
    105106#endif
  • uspace/lib/usbdev/include/usb/dev/pipes.h

    r3692678 rae3a941  
    9292        const usb_standard_endpoint_descriptor_t *descriptor;
    9393        /** Relevant superspeed companion descriptor. */
    94         const usb_superspeed_endpoint_companion_descriptor_t *companion_descriptor;
     94        const usb_superspeed_endpoint_companion_descriptor_t
     95            *companion_descriptor;
    9596        /** Interface descriptor the endpoint belongs to. */
    9697        const usb_standard_interface_descriptor_t *interface;
     
    105106    size_t, const uint8_t *, size_t, usb_dev_session_t *);
    106107
    107 errno_t usb_pipe_register(usb_pipe_t *, const usb_standard_endpoint_descriptor_t *, const usb_superspeed_endpoint_companion_descriptor_t *);
     108errno_t usb_pipe_register(usb_pipe_t *,
     109    const usb_standard_endpoint_descriptor_t *,
     110    const usb_superspeed_endpoint_companion_descriptor_t *);
    108111errno_t usb_pipe_unregister(usb_pipe_t *);
    109112
  • uspace/lib/usbdev/include/usb/dev/poll.h

    r3692678 rae3a941  
    6060        size_t request_size;
    6161
    62         /** Data buffer of at least `request_size`. User is responsible for its allocation. */
     62        /**
     63         * Data buffer of at least `request_size`. User is responsible for its
     64         * allocation.
     65         */
    6366        uint8_t *buffer;
    6467
     
    7578
    7679
    77         /** Optional parameters - user can customize them, but they are defaulted to
    78          *  some reasonable values.
     80        /**
     81         * Optional parameters - user can customize them, but they are
     82         * defaulted to  some reasonable values.
    7983         */
    8084
     
    8690        int debug;
    8791
    88         /** Maximum number of consecutive errors before polling termination (default 3). */
     92        /**
     93         * Maximum number of consecutive errors before polling termination
     94         * (default 3).
     95         */
    8996        size_t max_failures;
    9097
     
    121128
    122129
    123         /** Internal parameters - user is not expected to set them. Messing with them
    124          *  can result in unexpected behavior if you do not know what you are doing.
     130        /**
     131         * Internal parameters - user is not expected to set them. Messing with
     132         * them can result in unexpected behavior if you do not know what you
     133         * are doing.
    125134         */
    126135
  • uspace/lib/usbdev/src/dp.c

    r3692678 rae3a941  
    127127 * @retval -1 Invalid input.
    128128 */
    129 static int get_descriptor_type(const usb_dp_parser_data_t *data, const uint8_t *start)
     129static int get_descriptor_type(const usb_dp_parser_data_t *data,
     130    const uint8_t *start)
    130131{
    131132        if (start == NULL) {
     
    258259        int parent_type = get_descriptor_type(data, parent);
    259260        int possible_sibling_type = get_descriptor_type(data, possible_sibling);
    260         if (is_nested_descriptor_type(parser, possible_sibling_type, parent_type)) {
     261        if (is_nested_descriptor_type(parser,
     262                    possible_sibling_type, parent_type)) {
    261263                return possible_sibling;
    262264        } else {
  • uspace/lib/usbdev/src/pipes.c

    r3692678 rae3a941  
    338338 * @return Error code.
    339339 */
    340 errno_t usb_pipe_write_dma(usb_pipe_t *pipe, void *base, void* ptr, size_t size)
     340errno_t usb_pipe_write_dma(usb_pipe_t *pipe, void *base, void *ptr, size_t size)
    341341{
    342342        assert(pipe);
     
    377377/** Initialize USB default control pipe.
    378378 *
    379  * This one is special because it must not be registered, it is registered automatically.
     379 * This one is special because it must not be registered, it is registered
     380 * automatically.
    380381 *
    381382 * @param pipe Endpoint pipe to be initialized.
     
    383384 * @return Error code.
    384385 */
    385 errno_t usb_pipe_initialize_default_control(usb_pipe_t *pipe, usb_dev_session_t *bus_session)
     386errno_t usb_pipe_initialize_default_control(usb_pipe_t *pipe,
     387    usb_dev_session_t *bus_session)
    386388{
    387389        const errno_t ret = usb_pipe_initialize(pipe, bus_session);
     
    402404 * @return Error code.
    403405 */
    404 errno_t usb_pipe_register(usb_pipe_t *pipe, const usb_standard_endpoint_descriptor_t *ep_desc, const usb_superspeed_endpoint_companion_descriptor_t *comp_desc)
     406errno_t usb_pipe_register(usb_pipe_t *pipe,
     407    const usb_standard_endpoint_descriptor_t *ep_desc,
     408    const usb_superspeed_endpoint_companion_descriptor_t *comp_desc)
    405409{
    406410        assert(pipe);
     
    429433#undef COPY
    430434
    431         const errno_t ret = usbhc_register_endpoint(exch, &pipe->desc, &descriptors);
     435        const errno_t ret = usbhc_register_endpoint(exch,
     436            &pipe->desc, &descriptors);
    432437        async_exchange_end(exch);
    433438        return ret;
Note: See TracChangeset for help on using the changeset viewer.