1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 19:02:35 +02:00

Fixed 16->8 PWM channels

This commit is contained in:
Stefan de Bruijn
2020-11-03 16:25:34 +01:00
parent c64d9ad1b5
commit a30f289598

View File

@@ -8,10 +8,11 @@
namespace PinUsers {
class NativePwm : public PwmDetail {
static LimitedResource<16>& PwmChannelResources() {
// The ESP32 chip has 16 PWM channels.
static LimitedResource<8>& PwmChannelResources() {
// The ESP32 chip has 16 PWM channels, but the second 8 channels share the same timers as the first 8.
// So, in essense, we use only 8 here, so we can configure them independently.
static LimitedResource<16> instances_;
static LimitedResource<8> instances_;
return instances_;
}