| [0a37e14] | 1 | /*
|
|---|
| [d7f7a4a] | 2 | * SPDX-FileCopyrightText: 2011 Vojtech Horky
|
|---|
| [0a37e14] | 3 | *
|
|---|
| [d7f7a4a] | 4 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| [0a37e14] | 5 | */
|
|---|
| 6 |
|
|---|
| [160b75e] | 7 | /** @addtogroup libusbdev
|
|---|
| [0a37e14] | 8 | * @{
|
|---|
| 9 | */
|
|---|
| 10 | /** @file
|
|---|
| 11 | * Standard USB requests.
|
|---|
| 12 | */
|
|---|
| [7d521e24] | 13 | #ifndef LIBUSBDEV_REQUEST_H_
|
|---|
| 14 | #define LIBUSBDEV_REQUEST_H_
|
|---|
| [0a37e14] | 15 |
|
|---|
| [8d2dd7f2] | 16 | #include <stddef.h>
|
|---|
| 17 | #include <stdint.h>
|
|---|
| [1a6a234] | 18 | #include <l18n/langs.h>
|
|---|
| [0a37e14] | 19 | #include <usb/usb.h>
|
|---|
| [7d521e24] | 20 | #include <usb/dev/pipes.h>
|
|---|
| [abe8ac5] | 21 | #include <usb/descriptor.h>
|
|---|
| [971fbfde] | 22 | #include <usb/request.h>
|
|---|
| [0a37e14] | 23 |
|
|---|
| [5a6cc679] | 24 | errno_t usb_control_request_set(usb_pipe_t *,
|
|---|
| [a4a8cca] | 25 | usb_request_type_t, usb_request_recipient_t, uint8_t,
|
|---|
| [f8d43aa] | 26 | uint16_t, uint16_t, const void *, size_t);
|
|---|
| [a4a8cca] | 27 |
|
|---|
| [5a6cc679] | 28 | errno_t usb_control_request_get(usb_pipe_t *,
|
|---|
| [a4a8cca] | 29 | usb_request_type_t, usb_request_recipient_t, uint8_t,
|
|---|
| 30 | uint16_t, uint16_t, void *, size_t, size_t *);
|
|---|
| 31 |
|
|---|
| [5a6cc679] | 32 | errno_t usb_request_get_status(usb_pipe_t *, usb_request_recipient_t,
|
|---|
| [9cf1c5a] | 33 | uint16_t, uint16_t *);
|
|---|
| [5a6cc679] | 34 | errno_t usb_request_clear_feature(usb_pipe_t *, usb_request_type_t,
|
|---|
| [9cf1c5a] | 35 | usb_request_recipient_t, uint16_t, uint16_t);
|
|---|
| [5a6cc679] | 36 | errno_t usb_request_set_feature(usb_pipe_t *, usb_request_type_t,
|
|---|
| [9cf1c5a] | 37 | usb_request_recipient_t, uint16_t, uint16_t);
|
|---|
| [5a6cc679] | 38 | errno_t usb_request_get_descriptor(usb_pipe_t *, usb_request_type_t,
|
|---|
| [3238506] | 39 | usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void *, size_t,
|
|---|
| [ad4562c2] | 40 | size_t *);
|
|---|
| [5a6cc679] | 41 | errno_t usb_request_get_descriptor_alloc(usb_pipe_t *, usb_request_type_t,
|
|---|
| [ad4562c2] | 42 | usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void **, size_t *);
|
|---|
| [5a6cc679] | 43 | errno_t usb_request_get_device_descriptor(usb_pipe_t *,
|
|---|
| [abe8ac5] | 44 | usb_standard_device_descriptor_t *);
|
|---|
| [5a6cc679] | 45 | errno_t usb_request_get_bare_configuration_descriptor(usb_pipe_t *, int,
|
|---|
| [abe8ac5] | 46 | usb_standard_configuration_descriptor_t *);
|
|---|
| [5a6cc679] | 47 | errno_t usb_request_get_full_configuration_descriptor(usb_pipe_t *, int,
|
|---|
| [abe8ac5] | 48 | void *, size_t, size_t *);
|
|---|
| [5a6cc679] | 49 | errno_t usb_request_get_full_configuration_descriptor_alloc(usb_pipe_t *,
|
|---|
| [33b8d024] | 50 | int, void **, size_t *);
|
|---|
| [5a6cc679] | 51 | errno_t usb_request_set_descriptor(usb_pipe_t *, usb_request_type_t,
|
|---|
| [f8d43aa] | 52 | usb_request_recipient_t, uint8_t, uint8_t, uint16_t, const void *, size_t);
|
|---|
| [99a1a56] | 53 |
|
|---|
| [5a6cc679] | 54 | errno_t usb_request_get_configuration(usb_pipe_t *, uint8_t *);
|
|---|
| 55 | errno_t usb_request_set_configuration(usb_pipe_t *, uint8_t);
|
|---|
| [bb512b2d] | 56 |
|
|---|
| [5a6cc679] | 57 | errno_t usb_request_get_interface(usb_pipe_t *, uint8_t, uint8_t *);
|
|---|
| 58 | errno_t usb_request_set_interface(usb_pipe_t *, uint8_t, uint8_t);
|
|---|
| [0a37e14] | 59 |
|
|---|
| [5a6cc679] | 60 | errno_t usb_request_get_supported_languages(usb_pipe_t *,
|
|---|
| [1a6a234] | 61 | l18_win_locales_t **, size_t *);
|
|---|
| [5a6cc679] | 62 | errno_t usb_request_get_string(usb_pipe_t *, size_t, l18_win_locales_t,
|
|---|
| [b84e114] | 63 | char **);
|
|---|
| [1a6a234] | 64 |
|
|---|
| [5a6cc679] | 65 | errno_t usb_pipe_clear_halt(usb_pipe_t *, usb_pipe_t *);
|
|---|
| 66 | errno_t usb_request_get_endpoint_status(usb_pipe_t *, usb_pipe_t *, uint16_t *);
|
|---|
| [c19329a] | 67 |
|
|---|
| [0a37e14] | 68 | #endif
|
|---|
| 69 | /**
|
|---|
| 70 | * @}
|
|---|
| 71 | */
|
|---|