Ejemplo n.º 1
0
// SetTestMode sets device to  test mode.
//
// Test mode returns 8 bit counters instead of samples. Note,
// the counter is generated inside the device.
func (dev *Context) SetTestMode(testMode bool) (err error) {
	mode := 0 // test mode off
	if testMode {
		mode = 1 // test mode on
	}
	i := int(C.rtlsdr_set_testmode((*C.rtlsdr_dev_t)(dev),
		C.int(mode)))
	return libError(i)
}
Ejemplo n.º 2
0
// Enable test mode that returns an 8 bit counter instead of the samples.
// The counter is generated inside the RTL2832.
//
// Test mode, 1 means enabled, 0 disabled
//
// int rtlsdr_set_testmode(rtlsdr_dev_t *dev, int on);
// rtlsdr_set_testmode returns 0 on success
func (c *Context) SetTestMode(on int) (err int) {
	return int(C.rtlsdr_set_testmode((*C.rtlsdr_dev_t)(c.dev),
		C.int(on)))
}