OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [include/] [usb_requests.h] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 nussgipfel
/* -*- c++ -*- */
2
/*
3
 * Copyright 2003 Free Software Foundation, Inc.
4
 *
5
 * This file is part of GNU Radio
6
 *
7
 * GNU Radio is free software; you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation; either version 3, or (at your option)
10
 * any later version.
11
 *
12
 * GNU Radio is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with GNU Radio; see the file COPYING.  If not, write to
19
 * the Free Software Foundation, Inc., 51 Franklin Street,
20
 * Boston, MA 02110-1301, USA.
21
 */
22
 
23
/*********************************************************************/
24
/** \file     usb_requests.h
25
 *********************************************************************
26
 * \brief     Standard USB requests.
27
 *            These are contained in end point 0 setup packets
28
 *
29
 * \author    Christoph Zimmermann bfh.ch
30
 * \date      2009-1-13
31
 *
32
*/
33
 
34
 
35
#ifndef _USB_REQUESTS_H_
36
#define _USB_REQUESTS_H_
37
 
38
#define bRequestType    SETUPDAT[0]
39
#define bRequest        SETUPDAT[1]
40
#define wValueL         SETUPDAT[2]
41
#define wValueH         SETUPDAT[3]
42
#define wIndexL         SETUPDAT[4]
43
#define wIndexH         SETUPDAT[5]
44
#define wLengthL        SETUPDAT[6]
45
#define wLengthH        SETUPDAT[7]
46
 
47
/* format of bmRequestType byte */
48
 
49
#define bmRT_DIR_MASK           (0x1 << 7)
50
#define bmRT_DIR_IN             (1 << 7)
51
#define bmRT_DIR_OUT            (0 << 7)
52
 
53
#define bmRT_TYPE_MASK          (0x3 << 5)
54
#define bmRT_TYPE_STD           (0 << 5)
55
#define bmRT_TYPE_CLASS         (1 << 5)
56
#define bmRT_TYPE_VENDOR        (2 << 5)
57
#define bmRT_TYPE_RESERVED      (3 << 5)
58
 
59
#define bmRT_RECIP_MASK         (0x1f << 0)
60
#define bmRT_RECIP_DEVICE       (0 << 0)
61
#define bmRT_RECIP_INTERFACE    (1 << 0)
62
#define bmRT_RECIP_ENDPOINT     (2 << 0)
63
#define bmRT_RECIP_OTHER        (3 << 0)
64
 
65
 
66
/* standard request codes (bRequest) */
67
 
68
#define RQ_GET_STATUS           0
69
#define RQ_CLEAR_FEATURE        1
70
#define RQ_RESERVED_2           2
71
#define RQ_SET_FEATURE          3
72
#define RQ_RESERVED_4           4
73
#define RQ_SET_ADDRESS          5
74
#define RQ_GET_DESCR            6
75
#define RQ_SET_DESCR            7
76
#define RQ_GET_CONFIG           8
77
#define RQ_SET_CONFIG           9
78
#define RQ_GET_INTERFACE       10
79
#define RQ_SET_INTERFACE       11
80
#define RQ_SYNCH_FRAME         12
81
 
82
/* standard descriptor types */
83
 
84
#define DT_DEVICE               1
85
#define DT_CONFIG               2
86
#define DT_STRING               3
87
#define DT_INTERFACE            4
88
#define DT_ENDPOINT             5
89
#define DT_DEVQUAL              6
90
#define DT_OTHER_SPEED          7
91
#define DT_INTERFACE_POWER      8
92
#define DT_DFU_FUNCTIONAL       0x21
93
 
94
/* standard feature selectors */
95
 
96
#define FS_ENDPOINT_HALT        0        /**< recip: endpoint */
97
#define FS_DEV_REMOTE_WAKEUP    1       /**< recip: device */
98
#define FS_TEST_MODE            2       /**< recip: device */
99
 
100
/* Get Status device attributes */
101
 
102
#define bmGSDA_SELF_POWERED     0x01
103
#define bmGSDA_REM_WAKEUP       0x02
104
 
105
 
106
#endif /* _USB_REQUESTS_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.