}
static inline uint8_t
-stm_gpio_isset(struct stm_gpio *gpio, int pin) {
+stm_gpio_get(struct stm_gpio *gpio, int pin) {
return (gpio->idr >> pin) & 1;
}
uint8_t shift = (pin & 3) << 2;
uint8_t val = 0;
+ /* Enable SYSCFG */
+ stm_rcc.apb2enr |= (1 << STM_RCC_APB2ENR_SYSCFGEN);
+
if (gpio == &stm_gpioa)
val = STM_SYSCFG_EXTICR_PA;
else if (gpio == &stm_gpiob)