Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit d314b17

Browse files
authored
v1.2.2 to replace double with float
### Releases v1.2.2 1. Use `float` for `DutyCycle` and `Freq`, `uint32_t` for `period`. 2. Optimize code by not calculation in ISR
1 parent db7ab7d commit d314b17

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,12 @@ typedef struct
510510
irqCallback irqCallbackStopFunc;
511511
512512
#if USING_PWM_FREQUENCY
513-
double PWM_Freq;
513+
float PWM_Freq;
514514
#else
515-
double PWM_Period;
515+
uint32_t PWM_Period;
516516
#endif
517517
518-
double PWM_DutyCycle;
518+
float PWM_DutyCycle;
519519
520520
uint64_t deltaMicrosStart;
521521
uint64_t previousMicrosStart;

examples/ISR_16_PWMs_Array_Complex/ISR_16_PWMs_Array_Complex.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ typedef struct
116116
irqCallback irqCallbackStopFunc;
117117

118118
#if USING_PWM_FREQUENCY
119-
double PWM_Freq;
119+
float PWM_Freq;
120120
#else
121-
double PWM_Period;
121+
uint32_t PWM_Period;
122122
#endif
123123

124-
double PWM_DutyCycle;
124+
float PWM_DutyCycle;
125125

126126
uint64_t deltaMicrosStart;
127127
uint64_t previousMicrosStart;

0 commit comments

Comments
 (0)