1 /*********************************************************************
3 * Microchip USB C18 Firmware Version 1.0
5 *********************************************************************
6 * FileName: usbctrltrf.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 ********************************************************************/
39 /** I N C L U D E S **********************************************************/
42 /** D E F I N I T I O N S ****************************************************/
44 /* Control Transfer States */
49 /* USB PID: Token Types - See chapter 8 in the USB specification */
50 #define SETUP_TOKEN 0b00001101
51 #define OUT_TOKEN 0b00000001
52 #define IN_TOKEN 0b00001001
54 /* bmRequestType Definitions */
67 /** E X T E R N S ************************************************************/
68 extern byte ctrl_trf_session_owner;
74 /** P U B L I C P R O T O T Y P E S *****************************************/
75 void USBCtrlEPService(void);
76 void USBCtrlTrfTxService(void);
77 void USBCtrlTrfRxService(void);
78 void USBCtrlEPServiceComplete(void);
79 void USBPrepareForNextSetupTrf(void);