#include <sys/types.h>
#include <l18n/langs.h>
#include <usb/usb.h>
#include <usb/dev/pipes.h>
#include <usb/descriptor.h>
Go to the source code of this file.
Data Structures | |
struct | usb_device_request_setup_packet_t |
Device request setup packet. More... | |
Defines | |
#define | USB_DEVICE_STATUS_REMOTE_WAKEUP ((uint16_t)(1 << 1)) |
USB device status - remote wake-up signaling is enabled. | |
#define | USB_DEVICE_STATUS_SELF_POWERED ((uint16_t)(1 << 0)) |
USB device status - device is self powered (opposed to bus powered). | |
#define | USB_ENDPOINT_STATUS_HALTED ((uint16_t)(1 << 0)) |
USB endpoint status - endpoint is halted (stalled). | |
#define | USB_FEATURE_SELECTOR_ENDPOINT_HALT (0) |
USB feature selector - endpoint halt (stall). | |
#define | USB_FEATURE_SELECTOR_REMOTE_WAKEUP (1) |
USB feature selector - device remote wake-up. | |
Enumerations | |
enum | usb_stddevreq_t |
Standard device request. | |
Functions | |
int | usb_control_request_get (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint8_t request, uint16_t value, uint16_t index, void *data, size_t data_size, size_t *actual_data_size) |
Generic wrapper for GET requests using standard control request format. | |
int | usb_control_request_set (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint8_t request, uint16_t value, uint16_t index, void *data, size_t data_size) |
Generic wrapper for SET requests using standard control request format. | |
int | usb_pipe_clear_halt (usb_pipe_t *ctrl_pipe, usb_pipe_t *target_pipe) |
Clear halt bit of an endpoint pipe (after pipe stall). | |
int | usb_request_clear_endpoint_halt (usb_pipe_t *pipe, uint16_t ep_index) |
Clear halt bit of an endpoint pipe (after pipe stall). | |
int | usb_request_clear_feature (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint16_t feature_selector, uint16_t index) |
Clear or disable specific device feature. | |
int | usb_request_get_bare_configuration_descriptor (usb_pipe_t *pipe, int index, usb_standard_configuration_descriptor_t *descriptor) |
Retrieve configuration descriptor of a USB device. | |
int | usb_request_get_configuration (usb_pipe_t *pipe, uint8_t *configuration_value) |
Get current configuration value of USB device. | |
int | usb_request_get_descriptor (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language, void *buffer, size_t size, size_t *actual_size) |
Retrieve USB descriptor of a USB device. | |
int | usb_request_get_descriptor_alloc (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language, void **buffer_ptr, size_t *buffer_size) |
Retrieve USB descriptor, allocate space for it. | |
int | usb_request_get_device_descriptor (usb_pipe_t *pipe, usb_standard_device_descriptor_t *descriptor) |
Retrieve standard device descriptor of a USB device. | |
int | usb_request_get_endpoint_status (usb_pipe_t *ctrl_pipe, usb_pipe_t *pipe, uint16_t *status) |
Get endpoint status. | |
int | usb_request_get_full_configuration_descriptor (usb_pipe_t *pipe, int index, void *descriptor, size_t descriptor_size, size_t *actual_size) |
Retrieve full configuration descriptor of a USB device. | |
int | usb_request_get_full_configuration_descriptor_alloc (usb_pipe_t *pipe, int index, void **descriptor_ptr, size_t *descriptor_size) |
Retrieve full configuration descriptor, allocate space for it. | |
int | usb_request_get_interface (usb_pipe_t *pipe, uint8_t interface_index, uint8_t *alternate_setting) |
Get selected alternate setting for USB interface. | |
int | usb_request_get_status (usb_pipe_t *pipe, usb_request_recipient_t recipient, uint16_t index, uint16_t *status) |
Retrieve status of a USB device. | |
int | usb_request_get_string (usb_pipe_t *pipe, size_t index, l18_win_locales_t lang, char **string_ptr) |
Get string (descriptor) from USB device. | |
int | usb_request_get_supported_languages (usb_pipe_t *pipe, l18_win_locales_t **languages_ptr, size_t *languages_count) |
Get list of supported languages by USB device. | |
int | usb_request_set_address (usb_pipe_t *pipe, usb_address_t new_address) |
Change address of connected device. | |
int | usb_request_set_configuration (usb_pipe_t *pipe, uint8_t configuration_value) |
Set configuration of USB device. | |
int | usb_request_set_descriptor (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language, void *buffer, size_t size) |
Update existing or add new USB descriptor to a USB device. | |
int | usb_request_set_feature (usb_pipe_t *pipe, usb_request_type_t request_type, usb_request_recipient_t recipient, uint16_t feature_selector, uint16_t index) |
Set or enable specific device feature. | |
int | usb_request_set_interface (usb_pipe_t *pipe, uint8_t interface_index, uint8_t alternate_setting) |
Select alternate setting for USB interface. |
Definition in file request.h.