Fix Buzzer (pin) init for uninitialized FastIO (#19559)
This commit is contained in:
parent
059d966d7b
commit
46c8775542
|
@ -1048,6 +1048,11 @@ void setup() {
|
||||||
SERIAL_ECHO_MSG("Compiled: " __DATE__);
|
SERIAL_ECHO_MSG("Compiled: " __DATE__);
|
||||||
SERIAL_ECHO_MSG(STR_FREE_MEMORY, freeMemory(), STR_PLANNER_BUFFER_BYTES, (int)sizeof(block_t) * (BLOCK_BUFFER_SIZE));
|
SERIAL_ECHO_MSG(STR_FREE_MEMORY, freeMemory(), STR_PLANNER_BUFFER_BYTES, (int)sizeof(block_t) * (BLOCK_BUFFER_SIZE));
|
||||||
|
|
||||||
|
// Init buzzer pin(s)
|
||||||
|
#if USE_BEEPER
|
||||||
|
SETUP_RUN(buzzer.init());
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set up LEDs early
|
// Set up LEDs early
|
||||||
#if HAS_COLOR_LEDS
|
#if HAS_COLOR_LEDS
|
||||||
SETUP_RUN(leds.setup());
|
SETUP_RUN(leds.setup());
|
||||||
|
|
|
@ -84,9 +84,9 @@
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Class constructor
|
* @brief Init Buzzer
|
||||||
*/
|
*/
|
||||||
Buzzer() {
|
static inline void init() {
|
||||||
SET_OUTPUT(BEEPER_PIN);
|
SET_OUTPUT(BEEPER_PIN);
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue