GNU Radio's HOWTO Package
usrp_common.h
Go to the documentation of this file.
1 /*
2  * USRP - Universal Software Radio Peripheral
3  *
4  * Copyright (C) 2003 Free Software Foundation, Inc.
5  *
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.
10  *
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.
15  *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * common defines and prototypes for USRP
23  *
24  * In comments below "TRM" refers to the EZ-USB FX2 Technical Reference Manual
25  */
26 
27 #ifndef _USRPCOMMON_H_
28 #define _USRPCOMMON_H_
29 
30 #include "gn3s_regs.h"
31 #include "fx2regs.h"
32 #include "syncdelay.h"
33 
34 /*
35  * From TRM page 15-105:
36  *
37  * Under certain conditions, some read and write access to the FX2
38  * registers must be separated by a "synchronization delay". The
39  * delay is necessary only under the following conditions:
40  *
41  * - between a write to any register in the 0xE600 - 0xE6FF range
42  * and a write to one of the registers listed below.
43  *
44  * - between a write to one of the registers listed below and a read
45  * from any register in the 0xE600 - 0xE6FF range.
46  *
47  * Registers which require a synchronization delay:
48  *
49  * FIFORESET FIFOPINPOLAR
50  * INPKTEND EPxBCH:L
51  * EPxFIFOPFH:L EPxAUTOINLENH:L
52  * EPxFIFOCFG EPxGPIFFLGSEL
53  * PINFLAGSAB PINFLAGSCD
54  * EPxFIFOIE EPxFIFOIRQ
55  * GPIFIE GPIFIRQ
56  * UDMACRCH:L GPIFADRH:L
57  * GPIFTRIG EPxGPIFTRIG
58  * OUTPKTEND REVCTL
59  * GPIFTCB3 GPIFTCB2
60  * GPIFTCB1 GPIFTCB0
61  */
62 
63 #define TRUE 1
64 #define FALSE 0
65 
66 
67 void init_usrp (void);
68 void init_gpif (void);
69 
70 #endif /* _USRPCOMMON_H_ */
void init_gpif(void)
void init_usrp(void)