summaryrefslogtreecommitdiffhomepage
path: root/digital
diff options
context:
space:
mode:
authorNicolas Schodet2013-04-01 18:28:47 +0200
committerNicolas Schodet2013-04-01 18:28:47 +0200
commitaaa32bad8b1cfaa6c2334e2be0d5f34450c07f53 (patch)
tree64bc9bbe193519841ba18d057fa40c70d2eaf497 /digital
parentb3392b2c9b5e808e868b092422d7b143a82c4628 (diff)
digital/io-hub/src/apbirthday: add missing ADC enable
Diffstat (limited to 'digital')
-rw-r--r--digital/io-hub/src/apbirthday/hardware.stm32.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/digital/io-hub/src/apbirthday/hardware.stm32.cc b/digital/io-hub/src/apbirthday/hardware.stm32.cc
index 9a46f91e..a573c494 100644
--- a/digital/io-hub/src/apbirthday/hardware.stm32.cc
+++ b/digital/io-hub/src/apbirthday/hardware.stm32.cc
@@ -94,6 +94,7 @@ Hardware::Hardware ()
gpio_mode_setup (GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE,
GPIO0 | GPIO1 | GPIO2 | GPIO3);
gpio_mode_setup (GPIOB, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO5);
+ adc.enable ();
// Cycle timer, 4 ms period.
rcc_peripheral_enable_clock (&RCC_APB1ENR, RCC_APB1ENR_TIM3EN);
TIM3_PSC = 2 * rcc_ppre1_frequency / 1000000 - 1; // 1 ┬Ás prescaler