version 4.2.0
[fx2fw-sdcc] / fx2 / fx2utils.c
index b6797cc..d5d88fb 100644 (file)
 /* -*- c++ -*- */\r
-\r
 /*-----------------------------------------------------------------------------\r
-\r
  * FX2 specific subroutines\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
 #include "fx2utils.h"\r
-\r
 #include "fx2regs.h"\r
-\r
 #include "delay.h"\r
 \r
-\r
-\r
 void\r
-\r
 fx2_stall_ep0 (void)\r
-\r
 {\r
-\r
   EP0CS |= bmEPSTALL;\r
-\r
 }\r
 \r
-\r
-\r
 void\r
-\r
 fx2_reset_data_toggle (unsigned char ep)\r
-\r
 {\r
-\r
   TOGCTL = ((ep & 0x80) >> 3 | (ep & 0x0f));\r
-\r
   TOGCTL |= bmRESETTOGGLE;\r
-\r
 }\r
 \r
-\r
-\r
 void\r
-\r
 fx2_renumerate (void)\r
-\r
 {\r
-\r
   USBCS |= bmDISCON | bmRENUM;\r
 \r
-\r
-\r
   // mdelay (1500);            // FIXME why 1.5 seconds?\r
-\r
   mdelay (250);                        // FIXME why 1.5 seconds?\r
-\r
   \r
-\r
   USBIRQ = 0xff;               // clear any pending USB irqs...\r
-\r
   EPIRQ =  0xff;               //   they're from before the renumeration\r
 \r
-\r
-\r
   EXIF &= ~bmEXIF_USBINT;\r
 \r
-\r
-\r
   USBCS &= ~bmDISCON;          // reconnect USB\r
-\r
 }\r
-\r