From 303d7c027b689191868b5c87e4fc7dbaf2990f9a Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Fri, 22 Sep 2017 20:30:15 +0900 Subject: Change peripheral io GPIO API - change PERIPHERAL_GPIO_DIRECTION_OUT to PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW Change-Id: I321007b313e305af1ccf0e4cffddf1fae5b91e20 Signed-off-by: kibak.yoon --- src/thing_toggler.c | 10 +++++----- 1 file 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) -- cgit v1.2.3