Skip to content

Commit a7ffd7b

Browse files
committed
Fix compiler warning: comparison between pointer and integer
Fix #44 cores/arduino/WInterrupts.c:30:12: warning: comparison between pointer and integer if (port == NC) Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 2e3c60b commit a7ffd7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/WInterrupts.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void attachInterrupt(uint32_t pin, void (*callback)(void), uint32_t mode)
2727
uint32_t it_mode;
2828
PinName p = digitalPinToPinName(pin);
2929
GPIO_TypeDef* port = set_GPIO_Port_Clock(STM_PORT(p));
30-
if (port == NC)
30+
if (!port)
3131
return;
3232

3333
switch(mode) {
@@ -53,7 +53,7 @@ void detachInterrupt(uint32_t pin)
5353
{
5454
PinName p = digitalPinToPinName(pin);
5555
GPIO_TypeDef* port = get_GPIO_Port(STM_PORT(p));
56-
if (port == NC)
56+
if (!port)
5757
return;
5858
stm32_interrupt_disable(port, STM_GPIO_PIN(p));
5959
}

0 commit comments

Comments
 (0)