Fork of original FastPWM libary from Sissors.
Dependents: PM2_Libary PM2_Libary
Diff: FastPWM_common.cpp
- Revision:
- 36:1cc92cba9e04
- Parent:
- 35:d6c2b73d71f5
- Child:
- 37:0ca2cf9a1437
--- a/FastPWM_common.cpp Wed Oct 30 03:00:00 2019 +0000 +++ b/FastPWM_common.cpp Mon Jan 24 10:07:25 2022 +0000 @@ -24,6 +24,10 @@ period_ticks(seconds * dticks + 0.5); } +void FastPWM::period(float seconds) { + period( static_cast<double>(seconds) ); +} + void FastPWM::period_ms(int ms) { if (dynamicPrescaler) calcPrescaler(ms * (SystemCoreClock / 1000));