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 6416fe7329
commit 7be365ef08

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