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 00025 #ifndef GPIF_H 00026 #define GPIF_H 00027 00028 #include "fx2types.h" 00029 00030 #define GPIFDONE (GPIFTRIG&0x80) 00031 00032 00047 void gpif_init( BYTE* waveform, BYTE* initdata ); 00048 00058 void gpif_setflowstate( BYTE* flowstates, BYTE bank); 00059 00060 00061 00063 #define GPIFTRGWR 0 00064 #define GPIFTRGRD 4 00065 typedef enum { 00066 GPIF_EP2 = 0, 00067 GPIF_EP4 = 1, 00068 GPIF_EP6 = 2, 00069 GPIF_EP8 = 3 00070 } GPIF_EP_NUM; 00071 00076 void gpif_set_tc(DWORD tc); 00077 00086 void gpif_single_read16( WORD* res , WORD len); 00087 00095 void gpif_single_write16( WORD* data, WORD len); 00096 00097 void gpif_fifo_read ( GPIF_EP_NUM ep_num ); 00098 00099 void gpif_fifo_write( GPIF_EP_NUM ep_num ); 00100 00101 #endif