gpio.h: Explicit cast to enum type (needed for g++)

This commit is contained in:
Angus Gratton 2015-08-26 10:49:00 +10:00
parent fff17627d9
commit c565e2b90d

View file

@ -124,7 +124,7 @@ INLINED void gpio_set_interrupt(const uint8_t gpio_num, const gpio_inttype_t int
/* Return the interrupt type set for a pin */
INLINED gpio_inttype_t gpio_get_interrupt(const uint8_t gpio_num)
{
return FIELD2VAL(GPIO_CONF_INTTYPE, GPIO.CONF[gpio_num]);
return (gpio_inttype_t)FIELD2VAL(GPIO_CONF_INTTYPE, GPIO.CONF[gpio_num]);
}
#endif