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
Diff: DAC_MCP4922.cpp
- Revision:
- 8:f933fcd30408
- Parent:
- 2:2a3b4ed3eb58
- Child:
- 11:a764fe59d343
diff -r 6a9c1633dd90 -r f933fcd30408 DAC_MCP4922.cpp
--- a/DAC_MCP4922.cpp Tue Nov 11 10:04:00 2014 +0000
+++ b/DAC_MCP4922.cpp Wed Nov 12 08:56:31 2014 +0000
@@ -1,7 +1,7 @@
//------------------------------------------------------
// Class for single DAC in MCP4922
//
-// 2014/09/29, Copyright (c) 2014 MIKAMI, Naoki
+// 2014/11/12, Copyright (c) 2014 MIKAMI, Naoki
//------------------------------------------------------
#include "DAC_MCP4922.hpp"
@@ -55,4 +55,15 @@
ss_->SlaveSelect();
mySpi_->DR = value | wcr_;
}
+
+ void DAC_MCP4922::ScfClockTim3(uint32_t clock)
+ {
+ PwmOut clockSCF_(D9);
+
+ TIM3->ARR = SystemCoreClock/clock - 1;
+ TIM3->PSC = 0;
+ // Set capture/compare register 2
+ TIM3->CCR2 = (TIM3->ARR + 1)/2;
+ }
}
+