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:
SalimTerryLi
2020-02-21 06:52:45 -08:00
committed by GitHub
co-authored by David Sidrane
parent e0d6f94318
commit 77a9135036
12 changed files with 54 additions and 1 deletions
+7 -1
View File
@@ -82,6 +82,13 @@ void px4_arch_adc_uninit(uint32_t base_address);
*/
uint32_t px4_arch_adc_sample(uint32_t base_address, unsigned channel);
/**
* Get the ADC positive reference voltage
* N.B This assume that all ADC channels share the same vref.
* @return v_ref
*/
float px4_arch_adc_reference_v(void);
/**
* Get the temperature sensor channel bitmask
*/
@@ -93,4 +100,3 @@ uint32_t px4_arch_adc_temp_sensor_mask(void);
uint32_t px4_arch_adc_dn_fullcount(void);
__END_DECLS