不韋 呂 / UIT_ADDA

Dependents:   UIT2_MovingAverage UIT2_AllpassReverb UIT2_CombReverb UIT2_FIR_LPF_Symmetry ... more

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Sun Nov 09 12:15:44 2014 +0000
Parent:
3:77bc5550dc10
Child:
5:651809e96a2d
Commit message:
5

Changed in this revision

ADC_Base.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/ADC_Base.cpp	Thu Oct 23 00:06:55 2014 +0000
+++ b/ADC_Base.cpp	Sun Nov 09 12:15:44 2014 +0000
@@ -3,7 +3,7 @@
 //      To get bit definition for register in
 //      peripheral, see "stm32f401xe.h"
 //
-// 2014/10/04, Copyright (c) 2014 MIKAMI, Naoki
+// 2014/11/09, Copyright (c) 2014 MIKAMI, Naoki
 //------------------------------------------------------
 
 #include "ADC_Base.hpp"
@@ -32,7 +32,7 @@
         TIM_TypeDef* myTim = TIM2;
 
         myTim->CR2 = TIM_CR2_MMS_1; // Update event: as trigger out
-        myTim->ARR = ((SystemCoreClock)/frequency) - 1;  // Auto-reload
+        myTim->ARR = SystemCoreClock/frequency - 1; // Auto-reload
         myTim->PSC = 0;             // Prescaler
         myTim->CR1 = TIM_CR1_CEN;   // Enable TIM2
     }