Main Page | Data Structures | Directories | File List | Data Fields | Globals

usbctrltrf.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  *
00003  *                Microchip USB C18 Firmware Version 1.0
00004  *
00005  *********************************************************************
00006  * FileName:        usbctrltrf.h
00007  * Dependencies:    See INCLUDES section below
00008  * Processor:       PIC18
00009  * Compiler:        C18 2.30.01+
00010  * Company:         Microchip Technology, Inc.
00011  *
00012  * Software License Agreement
00013  *
00014  * The software supplied herewith by Microchip Technology Incorporated
00015  * (the “Company”) for its PICmicro® Microcontroller is intended and
00016  * supplied to you, the Company’s customer, for use solely and
00017  * exclusively on Microchip PICmicro Microcontroller products. The
00018  * software is owned by the Company and/or its supplier, and is
00019  * protected under applicable copyright laws. All rights are reserved.
00020  * Any use in violation of the foregoing restrictions may subject the
00021  * user to criminal sanctions under applicable laws, as well as to
00022  * civil liability for the breach of the terms and conditions of this
00023  * license.
00024  *
00025  * THIS SOFTWARE IS PROVIDED IN AN “AS IS” CONDITION. NO WARRANTIES,
00026  * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
00027  * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00028  * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
00029  * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
00030  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
00031  *
00032  * Author               Date        Comment
00033  *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00034  * Rawin Rojvanit       11/19/04    Original.
00035  ********************************************************************/
00036 #ifndef USBCTRLTRF_H
00037 #define USBCTRLTRF_H
00038 
00039 /** I N C L U D E S **********************************************************/
00040 #include "system\typedefs.h"
00041 
00042 /** D E F I N I T I O N S ****************************************************/
00043 
00044 /* Control Transfer States */
00045 #define WAIT_SETUP          0
00046 #define CTRL_TRF_TX         1
00047 #define CTRL_TRF_RX         2
00048 
00049 /* USB PID: Token Types - See chapter 8 in the USB specification */
00050 #define SETUP_TOKEN         0b00001101
00051 #define OUT_TOKEN           0b00000001
00052 #define IN_TOKEN            0b00001001
00053 
00054 /* bmRequestType Definitions */
00055 #define HOST_TO_DEV         0
00056 #define DEV_TO_HOST         1
00057 
00058 #define STANDARD            0x00
00059 #define CLASS               0x01
00060 #define VENDOR              0x02
00061 
00062 #define RCPT_DEV            0
00063 #define RCPT_INTF           1
00064 #define RCPT_EP             2
00065 #define RCPT_OTH            3
00066 
00067 /** E X T E R N S ************************************************************/
00068 extern byte ctrl_trf_session_owner;
00069 
00070 extern POINTER pSrc;
00071 extern POINTER pDst;
00072 extern WORD wCount;
00073 
00074 /** P U B L I C  P R O T O T Y P E S *****************************************/
00075 void USBCtrlEPService(void);
00076 void USBCtrlTrfTxService(void);
00077 void USBCtrlTrfRxService(void);
00078 void USBCtrlEPServiceComplete(void);
00079 void USBPrepareForNextSetupTrf(void);
00080 
00081 
00082 #endif //USBCTRLTRF_H

Generated on Wed Jun 8 03:49:39 2005 for cdc by  doxygen 1.4.2