示例#1
0
// Enable or disable the direct sampling mode. When enabled, the IF mode
// of the RTL2832 is activated, and rtlsdr_set_center_freq() will control
// the IF-frequency of the DDC, which can be used to tune from 0 to 28.8 MHz
// (xtal frequency of the RTL2832).
//
// Sampling modes, 0: disabled, 1: I-ADC input enabled, 2: Q-ADC input enabled
//
// int rtlsdr_set_direct_sampling(rtlsdr_dev_t *dev, int on);
// rtlsdr_set_direct_sampling returns 0 on success
func (c *Context) SetDirectSampling(on int) (err int) {
	return int(C.rtlsdr_set_direct_sampling((*C.rtlsdr_dev_t)(c.dev),
		C.int(on)))
}
示例#2
0
文件: rtlsdr.go 项目: cyoung/gortlsdr
// SetDirectSampling sets the direct sampling mode.
//
// When enabled, the IF mode of the device is activated, and
// SetCenterFreq() will control the IF-frequency of the DDC, which
// can be used to tune from 0 to 28.8 MHz (xtal frequency of the device).
func (dev *Context) SetDirectSampling(mode SamplingMode) (err error) {
	i := int(C.rtlsdr_set_direct_sampling((*C.rtlsdr_dev_t)(dev),
		C.int(mode)))
	return libError(i)
}