GNU Radio 3.3.0 C++ API
|
00001 /* 00002 * Copyright 2010 Free Software Foundation, Inc. 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 * 00017 */ 00018 00019 #ifndef DB_WBXNG_H 00020 #define DB_WBXNG_H 00021 00022 #include <db_base.h> 00023 00024 // IO Pin functions 00025 // Tx and Rx have shared defs, but different i/o regs 00026 #define ENABLE_5 (1 << 7) // enables 5.0V power supply 00027 #define ENABLE_33 (1 << 6) // enables 3.3V supply 00028 //#define RX_TXN (1 << 15) // Tx only: T/R antenna switch for TX/RX port 00029 //#define RX2_RX1N (1 << 15) // Rx only: antenna switch between RX2 and TX/RX port 00030 #define RX_TXN ((1 << 5)|(1 << 15)) // Tx only: T/R antenna switch for TX/RX port 00031 #define RX2_RX1N ((1 << 5)|(1 << 15)) // Rx only: antenna switch between RX2 and TX/RX port 00032 #define RXBB_EN (1 << 4) 00033 #define TXMOD_EN (1 << 4) 00034 #define PLL_CE (1 << 3) 00035 #define PLL_PDBRF (1 << 2) 00036 #define PLL_MUXOUT (1 << 1) 00037 #define PLL_LOCK_DETECT (1 << 0) 00038 00039 // RX Attenuator constants 00040 #define ATTN_SHIFT 8 00041 #define ATTN_MASK (63 << ATTN_SHIFT) 00042 00043 struct db_wbxng_common { 00044 // RFX common stuff 00045 uint16_t adf4350_regs_int; 00046 uint16_t adf4350_regs_frac; 00047 uint8_t adf4350_regs_prescaler; 00048 uint16_t adf4350_regs_mod; 00049 uint16_t adf4350_regs_10_bit_r_counter; 00050 uint8_t adf4350_regs_divider_select; 00051 uint8_t adf4350_regs_8_bit_band_select_clock_divider_value; 00052 00053 int freq_mult; 00054 int spi_mask; 00055 }; 00056 00057 struct db_wbxng_dummy { 00058 struct db_base base; 00059 struct db_wbxng_common common; 00060 }; 00061 00062 00063 struct db_wbxng_rx { 00064 struct db_base base; 00065 struct db_wbxng_common common; 00066 }; 00067 00068 struct db_wbxng_tx { 00069 struct db_base base; 00070 struct db_wbxng_common common; 00071 }; 00072 00073 00074 #endif /* DB_WBXNG_H */