From 7279c66287e6a3be238052687ad3a0e3318a9c01 Mon Sep 17 00:00:00 2001 From: Peter Jakobs Date: Sun, 1 Jan 2023 12:13:20 +0100 Subject: [PATCH] more documentation --- Sming/Arch/Esp32/Core/HardwarePWM.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sming/Arch/Esp32/Core/HardwarePWM.cpp b/Sming/Arch/Esp32/Core/HardwarePWM.cpp index e40c5c6be3..c09fd67fb9 100644 --- a/Sming/Arch/Esp32/Core/HardwarePWM.cpp +++ b/Sming/Arch/Esp32/Core/HardwarePWM.cpp @@ -33,6 +33,7 @@ * | | | h_timer 1 | --> | | | | | l_timer 1 | --> | | | | * | | +-----------+ | | +--------+ | | +-----------+ | | +--------+ | | * | | | | --> | h_ch 3 | | | | | --> | l_ch 3 | | | + * | | | | +--------+ | | | | +--------+ | | * | | | MUX | | | | MUX | | | * | | | | +--------+ | | | | +--------+ | | * | | | | --> | h_ch 4 | | | | | --> | l_ch 4 | | | @@ -108,6 +109,9 @@ * functions are basically per pin, this needs to be an extension of the overal model, exposing at least timers. * This, too, will require a compatible "basic" interface and an advanced interface that allows assiging pins (channels) * to timers and the configuration of the timers themselves. + * The esp_idf does not provide a way to read the bit width configured for a channel, but I think it'll be useful to be able + * to read back this value, not least to find the value for getMaxDuty() for a channel. It will either have to be stored in the + * module or maybe read from the hardware directly (LEDC_[HL]STIMERx_CONF_REG & 0x1f) * * hardware technical reference: * =============================