Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
usbstruct.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause */
2
3/*
4 * LPCUSB, an USB device driver for LPC microcontrollers
5 * Copyright (C) 2006 Bertrik Sikken (bertrik@sikken.nl)
6 * Copyright (c) 2016 Intel Corporation
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/*
32 * This header and macros below are deprecated in 2.7 release.
33 * Please replace with macros from Chapter 9 header, include/usb/usb_ch9.h
34 */
35
43#include <usb/usb_ch9.h>
44
45#ifndef ZEPHYR_INCLUDE_USB_USBSTRUCT_H_
46#define ZEPHYR_INCLUDE_USB_USBSTRUCT_H_
47
48#warning "<usb/usbstruct.h> header is deprecated, use <usb/usb_ch9.h> instead"
49
50#define REQTYPE_GET_DIR(x) __DEPRECATED_MACRO USB_REQTYPE_GET_DIR(x)
51#define REQTYPE_GET_TYPE(x) __DEPRECATED_MACRO USB_REQTYPE_GET_TYPE(x)
52#define REQTYPE_GET_RECIP(x) __DEPRECATED_MACRO USB_REQTYPE_GET_RECIPIENT(x)
53
54#define REQTYPE_DIR_TO_DEVICE __DEPRECATED_MACRO 0
55#define REQTYPE_DIR_TO_HOST __DEPRECATED_MACRO 1
56
57#define REQTYPE_TYPE_STANDARD __DEPRECATED_MACRO 0
58#define REQTYPE_TYPE_CLASS __DEPRECATED_MACRO 1
59#define REQTYPE_TYPE_VENDOR __DEPRECATED_MACRO 2
60#define REQTYPE_TYPE_RESERVED __DEPRECATED_MACRO 3
61
62#define REQTYPE_RECIP_DEVICE __DEPRECATED_MACRO 0
63#define REQTYPE_RECIP_INTERFACE __DEPRECATED_MACRO 1
64#define REQTYPE_RECIP_ENDPOINT __DEPRECATED_MACRO 2
65#define REQTYPE_RECIP_OTHER __DEPRECATED_MACRO 3
66
67/* standard requests */
68#define REQ_GET_STATUS __DEPRECATED_MACRO 0x00
69#define REQ_CLEAR_FEATURE __DEPRECATED_MACRO 0x01
70#define REQ_SET_FEATURE __DEPRECATED_MACRO 0x03
71#define REQ_SET_ADDRESS __DEPRECATED_MACRO 0x05
72#define REQ_GET_DESCRIPTOR __DEPRECATED_MACRO 0x06
73#define REQ_SET_DESCRIPTOR __DEPRECATED_MACRO 0x07
74#define REQ_GET_CONFIGURATION __DEPRECATED_MACRO 0x08
75#define REQ_SET_CONFIGURATION __DEPRECATED_MACRO 0x09
76#define REQ_GET_INTERFACE __DEPRECATED_MACRO 0x0A
77#define REQ_SET_INTERFACE __DEPRECATED_MACRO 0x0B
78#define REQ_SYNCH_FRAME __DEPRECATED_MACRO 0x0C
79
80/* feature selectors */
81#define FEA_ENDPOINT_HALT __DEPRECATED_MACRO 0x00
82#define FEA_REMOTE_WAKEUP __DEPRECATED_MACRO 0x01
83#define FEA_TEST_MODE __DEPRECATED_MACRO 0x02
84
85#define DEVICE_STATUS_SELF_POWERED __DEPRECATED_MACRO 0x01
86#define DEVICE_STATUS_REMOTE_WAKEUP __DEPRECATED_MACRO 0x02
87
88#define GET_DESC_TYPE(x) __DEPRECATED_MACRO USB_GET_DESCRIPTOR_TYPE(x)
89#define GET_DESC_INDEX(x) __DEPRECATED_MACRO USB_GET_DESCRIPTOR_INDEX(x)
90
91#endif /* ZEPHYR_INCLUDE_USB_USBSTRUCT_H_ */
USB Chapter 9 structures and definitions.