2 * USRP - Universal Software Radio Peripheral
4 * Copyright (C) 2003,2004 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 #ifndef INCLUDED_FPGA_REV1_H
22 #define INCLUDED_FPGA_REV1_H
24 void fpga_set_reset (unsigned char v);
25 void fpga_set_tx_enable (unsigned char v);
26 void fpga_set_rx_enable (unsigned char v);
27 void fpga_set_tx_reset (unsigned char v);
28 void fpga_set_rx_reset (unsigned char v);
30 unsigned char fpga_has_room_for_packet (void);
31 unsigned char fpga_has_packet_avail (void);
33 #if (UC_BOARD_HAS_FPGA)
35 * return TRUE iff FPGA internal fifo has room for 512 bytes.
37 #define fpga_has_room_for_packet() (GPIFREADYSTAT & bmFPGA_HAS_SPACE)
40 * return TRUE iff FPGA internal fifo has at least 512 bytes available.
42 #define fpga_has_packet_avail() (GPIFREADYSTAT & bmFPGA_PKT_AVAIL)
44 #else /* no FPGA on board. fake it. */
46 #define fpga_has_room_for_packet() TRUE
47 #define fpga_has_packet_avail() TRUE
51 #define fpga_clear_flags() \
53 USRP_PE |= bmPE_FPGA_CLR_STATUS; \
54 USRP_PE &= ~bmPE_FPGA_CLR_STATUS; \
58 #endif /* INCLUDED_FPGA_REV1_H */