Changeset 19a1800 in mainline for uspace/lib/usb/include/usb/request.h


Ignore:
Timestamp:
2011-03-01T22:20:56Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e24e7b1
Parents:
976f546 (diff), ac8285d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with the current development

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/request.h

    r976f546 r19a1800  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2011 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libusb usb
     29/** @addtogroup libusb
    3030 * @{
    3131 */
    3232/** @file
    33  * @brief Standard USB device requests.
     33 * Standard USB requests.
    3434 */
    35 #ifndef LIBUSB_DEVREQ_H_
    36 #define LIBUSB_DEVREQ_H_
     35#ifndef LIBUSB_REQUEST_H_
     36#define LIBUSB_REQUEST_H_
    3737
    38 #include <ipc/ipc.h>
    39 #include <async.h>
     38#include <sys/types.h>
     39#include <l18n/langs.h>
    4040#include <usb/usb.h>
     41#include <usb/pipes.h>
    4142#include <usb/descriptor.h>
    4243
     
    7071        /** Main parameter to the request. */
    7172        union {
     73                uint16_t value;
    7274                /* FIXME: add #ifdefs according to host endianess */
    7375                struct {
     
    7577                        uint8_t value_high;
    7678                };
    77                 uint16_t value;
    7879        };
    7980        /** Auxiliary parameter to the request.
     
    8586} __attribute__ ((packed)) usb_device_request_setup_packet_t;
    8687
     88int usb_control_request_set(usb_endpoint_pipe_t *,
     89    usb_request_type_t, usb_request_recipient_t, uint8_t,
     90    uint16_t, uint16_t, void *, size_t);
    8791
    88 int usb_drv_req_get_status(int, usb_address_t, usb_request_recipient_t,
    89     uint16_t, uint16_t *);
    90 int usb_drv_req_clear_feature(int, usb_address_t, usb_request_recipient_t,
    91     uint16_t, uint16_t);
    92 int usb_drv_req_set_feature(int, usb_address_t, usb_request_recipient_t,
    93     uint16_t, uint16_t);
    94 int usb_drv_req_set_address(int, usb_address_t, usb_address_t);
    95 int usb_drv_req_get_descriptor(int, usb_address_t, usb_request_type_t,
    96     uint8_t, uint8_t, uint16_t, void *, size_t, size_t *);
    97 int usb_drv_req_get_device_descriptor(int, usb_address_t,
     92int usb_control_request_get(usb_endpoint_pipe_t *,
     93    usb_request_type_t, usb_request_recipient_t, uint8_t,
     94    uint16_t, uint16_t, void *, size_t, size_t *);
     95
     96int usb_request_set_address(usb_endpoint_pipe_t *, usb_address_t);
     97int usb_request_get_descriptor(usb_endpoint_pipe_t *, usb_request_type_t,
     98    usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void *, size_t,
     99    size_t *);
     100int usb_request_get_descriptor_alloc(usb_endpoint_pipe_t *, usb_request_type_t,
     101    usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void **, size_t *);
     102int usb_request_get_device_descriptor(usb_endpoint_pipe_t *,
    98103    usb_standard_device_descriptor_t *);
    99 int usb_drv_req_get_bare_configuration_descriptor(int, usb_address_t, int,
     104int usb_request_get_bare_configuration_descriptor(usb_endpoint_pipe_t *, int,
    100105    usb_standard_configuration_descriptor_t *);
    101 int usb_drv_req_get_full_configuration_descriptor(int, usb_address_t, int,
     106int usb_request_get_full_configuration_descriptor(usb_endpoint_pipe_t *, int,
    102107    void *, size_t, size_t *);
    103 int usb_drv_req_set_descriptor(int, usb_address_t, uint8_t, uint8_t, uint16_t,
    104     void *, size_t);
    105 int usb_drv_req_get_configuration(int, usb_address_t, uint8_t *);
    106 int usb_drv_req_set_configuration(int, usb_address_t, uint8_t);
    107 int usb_drv_req_get_interface(int, usb_address_t, uint16_t, uint8_t *);
    108 int usb_drv_req_set_interface(int, usb_address_t, uint16_t, uint8_t);
     108int usb_request_set_configuration(usb_endpoint_pipe_t *, uint8_t);
     109
     110int usb_request_get_supported_languages(usb_endpoint_pipe_t *,
     111    l18_win_locales_t **, size_t *);
     112int usb_request_get_string(usb_endpoint_pipe_t *, size_t, l18_win_locales_t,
     113    char **);
    109114
    110115#endif
Note: See TracChangeset for help on using the changeset viewer.