Skip to content

Commit ce898df

Browse files
committed
Always apply astyle to examples.
1 parent dea2382 commit ce898df

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

libraries/ESP32/examples/GPIO/FunctionalInterrupt/FunctionalInterrupt.ino

+7-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class Button {
1818
Button(uint8_t reqPin) : PIN(reqPin) {
1919
pinMode(PIN, INPUT_PULLUP);
2020
// Arduino C API:
21-
attachInterruptArg(PIN, [](void* self) { static_cast<Button*>(self)->isr(); }, this, FALLING); // works on ESP32; fails on ESP8266: "ISR not in IRAM"
21+
attachInterruptArg(PIN, [](void* self) {
22+
static_cast<Button*>(self)->isr();
23+
}, this, FALLING); // works on ESP32; fails on ESP8266: "ISR not in IRAM"
2224
//attachInterruptArg(PIN, reinterpret_cast<void(*)(void*)>(&isr_static), this, FALLING); // works on ESP32; works on ESP8266
2325
// FunctionalInterrupts API:
2426
//attachInterrupt(PIN, [this]() { isr(); }, FALLING); // works on ESP32; works on ESP8266
@@ -44,7 +46,7 @@ class Button {
4446
static void IRAM_ATTR isr_static(Button* const self)
4547
#endif
4648
{
47-
self->isr();
49+
self->isr();
4850
}
4951

5052
void checkPressed() {
@@ -66,7 +68,9 @@ Button* button2;
6668

6769
void setup() {
6870
Serial.begin(115200);
69-
schedule_function([]() { Serial.println("Scheduled function"); });
71+
schedule_function([]() {
72+
Serial.println("Scheduled function");
73+
});
7074
Serial.println("FunctionalInterrupt test/example");
7175

7276
button1 = new Button(BUTTON1);

0 commit comments

Comments
 (0)