Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UIT2_MovingAverage UIT2_AllpassReverb UIT2_CombReverb UIT2_FIR_LPF_Symmetry ... more
Revision 4:6e228f373c6f, committed 2014-11-09
- 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
}