src/C/devices.c
uint8_t dev_enable_gpio(e_device_id  dev_id)
{
    for (int i = 0; i < MIN(device_tab[dev_id].udev.gpio_num, MAX_GPIOS); ++i) {
        gpio_enable_gpio(&device_tab[dev_id].udev.gpios[i]);
        if (device_tab[dev_id].udev.gpios[i].exti_trigger != GPIO_EXTI_TRIGGER_NONE) {
            exti_enable(device_tab[dev_id].udev.gpios[i].kref);
        }
    }
    return 0;
}
/*
** Enable all GPIOs of a given device
*/
Enable all GPIOs of a given device
Enable all GPIOs of a given device
uint8_t dev_enable_gpio(e_device_id  dev_id)
{
    for (int i = 0; i < MIN(device_tab[dev_id].udev.gpio_num, MAX_GPIOS); ++i) {
        gpio_enable_gpio(&device_tab[dev_id].udev.gpios[i]);
        if (device_tab[dev_id].udev.gpios[i].exti_trigger != GPIO_EXTI_TRIGGER_NONE) {
            exti_enable(device_tab[dev_id].udev.gpios[i].kref);
        }
    }
    return 0;
}
uint8_t dev_enable_gpio ( e_device_id dev_id ) { for ( int i = 0 ; i < MIN ( device_tab [ dev_id ] . udev . gpio_num , MAX_GPIOS ) ; ++ i ) { gpio_enable_gpio ( & device_tab [ dev_id ] . udev . gpios [ i ] ) ; if ( device_tab [ dev_id ] . udev . gpios [ i ] . exti_trigger != GPIO_EXTI_TRIGGER_NONE ) { exti_enable ( device_tab [ dev_id ] . udev . gpios [ i ] . kref ) ; } } return 0 ; }
Enable all GPIOs of a given device
Enable all GPIOs of a given device