@@ -119,7 +119,7 @@ void detachInterrupt(pin_size_t pinNumber) {
119
119
/* -------------------------------------------------------------------------- */
120
120
121
121
CIrq *irq_context = nullptr ;
122
- int ch = pin2IrqChannel (pinNumber);
122
+ const int ch = pin2IrqChannel (pinNumber);
123
123
124
124
if (ch >= 0 && ch < MAX_IRQ_CHANNEL) {
125
125
irq_context = IrqChannel.get (ch,false );
@@ -138,7 +138,7 @@ void attachInterruptParam(pin_size_t pinNumber, voidFuncPtrParam func, PinStatus
138
138
/* -------------------------------------------------------------------------- */
139
139
140
140
CIrq *irq_context = nullptr ;
141
- int ch = pin2IrqChannel (pinNumber);
141
+ const int ch = pin2IrqChannel (pinNumber);
142
142
143
143
if (ch >= 0 && ch < MAX_IRQ_CHANNEL) {
144
144
irq_context = IrqChannel.get (ch,true );
@@ -195,7 +195,7 @@ void attachInterrupt(pin_size_t pinNumber, voidFuncPtr func, PinStatus mode) {
195
195
196
196
int attachIrq2Link (uint32_t pinNumber, PinStatus mode) {
197
197
CIrq *irq_context = nullptr ;
198
- int ch = pin2IrqChannel (pinNumber);
198
+ const int ch = pin2IrqChannel (pinNumber);
199
199
200
200
if (ch >= 0 && ch < MAX_IRQ_CHANNEL) {
201
201
irq_context = IrqChannel.get (ch,true );
@@ -249,7 +249,7 @@ int detachIrq2Link(pin_size_t pinNumber) {
249
249
/* -------------------------------------------------------------------------- */
250
250
251
251
CIrq *irq_context = nullptr ;
252
- int ch = pin2IrqChannel (pinNumber);
252
+ const int ch = pin2IrqChannel (pinNumber);
253
253
254
254
if (ch >= 0 && ch < MAX_IRQ_CHANNEL) {
255
255
irq_context = IrqChannel.get (ch,false );
0 commit comments