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, commits 9c7ad68165
and 2ac643c15b.

Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
robert-hh
2024-11-04 16:04:56 +01:00
committed by Damien George
parent 5dc9eda195
commit 898407defb
7 changed files with 16 additions and 16 deletions

View File

@@ -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)