src/C/gpio.c
uint8_t gpio_register_gpio
    (e_task_id task_id, e_device_id dev_id, const dev_gpio_info_t * gpio)
{
    task_id = task_id;
    dev_id  = dev_id;

    if (!gpio_is_free(gpio->kref)) {
        KERNLOG(DBG_ERR, "Given gpio %x is already used!\n", gpio->kref.val);
        return 1;
    }

    gpio_state[gpio->kref.val] = 1;
    return 0;
}
/**
 * \brief register the GPIO identified by the gpio param
 * This function only set the given GPIO as used, making future
 * call to gpio_is_free() returning false.
 *
 * \param[in] gpio GPIO identifier, corresponding to the gpio structure
 *            kref field
 *
 * \return nothing, the gpio is reserved. This function doesn't check
 */
\brief register the GPIO identified by the gpio param
This function only set the given GPIO as used, making future
call to gpio_is_free() returning false.

\param[in] gpio GPIO identifier, corresponding to the gpio structure
kref field

\return nothing, the gpio is reserved. This function doesn't check
\ brief register the GPIO identified by the gpio param This function only set the given GPIO as used making future call to gpio_is_free () returning false . \ param [ in ] gpio GPIO identifier corresponding to the gpio structure kref field \ return nothing the gpio is reserved . This function doesn ' t check
uint8_t gpio_register_gpio
    (e_task_id task_id, e_device_id dev_id, const dev_gpio_info_t * gpio)
{
    task_id = task_id;
    dev_id  = dev_id;
    if (!gpio_is_free(gpio->kref)) {
        KERNLOG(DBG_ERR, "Given gpio %x is already used!\n", gpio->kref.val);
        return 1;
    }
    gpio_state[gpio->kref.val] = 1;
    return 0;
}
uint8_t gpio_register_gpio ( e_task_id task_id , e_device_id dev_id , const dev_gpio_info_t * gpio ) { task_id = task_id ; dev_id = dev_id ; if ( ! gpio_is_free ( gpio -> kref ) ) { KERNLOG ( DBG_ERR , " \n " , gpio -> kref . val ) ; return 1 ; } gpio_state [ gpio -> kref . val ] = 1 ; return 0 ; }
\brief register the GPIO identified by the gpio param
 This function only set the given GPIO as used, making future
 call to gpio_is_free() returning false.
\ brief register the GPIO identified by the gpio param This function only set the given GPIO as used making future call to gpio_is_free () returning false .