Skip to content

Commit

Permalink
PWM Cluster: Make GCC 13.x happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Sep 27, 2024
1 parent 74cf9b7 commit eb6e67a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/pwm/pwm_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/pwm/pwm_cluster.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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<uint8_t> pins, bool loading_zone = DEFAULT_USE_LOADING_ZONE);
Expand Down

0 comments on commit eb6e67a

Please sign in to comment.