mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
ports: Make PWM duty_u16 have an upper value of 65535 across all ports.
The following ports used 65536 as the upper value (100% duty cycle) and are changed in this commit to use 65535: esp8266, mimxrt, nrf, samd. Tested that output is high at `duty_u16(65535)` and low at `duty_u16(0)`. Also verified that at `duty_u16(32768)` the high and low pulse have the same length. Partially reverts #10850, commits9c7ad68165and2ac643c15b. Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
@@ -54,7 +54,7 @@ typedef struct _machine_pwm_obj_t {
|
||||
#define PWM_CLK_READY (1)
|
||||
#define PWM_TCC_ENABLED (2)
|
||||
#define PWM_MASTER_CLK (get_peripheral_freq())
|
||||
#define PWM_FULL_SCALE (65536)
|
||||
#define PWM_FULL_SCALE (65535)
|
||||
#define PWM_UPDATE_TIMEOUT (2000)
|
||||
|
||||
#define VALUE_NOT_SET (-1)
|
||||
|
||||
Reference in New Issue
Block a user