00001 // Copyright (C) 2008 Ubixum, Inc. 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License, or (at your option) any later version. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00016 00021 #ifndef EPUTILS_H 00022 #define EPUTILS_H 00023 00024 #include "fx2types.h" 00025 00045 #define RESETFIFO(ep) {FIFORESET=0x80; SYNCDELAY();\ 00046 FIFORESET=ep; SYNCDELAY();\ 00047 FIFORESET=0x00; SYNCDELAY();} 00048 00051 #define RESETFIFOS() {FIFORESET=0x80; SYNCDELAY();\ 00052 FIFORESET=0x02; SYNCDELAY();\ 00053 FIFORESET=0x04; SYNCDELAY();\ 00054 FIFORESET=0x06; SYNCDELAY();\ 00055 FIFORESET=0x08; SYNCDELAY();\ 00056 FIFORESET=0x00; SYNCDELAY();} 00057 00063 void readep0( BYTE* dst, WORD len ); 00064 00065 00066 00067 #endif