thx @arghgra. defined variable != declared variable
1 /*********************************************************************
3 * Microchip USB C18 Firmware Version 1.0
5 *********************************************************************
6 * FileName: usbdefs_ep0_buff.h
7 * Dependencies: See INCLUDES section below
9 * Compiler: C18 2.30.01+
10 * Company: Microchip Technology, Inc.
12 * Software License Agreement
14 * The software supplied herewith by Microchip Technology Incorporated
15 * (the “Company”) for its PICmicro® Microcontroller is intended and
16 * supplied to you, the Company’s customer, for use solely and
17 * exclusively on Microchip PICmicro Microcontroller products. The
18 * software is owned by the Company and/or its supplier, and is
19 * protected under applicable copyright laws. All rights are reserved.
20 * Any use in violation of the foregoing restrictions may subject the
21 * user to criminal sanctions under applicable laws, as well as to
22 * civil liability for the breach of the terms and conditions of this
25 * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
26 * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
27 * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
28 * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
29 * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
30 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
33 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 * Rawin Rojvanit 11/19/04 Original.
35 ********************************************************************/
37 /******************************************************************************
38 * USB Definitions: Endpoint 0 Buffer
39 *****************************************************************************/
40 #ifndef USBDEFS_EP0_BUFF_H
41 #define USBDEFS_EP0_BUFF_H
43 /** I N C L U D E S **********************************************************/
45 #include "usbcfg.h" // usbcfg.h contains required definitions
47 /******************************************************************************
50 * Every setup packet has 8 bytes.
51 * However, the buffer size has to equal the EP0_BUFF_SIZE value specified
52 * in autofiles\usbcfg.h
53 * The value of EP0_BUFF_SIZE can be 8, 16, 32, or 64.
55 * First 8 bytes are defined to be directly addressable to improve speed
56 * and reduce code size.
57 * Bytes beyond the 8th byte have to be accessed using indirect addressing.
58 *****************************************************************************/
59 typedef union _CTRL_TRF_SETUP
61 /** Array for indirect addressing ****************************************/
64 byte _byte[EP0_BUFF_SIZE];
67 /** Standard Device Requests *********************************************/
86 unsigned Recipient:5; //Device,Interface,Endpoint,Other
87 unsigned RequestType:2; //Standard,Class,Vendor,Reserved
88 unsigned DataDir:1; //Host-to-device,Device-to-host
90 byte bFeature; //DEVICE_REMOTE_WAKEUP,ENDPOINT_HALT
101 byte bDscIndex; //For Configuration and String DSC Only
102 byte bDscType; //Device,Configuration,String
103 word wLangID; //Language ID
111 BYTE bDevADR; //Device Address 0-127
112 byte bDevADRH; //Must equal zero
122 byte bCfgValue; //Configuration Value 0-255
123 byte bCfgRSD; //Must equal zero (Reserved)
133 byte bAltID; //Alternate Setting Value 0-255
134 byte bAltID_H; //Must equal zero
135 byte bIntfID; //Interface Number Value 0-255
136 byte bIntfID_H; //Must equal zero
146 byte bEPID; //Endpoint ID (Number & Direction)
147 byte bEPID_H; //Must equal zero
157 unsigned EPNum:4; //Endpoint Number 0-15
159 unsigned EPDir:1; //Endpoint Direction: 0-OUT, 1-IN
164 /** End: Standard Device Requests ****************************************/
168 /******************************************************************************
171 * Buffer size has to equal the EP0_BUFF_SIZE value specified
172 * in autofiles\usbcfg.h
173 * The value of EP0_BUFF_SIZE can be 8, 16, 32, or 64.
175 * First 8 bytes are defined to be directly addressable to improve speed
176 * and reduce code size.
177 * Bytes beyond the 8th byte have to be accessed using indirect addressing.
178 *****************************************************************************/
179 typedef union _CTRL_TRF_DATA
181 /** Array for indirect addressing ****************************************/
184 byte _byte[EP0_BUFF_SIZE];
187 /** First 8-byte direct addressing ***************************************/
209 #endif //USBDEFS_EP0_BUFF_H