Skip to content

Conversation

@matejsworkshop
Copy link

Hi, I made this code to support passive buzzers.

Code was tested. Everything is working properly, buzzer doesn't make any unusual sounds.

Hal::Gpio::digitalWrite(_model.config.pin[PIN_BUZZER], (pin_status_t)_model.config.buzzer.inverted);
break;
case 1:
ledc_timer_config_t ledc_timer = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't use hardware specific api here. In this case RP2350 and RP2040 build is broken. It should be hidden behind some generic HAL, or gated by specific ifdef macro, like ESPFC_ADC_0 for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants