summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2014-08-20 15:42:09 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2014-11-09 22:57:24 +0100
commit57e93ec2ed70c6b433d33d4951d8a20f4154c640 (patch)
tree13d99f5f438fa80b1c00d3c9ff46bf7c76620bb1
parent25f7034e1d09d3c64c8a262b385c72508d8e7795 (diff)
Implemented QE invert option.
-rw-r--r--main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 2bd2cad..5294b29 100644
--- a/main.cpp
+++ b/main.cpp
@@ -556,8 +556,11 @@ int main() {
RCC.enable(RCC.TIM2);
RCC.enable(RCC.TIM3);
+ if(!(config.flags & (1 << 1))) {
+ TIM2.CCER = 1 << 1;
+ }
+
TIM2.CCMR1 = (1 << 8) | (1 << 0);
- TIM2.CCER = 1 << 1;
TIM2.SMCR = 3;
TIM2.CR1 = 1;
@@ -567,8 +570,11 @@ int main() {
TIM2.ARR = 256 - 1;
}
+ if(!(config.flags & (1 << 2))) {
+ TIM3.CCER = 1 << 1;
+ }
+
TIM3.CCMR1 = (1 << 8) | (1 << 0);
- TIM3.CCER = 1 << 1;
TIM3.SMCR = 3;
TIM3.CR1 = 1;