log: add gpio number/value and execution result to log 51/152851/1 tizen_4.0
authorLee Hackseung <lhs@dignsys.com>
Wed, 27 Sep 2017 08:25:40 +0000 (17:25 +0900)
committerLee Hackseung <lhs@dignsys.com>
Wed, 27 Sep 2017 08:26:00 +0000 (17:26 +0900)
Change to:
static void _control_led(peripheral_gpio_h gpio, int power_on)
{
    int ret;

    ret = peripheral_gpio_write(gpio, power_on);

    dlog_print(DLOG_INFO, LOG_TAG, "Write [0x%x] into GPIO%d, ret=%d.",
                power_on, GPIO_NUM, ret);
}

Change-Id: I9637b87d6f875aab1db568a9fa31779b9e626490
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
src/thing_toggler.c

index cb483dfa0b0b0360be637ee637114520dc3054a4..6b1e19026518cd9d09fe992433bab8eaf0314799 100644 (file)
@@ -64,8 +64,12 @@ static void service_app_low_memory(app_event_info_h event_info, void *user_data)
 
 static void _control_led(peripheral_gpio_h gpio, int power_on)
 {
-       dlog_print(DLOG_INFO, LOG_TAG, "Write [%d] into GPIO.");
-       peripheral_gpio_write(gpio, power_on);
+       int ret;
+
+       ret = peripheral_gpio_write(gpio, power_on);
+
+       dlog_print(DLOG_INFO, LOG_TAG, "Write [0x%x] into GPIO%d, ret=%d.",
+                               power_on, GPIO_NUM, ret);
 }
 
 static gboolean _toggle_led(gpointer user_data)