From 3b895ead4b015f10278cdaec051488984647fe9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 29 Mar 2019 08:37:40 +0000 Subject: [PATCH] set afe1 gain --- src/main.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main.rs b/src/main.rs index 27a2d56..31432e0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -276,6 +276,20 @@ fn gpio_setup(gpioa: &stm32::GPIOA, gpiob: &stm32::GPIOB, gpiod: &stm32::GPIOD, gpioe.otyper.modify(|_, w| w.ot12().push_pull()); gpioe.odr.modify(|_, w| w.odr12().set_bit()); + // AFE1_A0,1: PD14,PD15 + gpiod.otyper.modify(|_, w| + w.ot14().push_pull() + .ot15().push_pull() + ); + gpiod.moder.modify(|_, w| + w.moder14().output() + .moder15().output() + ); + gpiod.odr.modify(|_, w| + w.odr14().clear_bit() + .odr15().clear_bit() + ); + // ADC1 // SCK: PF6 gpiof.moder.modify(|_, w| w.moder7().alternate());