From 448206b2d2a932d583c502a0ba0f55fd9ab1800b Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Sat, 13 Apr 2013 23:12:22 +0200 Subject: hackrf: implement full control for RF/IF/BB gain stages the following named gain stages are available: RF: MGA-81563, switchable 0 or 14dB IF: MAX2837 LNA, 0 to 40dB in 8dB steps BB: MAX2837 VGA, 0 to 62dB in 2dB steps --- include/osmosdr/osmosdr_source_c.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmosdr/osmosdr_source_c.h b/include/osmosdr/osmosdr_source_c.h index 453f592..dd4505c 100644 --- a/include/osmosdr/osmosdr_source_c.h +++ b/include/osmosdr/osmosdr_source_c.h @@ -207,6 +207,16 @@ public: */ virtual double set_if_gain( double gain, size_t chan = 0 ) = 0; + /*! + * Set the BB gain for the underlying radio hardware. + * This function will automatically distribute the desired gain value over + * available BB gain stages in an appropriate way and return the actual value. + * \param gain the gain in dB + * \param chan the channel index 0 to N-1 + * \return the actual gain in dB + */ + virtual double set_bb_gain( double gain, size_t chan = 0 ) = 0; + /*! * Get the available antennas of the underlying radio hardware. * \param chan the channel index 0 to N-1 @@ -226,7 +236,7 @@ public: /*! * Get the actual underlying radio hardware antenna setting. * \param chan the channel index 0 to N-1 - * \return antenna the actual antenna's name + * \return the actual antenna's name */ virtual std::string get_antenna( size_t chan = 0 ) = 0; -- cgit v1.2.3