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.
Fork of FastPWM by
Diff: Device/FastPWM_KLXX.cpp
- Revision:
- 9:c50f688cad07
- Parent:
- 8:a7745c791b0c
diff -r a7745c791b0c -r c50f688cad07 Device/FastPWM_KLXX.cpp
--- a/Device/FastPWM_KLXX.cpp Fri Jun 27 05:48:25 2014 +0000
+++ b/Device/FastPWM_KLXX.cpp Fri Jun 27 06:02:37 2014 +0000
@@ -11,11 +11,11 @@
}
void FastPWM::period_ticks( uint32_t ticks ) {
- *(_pwm.MOD) = ticks;
+ *(_pwm.MOD) = ticks - 1;
}
uint32_t FastPWM::getPeriod( void ) {
- return *(_pwm.MOD);
+ return *(_pwm.MOD) + 1;
}
uint32_t FastPWM::setPrescaler(uint32_t reqScale) {
