pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Error in the hardward/pwm.h

Open DarkElvenAngel opened this issue 1 year ago • 1 comments

There's an error in the SDK 2.0.0 version

https://github.com/raspberrypi/pico-sdk/blob/efe2103f9b28458a1615ff096054479743ade236/src/rp2_common/hardware_pwm/include/hardware/pwm.h#L658

There needs to be a , "" added

/tmp/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h: In function 'pwm_set_irq_mask_enabled':
/tmp/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h:658:55: error: expected ',' before ')' token
     static_assert(PWM_IRQ_WRAP_1 == PWM_IRQ_WRAP_0 + 1);
                                                       ^
                                                       ,

I solved this by changing the line to

   static_assert(PWM_IRQ_WRAP_1 == PWM_IRQ_WRAP_0 + 1, "");

This only happen when using the RP2350

DarkElvenAngel avatar Oct 05 '24 23:10 DarkElvenAngel

This seems to be a duplicate of #1788 ? (which was fixed on the develop branch by https://github.com/raspberrypi/pico-sdk/commit/424e21ec0793219e5b24f1566f3cbcf4263f5919 )

lurch avatar Oct 06 '24 17:10 lurch

duplicate

kilograham avatar Nov 11 '24 18:11 kilograham