usbopt.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Koen Zandberg <koen@bergzand.net>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for
6  * more details.
7  */
22 #ifndef USB_USBOPT_H
23 #define USB_USBOPT_H
24 
25 #include <stdint.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
37 typedef enum {
38 
43 
51 
58 
65 
72 
73  /* expand list if required */
74 } usbopt_t;
75 
82 typedef enum {
83 
88 
93 
98 
103 
104  /* expand list if required */
105 } usbopt_ep_t;
106 
110 typedef enum
111 {
115 
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif /* USB_USBOPT_H */
122 
USBOPT_ENABLE
@ USBOPT_ENABLE
enable a given option
Definition: usbopt.h:113
USBOPT_MAX_SPEED
@ USBOPT_MAX_SPEED
(usb_version_t) Highest USB speed supported by peripheral
Definition: usbopt.h:71
USBOPT_CONNECTED
@ USBOPT_CONNECTED
(usbopt_enable_t) Whether a USB host connection is detected
Definition: usbopt.h:57
USBOPT_EP_ENABLE
@ USBOPT_EP_ENABLE
(usbopt_enable_t) Enable or disable the endpoint
Definition: usbopt.h:87
USBOPT_DISABLE
@ USBOPT_DISABLE
disable a given option
Definition: usbopt.h:112
USBOPT_EP_AVAILABLE
@ USBOPT_EP_AVAILABLE
(size_t) Retrieve number of bytes available on endpoint.
Definition: usbopt.h:102
USBOPT_EP_READY
@ USBOPT_EP_READY
(usbopt_enable_t) Signal data ready or not ready anymore
Definition: usbopt.h:97
USBOPT_EP_STALL
@ USBOPT_EP_STALL
(usbopt_enable_t) Enable or disable stall replies for endpoint
Definition: usbopt.h:92
usbopt_t
usbopt_t
List of configuration settings for USB peripherals.
Definition: usbopt.h:37
USBOPT_ADDRESS
@ USBOPT_ADDRESS
(uint8_t) USB device address, limited to 7 bit by the protocol
Definition: usbopt.h:42
USBOPT_MAX_VERSION
@ USBOPT_MAX_VERSION
(usb_version_t) Highest USB version supported by peripheral
Definition: usbopt.h:64
usbopt_enable_t
usbopt_enable_t
Binary parameter for enabling and disabling options.
Definition: usbopt.h:110
USBOPT_ATTACH
@ USBOPT_ATTACH
(usbopt_enable_t) Attach/detach USB peripheral to host
Definition: usbopt.h:50
usbopt_ep_t
usbopt_ep_t
List of configuration settings for USB peripheral endpoints.
Definition: usbopt.h:82