led: add led api

Change-Id: I6d124e6ad583e897adb22371cac6a695eec3b0cb
diff --git a/mbtk/mbtk_lib/inc/mbtk_info.h b/mbtk/mbtk_lib/inc/mbtk_info.h
index 1f035be..2f3b491 100755
--- a/mbtk/mbtk_lib/inc/mbtk_info.h
+++ b/mbtk/mbtk_lib/inc/mbtk_info.h
@@ -229,6 +229,12 @@
     MBTK_INFO_ID_OOS_STA_RSP,
 
     MBTK_INFO_ID_OOS_STA_END,
+	
+	//led
+    MBTK_INFO_ID_LED_BEGIN = 8000,
+    MBTK_INFO_ID_LED_REQ,
+    MBTK_INFO_ID_LED_RSP,
+    MBTK_INFO_ID_LED_END,
 
     // IND Information
     MBTK_INFO_ID_IND_BEGIN = 10000,
diff --git a/mbtk/mbtk_lib/src/mbtk_info.c b/mbtk/mbtk_lib/src/mbtk_info.c
index cdef2b2..ce870c8 100755
--- a/mbtk/mbtk_lib/src/mbtk_info.c
+++ b/mbtk/mbtk_lib/src/mbtk_info.c
@@ -293,6 +293,10 @@
         case MBTK_INFO_ID_PB_STATE_REQ:
         case MBTK_INFO_ID_PB_STATE_RSP:
             return "PB_STATE";
+        //led
+        case MBTK_INFO_ID_LED_REQ:
+        case MBTK_INFO_ID_LED_RSP:
+            return "LED";
         // IND Information
         // <uint8>  State
         case MBTK_INFO_ID_IND_NET_STATE_CHANGE:
@@ -430,6 +434,8 @@
             info_id == MBTK_INFO_ID_SMS_END ||
             info_id == MBTK_INFO_ID_PB_BEGIN ||
             info_id == MBTK_INFO_ID_PB_END ||
+            info_id == MBTK_INFO_ID_LED_BEGIN ||
+            info_id == MBTK_INFO_ID_LED_END ||
             info_id == MBTK_INFO_ID_WAKEUP_STA_BEGIN ||
             info_id == MBTK_INFO_ID_WAKEUP_STA_END ||
             info_id == MBTK_INFO_ID_OOS_STA_BEGIN ||
diff --git a/mbtk/mbtk_lib/src/mbtk_info_api.c b/mbtk/mbtk_lib/src/mbtk_info_api.c
index cae9d27..05b803a 100755
--- a/mbtk/mbtk_lib/src/mbtk_info_api.c
+++ b/mbtk/mbtk_lib/src/mbtk_info_api.c
@@ -2171,6 +2171,39 @@
 }
 
 /*
+* Set net led.
+*
+*/
+int mbtk_led_set(mbtk_info_handle_t* handle, mbtk_led_type type, mbtk_led_status status)
+{
+    if(handle == NULL)
+    {
+        LOGE("ARG error.");
+        return -1;
+    }
+
+    char buff[3] = {0};
+    if(type == MBTK_LED_TYPE_NET)
+    {
+        buff[0] = 0;
+    }
+    else
+    {
+        buff[0] = 1;
+    }
+
+    if(status == MBTK_LED_STATUS_CLOSE)
+    {
+        buff[1] = 0;
+    }
+    else
+    {
+        buff[1] = 1;
+    }
+    return info_item_process(handle, MBTK_INFO_ID_LED_REQ, buff, 2, NULL) ? handle->info_err : 0;
+}
+
+/*
 * Set pdp state change callback function.
 */
 int mbtk_pdp_state_change_cb_reg(mbtk_info_handle_t* handle, mbtk_info_callback_func cb)