[stm32] enable adcs again, but not working properly yet

This reverts commit cc859f9ae7.
This commit is contained in:
Felix Ruess
2012-05-17 00:49:19 +02:00
parent 46f7182fe6
commit f6cbc07ed0
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -167,10 +167,9 @@ ap.srcs += subsystems/electrical.c
ap.CFLAGS += -DUSE_DAC
ap.srcs += $(SRC_ARCH)/mcu_periph/dac_arch.c
else ifeq ($(ARCH), stm32)
#ap.CFLAGS += -DUSE_ADC
#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.CFLAGS += -DUSE_ADC
ap.CFLAGS += -DUSE_AD1 -DUSE_AD1_1 -DUSE_AD1_2 -DUSE_AD1_3 -DUSE_AD1_4
ap.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
ap.srcs += subsystems/electrical.c
endif
+1 -1
View File
@@ -40,7 +40,7 @@ void electrical_init(void) {
electrical.vsupply = 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
adc_buf_channel(ADC_CHANNEL_CURRENT, &electrical_priv.current_adc_buf, DEFAULT_AV_NB_SAMPLE);
#endif