Add hackrf_debug option to read ADC

Co-authored-by: Martin Ling <martin-git@earth.li>
This commit is contained in:
Michael Ossmann
2025-11-25 20:08:20 -05:00
parent 692da36d76
commit 29be31bf71
12 changed files with 233 additions and 22 deletions

View File

@@ -1354,6 +1354,20 @@ extern ADDAPI int ADDCALL hackrf_read_selftest(
hackrf_device* device,
hackrf_selftest* value);
/**
* Read a value from an ADC channel
*
* @param[in] device device to query
* @param[in] adc_channel ADC channel, e.g. 0 for ADC0_0. Add 0x80 to use an alternate pin.
* @param[out] value Value read from ADC.
* @return @ref HACKRF_SUCCESS on success or @ref hackrf_error variant
* @ingroup debug
*/
extern ADDAPI int ADDCALL hackrf_read_adc(
hackrf_device* device,
uint8_t adc_channel,
uint16_t* value);
/**
* Set transmit underrun limit
*