mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 21:53:33 +08:00
ADC driver report back vref alone with sample count (#14136)
* Introduce "px4_arch_adc_reference_v" * Revert "Introduce "px4_arch_adc_reference_v"" This reverts commit 93691fbbd55a1b8da8c190e225b318067d90399b. * use structure to return sample count and vref at the same time * Revert "use structure to return sample count and vref at the same time" This reverts commit 9cfd1c173cda51495f766a3f678c2202d67725fd. * Revert "Revert "Introduce "px4_arch_adc_reference_v""" This reverts commit edb7f7603e4471163ffb0fc6fc62ad2e30336e91. * fix missed reference * remove unecessary channel specific vref * Update src/drivers/drv_adc.h Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com> * Update src/drivers/drv_adc.h Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com> * Introduce BOARD_ADC_POS_REF_V Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
This commit is contained in:
co-authored by
David Sidrane
parent
e0d6f94318
commit
77a9135036
@@ -147,6 +147,10 @@
|
||||
#define ADC_3V3_SCALE (2.0f) // The scale factor defined by HW's resistive divider (Rt+Rb)/ Rb
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_ADC_POS_REF_V
|
||||
#define BOARD_ADC_POS_REF_V (3.3f) // Default reference voltage for every channels
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_ADC_POS_REF_V_FOR_CURRENT_CHAN
|
||||
#define BOARD_ADC_POS_REF_V_FOR_CURRENT_CHAN (3.3f) // Reference voltage for reading out the current channel
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user