diff --git a/drivers/pwm/pwm_cluster.cpp b/drivers/pwm/pwm_cluster.cpp index 3c600619..8cf3e19f 100644 --- a/drivers/pwm/pwm_cluster.cpp +++ b/drivers/pwm/pwm_cluster.cpp @@ -25,10 +25,10 @@ uint8_t PWMCluster::claimed_sms[] = { 0x0, 0x0 }; uint PWMCluster::pio_program_offset = 0; -PWMCluster::PWMCluster(PIO pio, uint sm, uint pin_mask, bool loading_zone) +PWMCluster::PWMCluster(PIO pio, uint sm, uint64_t pin_mask, bool loading_zone) : pio(pio) , sm(sm) -, pin_mask(pin_mask & ((1u << NUM_BANK0_GPIOS) - 1)) +, pin_mask(pin_mask & ((1llu << NUM_BANK0_GPIOS) - 1)) , channel_count(0) , wrap_level(0) , loading_zone(loading_zone) { diff --git a/drivers/pwm/pwm_cluster.hpp b/drivers/pwm/pwm_cluster.hpp index e233551a..224f974c 100644 --- a/drivers/pwm/pwm_cluster.hpp +++ b/drivers/pwm/pwm_cluster.hpp @@ -103,7 +103,7 @@ namespace pimoroni { PIO pio; uint sm; int dma_channel; - uint pin_mask; + uint64_t pin_mask; uint8_t channel_count; ChannelState channels[NUM_BANK0_GPIOS]; uint8_t channel_to_pin_map[NUM_BANK0_GPIOS]; @@ -135,7 +135,7 @@ namespace pimoroni { // Constructors/Destructor //-------------------------------------------------- public: - PWMCluster(PIO pio, uint sm, uint pin_mask, bool loading_zone = DEFAULT_USE_LOADING_ZONE); + PWMCluster(PIO pio, uint sm, uint64_t pin_mask, bool loading_zone = DEFAULT_USE_LOADING_ZONE); PWMCluster(PIO pio, uint sm, uint pin_base, uint pin_count, bool loading_zone = DEFAULT_USE_LOADING_ZONE); PWMCluster(PIO pio, uint sm, const uint8_t *pins, uint32_t length, bool loading_zone = DEFAULT_USE_LOADING_ZONE); PWMCluster(PIO pio, uint sm, std::initializer_list pins, bool loading_zone = DEFAULT_USE_LOADING_ZONE);