diff options
-rw-r--r-- | src/thing_toggler.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/thing_toggler.c b/src/thing_toggler.c index f45a1f9..6442f33 100644 --- a/src/thing_toggler.c +++ b/src/thing_toggler.c @@ -40,14 +40,14 @@ bool service_app_create(void *data) app_data *ad = (app_data *)data; int ret = 0; - // Todo: add your code here. + // Todo: add your code here. peripheral_gpio_open(GPIO_NUM, &ad->gpio); if (!ad->gpio) { dlog_print(DLOG_ERROR, LOG_TAG, "The return value of peripheral_gpio_open is null."); return false; } - ret = peripheral_gpio_set_direction(ad->gpio, PERIPHERAL_GPIO_DIRECTION_OUT); + ret = peripheral_gpio_set_direction(ad->gpio, PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW); if (ret != 0) { dlog_print(DLOG_ERROR, LOG_TAG, "Cannot set direction error."); return false; @@ -60,13 +60,13 @@ bool service_app_create(void *data) return false; } - return true; + return true; } void service_app_terminate(void *data) { app_data *ad = (app_data *)data; - // Todo: add your code here. + // Todo: add your code here. ecore_timer_del(ad->on_off_timer); peripheral_gpio_close(ad->gpio); @@ -75,7 +75,7 @@ void service_app_terminate(void *data) void service_app_control(app_control_h app_control, void *data) { - // Todo: add your code here. + // Todo: add your code here. } static void service_app_lang_changed(app_event_info_h event_info, void *user_data) |