3 * Copyright 2008,2009 Free Software Foundation, Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * Interface to daughterboard code
26 #include <usrp2_types.h>
31 /* pointers to daughterboard structures */
32 extern struct db_base *tx_dboard;
33 extern struct db_base *rx_dboard;
36 //! Intermediate tuning information
40 //! The RF frequency that corresponds to DC in the IF from the daughterboard
41 u2_fxpt_freq_t baseband_freq;
43 //! The DDC/DUC frequency used to down/up convert to/from the target frequency
44 u2_fxpt_freq_t dxc_freq;
46 //! Any differerence btwn target and actual (typically < 0.01 Hz)
47 u2_fxpt_freq_t residual_freq;
49 //! Is the complex baseband spectrum inverted
55 * \brief One-time init at powerup
57 * Sets rx_dboard, tx_dboard and initializes daughterboards.
63 * \brief Set daughterboard LO offset frequency.
65 * \param[in] db is the daughterboard instance
66 * \param[in] offset is the amount to add to tuning requests
67 * \param[out] success or failure
70 db_set_lo_offset(struct db_base *db, u2_fxpt_freq_t offset);
73 * \brief Two stage tuning. Given target_freq, tune LO and DDC/DUC
75 * \param[in] db is the daughterboard instance
76 * \param[in] target_freq is the freq to translate the complex baseband to/from.
77 * \param[out] result provides details of the resulting configuration.
81 db_tune(struct db_base *db, u2_fxpt_freq_t target_freq, struct tune_result *result);
85 * Set only the DDC frequency
88 db_set_ddc_freq(u2_fxpt_freq_t dxc_freq, u2_fxpt_freq_t *actual_dxc_freq);
91 * Set only the DUC frequency
94 db_set_duc_freq(u2_fxpt_freq_t dxc_freq, u2_fxpt_freq_t *actual_dxc_freq);
101 db_set_gain(struct db_base *db, u2_fxpt_gain_t gain);
104 #endif /* INCLUDED_DB_H */