2 * USRP - Universal Software Radio Peripheral
4 * Copyright (C) 2003 Free Software Foundation, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
21 #include "usrp_common.h"
23 // These are the tables generated by the Cypress GPIF Designer
25 extern const char WaveData[128];
26 extern const char FlowStates[36];
27 extern const char InitData[7];
29 // The tool is kind of screwed up, in that it doesn't configure some
30 // of the ports correctly. We just use their tables and handle the
31 // initialization ourselves. They also declare that their static
32 // initialized data is in xdata, which screws us too.
37 // we've already setup IFCONFIG before calling this...
39 GPIFABORT = 0xFF; // abort any waveforms pending
42 GPIFREADYCFG = InitData[ 0 ];
43 GPIFCTLCFG = InitData[ 1 ];
44 GPIFIDLECS = InitData[ 2 ];
45 GPIFIDLECTL = InitData[ 3 ];
46 // Hmmm, what's InitData[ 4 ] ...
47 GPIFWFSELECT = InitData[ 5 ];
48 // GPIFREADYSTAT = InitData[ 6 ]; // I think this register is read only...
53 for (i = 0; i < 128; i++){
54 GPIF_WAVE_DATA[i] = WaveData[i];
58 FLOWSTATE = 0; /* ensure it's off */