version 4.2.0
[fx2fw-sdcc] / fx2 / usb_common.h
index b34e4b8..4e86af6 100644 (file)
 /* -*- c++ -*- */\r
-\r
 /*-----------------------------------------------------------------------------\r
-\r
  * Common USB code for FX2\r
-\r
  *-----------------------------------------------------------------------------\r
-\r
  * Code taken from USRP2 firmware (GNU Radio Project), version 3.0.2,\r
-\r
  * Copyright 2003 Free Software Foundation, Inc.\r
-\r
  *-----------------------------------------------------------------------------\r
-\r
  * This code is part of usbjtag. usbjtag is free software; you can redistribute\r
-\r
  * it and/or modify it under the terms of the GNU General Public License as\r
-\r
  * published by the Free Software Foundation; either version 2 of the License,\r
-\r
  * or (at your option) any later version. usbjtag is distributed in the hope\r
-\r
  * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\r
-\r
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-\r
  * GNU General Public License for more details.  You should have received a\r
-\r
  * copy of the GNU General Public License along with this program in the file\r
-\r
  * COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin\r
-\r
  * St, Fifth Floor, Boston, MA  02110-1301  USA\r
-\r
  *-----------------------------------------------------------------------------\r
-\r
  */\r
 \r
-\r
-\r
 #ifndef _USB_COMMON_H_\r
-\r
 #define _USB_COMMON_H_\r
 \r
-\r
-\r
 #define        bRequestType    SETUPDAT[0]\r
-\r
 #define        bRequest        SETUPDAT[1]\r
-\r
 #define        wValueL         SETUPDAT[2]\r
-\r
 #define        wValueH         SETUPDAT[3]\r
-\r
 #define        wIndexL         SETUPDAT[4]\r
-\r
 #define        wIndexH         SETUPDAT[5]\r
-\r
 #define        wLengthL        SETUPDAT[6]\r
-\r
 #define        wLengthH        SETUPDAT[7]\r
 \r
-\r
-\r
 #define MSB(x) (((unsigned short) x) >> 8)\r
-\r
 #define LSB(x) (((unsigned short) x) & 0xff)\r
 \r
-\r
-\r
 extern volatile bit _usb_got_SUDAV;\r
 \r
-\r
-\r
 // Provided by user application to report device status.\r
-\r
 // returns non-zero if it handled the command.\r
-\r
 unsigned char app_get_status (void);\r
-\r
 // Provided by user application to handle VENDOR commands.\r
-\r
 // returns non-zero if it handled the command.\r
-\r
 unsigned char app_vendor_cmd (void);\r
 \r
-\r
-\r
 void usb_install_handlers (void);\r
-\r
 void usb_handle_setup_packet (void);\r
 \r
-\r
-\r
 #define usb_setup_packet_avail()       _usb_got_SUDAV\r
 \r
-\r
-\r
 #endif /* _USB_COMMON_H_ */\r
-\r