mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 06:54:49 +08:00
[stm32] enable adcs again, but not working properly yet
This reverts commit cc859f9ae7.
This commit is contained in:
@@ -167,10 +167,9 @@ ap.srcs += subsystems/electrical.c
|
|||||||
ap.CFLAGS += -DUSE_DAC
|
ap.CFLAGS += -DUSE_DAC
|
||||||
ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c
|
ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c
|
||||||
else ifeq ($(ARCH), stm32)
|
else ifeq ($(ARCH), stm32)
|
||||||
#ap.CFLAGS += -DUSE_ADC
|
ap.CFLAGS += -DUSE_ADC
|
||||||
#ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
|
ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
|
||||||
#ap.CFLAGS += -DUSE_ADC1_2_IRQ_HANDLER
|
ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
|
||||||
#ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
|
|
||||||
ap.srcs += subsystems/electrical.c
|
ap.srcs += subsystems/electrical.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void electrical_init(void) {
|
|||||||
electrical.vsupply = 0;
|
electrical.vsupply = 0;
|
||||||
electrical.current = 0;
|
electrical.current = 0;
|
||||||
|
|
||||||
//adc_buf_channel(ADC_CHANNEL_VSUPPLY, &electrical_priv.vsupply_adc_buf, DEFAULT_AV_NB_SAMPLE);
|
adc_buf_channel(ADC_CHANNEL_VSUPPLY, &electrical_priv.vsupply_adc_buf, DEFAULT_AV_NB_SAMPLE);
|
||||||
#ifdef ADC_CHANNEL_CURRENT
|
#ifdef ADC_CHANNEL_CURRENT
|
||||||
adc_buf_channel(ADC_CHANNEL_CURRENT, &electrical_priv.current_adc_buf, DEFAULT_AV_NB_SAMPLE);
|
adc_buf_channel(ADC_CHANNEL_CURRENT, &electrical_priv.current_adc_buf, DEFAULT_AV_NB_SAMPLE);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user