static bool my_timeout_func(void *data) { bool ret; ret = sol_gpio_write(gpio, write); write = !write; return ret; }
static bool timer_cb(void *data) { static bool toggle; toggle = !toggle; sol_gpio_write(led, toggle); return true; }
static bool on_timeout(void *data) { puts("soletta is ticking!"); if (gpio) { gpio_state = !gpio_state; sol_gpio_write(gpio, gpio_state); } return true; }
static int write_byte(struct led_7seg_data *mdata, struct sol_flow_node *node, unsigned char byte) { int i; if (!mdata->common_cathode) byte = ~byte; for (i = 0; i < 8; i++) { bool val = (byte >> i) & 1; if (!sol_gpio_write(mdata->gpio[i], val)) { SOL_WRN("Failed to write on gpio %" PRId32 ".", i); return -EIO; } } return 0; }