Skip to content

Commit 0bcdde1

Browse files
astyle
1 parent ec449b1 commit 0bcdde1

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

cores/rp2040/wiring_private.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,28 @@ static uint32_t _irqStackTop[2] = { 0, 0 };
3636
static uint32_t _irqStack[2][maxIRQs];
3737

3838
extern "C" void interrupts() {
39-
if (__freeRTOSinitted){
39+
if (__freeRTOSinitted) {
4040
taskEXIT_CRITICAL();
4141
} else {
42-
auto core = get_core_num();
43-
if (!_irqStackTop[core]) {
44-
// ERROR
45-
return;
46-
}
47-
restore_interrupts(_irqStack[core][--_irqStackTop[core]]);
42+
auto core = get_core_num();
43+
if (!_irqStackTop[core]) {
44+
// ERROR
45+
return;
46+
}
47+
restore_interrupts(_irqStack[core][--_irqStackTop[core]]);
4848
}
4949
}
5050

5151
extern "C" void noInterrupts() {
5252
if (__freeRTOSinitted) {
5353
taskENTER_CRITICAL();
5454
} else {
55-
auto core = get_core_num();
56-
if (_irqStackTop[core] == maxIRQs) {
57-
// ERROR
58-
panic("IRQ stack overflow");
59-
}
60-
61-
_irqStack[core][_irqStackTop[core]++] = save_and_disable_interrupts();
55+
auto core = get_core_num();
56+
if (_irqStackTop[core] == maxIRQs) {
57+
// ERROR
58+
panic("IRQ stack overflow");
59+
}
60+
_irqStack[core][_irqStackTop[core]++] = save_and_disable_interrupts();
6261
}
6362
}
6463

0 commit comments

Comments
 (0)