Unify buzz methods as MarlinUI::buzz (#14803)

This commit is contained in:
Ludy
2019-08-20 09:01:37 +02:00
committed by Scott Lahteine
parent 29c12905f5
commit 05995d1fd6
12 changed files with 83 additions and 72 deletions

View File

@ -137,13 +137,15 @@ void pca9632_set_led_color(const LEDColor &color) {
}
#if ENABLED(PCA9632_BUZZER)
void pca9632_buzz(uint16_t const f, uint16_t d) {
UNUSED(f); UNUSED(d);
void pca9632_buzz(const long duration, const uint16_t freq) {
UNUSED(duration); UNUSED(freq);
uint8_t data[] = PCA9632_BUZZER_DATA;
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
Wire.write(data, sizeof(data));
Wire.endTransmission();
}
#endif
#endif // PCA9632_BUZZER
#endif // PCA9632

View File

@ -32,5 +32,6 @@ typedef LEDColor LEDColor;
void pca9632_set_led_color(const LEDColor &color);
#if ENABLED(PCA9632_BUZZER)
void pca9632_buzz(uint16_t const, uint16_t);
#include <stdint.h>
void pca9632_buzz(const long, const uint16_t);
#endif