X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=usrp2%2Ffirmware%2Flib%2Fdb_wbxng.h;fp=usrp2%2Ffirmware%2Flib%2Fdb_wbxng.h;h=3756e6c241d43e46137cb1301242e134a4bee1bc;hb=8a9ddbb0675f9bfcc6e03b457fba6c79474a3693;hp=0000000000000000000000000000000000000000;hpb=82d471b9b4a8b389b5da44b19c69c36420828382;p=debian%2Fgnuradio diff --git a/usrp2/firmware/lib/db_wbxng.h b/usrp2/firmware/lib/db_wbxng.h new file mode 100644 index 00000000..3756e6c2 --- /dev/null +++ b/usrp2/firmware/lib/db_wbxng.h @@ -0,0 +1,74 @@ +/* + * Copyright 2010 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#ifndef DB_WBXNG_H +#define DB_WBXNG_H + +#include + +// IO Pin functions +// Tx and Rx have shared defs, but different i/o regs +#define ENABLE_5 (1 << 7) // enables 5.0V power supply +#define ENABLE_33 (1 << 6) // enables 3.3V supply +//#define RX_TXN (1 << 15) // Tx only: T/R antenna switch for TX/RX port +//#define RX2_RX1N (1 << 15) // Rx only: antenna switch between RX2 and TX/RX port +#define RX_TXN ((1 << 5)|(1 << 15)) // Tx only: T/R antenna switch for TX/RX port +#define RX2_RX1N ((1 << 5)|(1 << 15)) // Rx only: antenna switch between RX2 and TX/RX port +#define RXBB_EN (1 << 4) +#define TXMOD_EN (1 << 4) +#define PLL_CE (1 << 3) +#define PLL_PDBRF (1 << 2) +#define PLL_MUXOUT (1 << 1) +#define PLL_LOCK_DETECT (1 << 0) + +// RX Attenuator constants +#define ATTN_SHIFT 8 +#define ATTN_MASK (63 << ATTN_SHIFT) + +struct db_wbxng_common { + // RFX common stuff + uint16_t adf4350_regs_int; + uint16_t adf4350_regs_frac; + uint8_t adf4350_regs_prescaler; + uint16_t adf4350_regs_mod; + uint16_t adf4350_regs_10_bit_r_counter; + uint8_t adf4350_regs_divider_select; + uint8_t adf4350_regs_8_bit_band_select_clock_divider_value; + + int freq_mult; + int spi_mask; +}; + +struct db_wbxng_dummy { + struct db_base base; + struct db_wbxng_common common; +}; + + +struct db_wbxng_rx { + struct db_base base; + struct db_wbxng_common common; +}; + +struct db_wbxng_tx { + struct db_base base; + struct db_wbxng_common common; +}; + + +#endif /* DB_WBXNG_H */