Randall Bohn
d1db782760
Move validation code to the right spot.
...
As MicroDev1 pointed out the problem is a divide by zero when calculating the duty cycle.
Maybe need to check again in `common_hal_pwmio_pwmout_set_frequency()`.
2021-05-03 09:16:46 -06:00
Randall Bohn
8613b9a9fe
Trim Trailing Whitespace
...
was causing pre-commit checks to fail
2021-05-03 07:41:52 -06:00
Randall Bohn
2db113f191
esp32-s2: Don't set PWMOut frequency to 0
...
FeatherS2 crashes if you set the PWMOut frequency to 0.
This change will raise `ValueError: Invalid PWM frequency` if the requested frequency is 0.
(Lifted from the atmel-samd port)
2021-05-03 07:15:39 -06:00
Dan Halbert
1512ca520b
Fix PWMOut non-error handling and never reset
2021-03-19 09:57:21 -04:00
Dan Halbert
b2d913412f
merge from upstream
2021-03-18 23:14:43 -04:00
microDev
a52eb88031
run code formatting script
2021-03-15 19:27:36 +05:30
Dan Halbert
08c5dbb003
use return values in STM PWMOut constructor, not exceptions
2021-03-11 08:52:47 -05:00
Lucian Copeland
66b8559fd4
Change submodule, rework all includes
2020-09-30 11:26:07 -04:00
Scott Shawcroft
83deea0e03
Fix copy pasta and stub build
2020-08-21 11:17:42 -07:00
Scott Shawcroft
6857f98426
Split pulseio.PWMOut into pwmio
...
This gives us better granularity when implementing new ports because
PWMOut is commonly implemented before PulseIn and PulseOut.
Fixes #3211
2020-08-18 13:08:33 -07:00