Skip to content

Commit 013e818

Browse files
committed
change to return type to bool
1 parent f22cf0d commit 013e818

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h

+8-5
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,17 @@ class ArduinoLEDMatrix
169169
void off(size_t pin) {
170170
turnLed(pin, false);
171171
}
172-
void begin() {
172+
bool begin() {
173+
bool rv = true;
173174
uint8_t type;
174175
uint8_t ch = FspTimer::get_available_timer(type);
175176
// TODO: avoid passing "this" argument to remove autoscroll
176-
_ledTimer.begin(TIMER_MODE_PERIODIC, type, ch, 10000.0, 50.0, turnOnLedISR, this);
177-
_ledTimer.setup_overflow_irq();
178-
_ledTimer.open();
179-
_ledTimer.start();
177+
rv &= _ledTimer.begin(TIMER_MODE_PERIODIC, type, ch, 10000.0, 50.0, turnOnLedISR, this);
178+
rv &= _ledTimer.setup_overflow_irq();
179+
rv &= _ledTimer.open();
180+
rv &= _ledTimer.start();
181+
182+
return rv;
180183
}
181184
void next() {
182185
uint32_t frame[3];

0 commit comments

Comments
 (0)