We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 068d7c1 commit fe20079Copy full SHA for fe20079
src/machine/machine_rp2_pwm.go
@@ -153,7 +153,7 @@ func (p *pwmGroup) Period() uint64 {
153
top := p.getWrap()
154
phc := p.getPhaseCorrect()
155
Int, frac := p.getClockDiv()
156
- return (16*uint64(Int) + uint64(frac)) * uint64((top+1)*(phc+1)*1e9) / (16 * freq) // cycles = (TOP+1) * (CSRPHCorrect + 1) * (DIV_INT + DIV_FRAC/16)
+ return (16*uint64(Int) + uint64(frac)) * uint64((top+1)*(phc+1)) * uint64(1e9) / (16 * freq) // cycles = (TOP+1) * (CSRPHCorrect + 1) * (DIV_INT + DIV_FRAC/16)
157
}
158
159
// SetInverting sets whether to invert the output of this channel.
0 commit comments