led: add led api
Change-Id: I6d124e6ad583e897adb22371cac6a695eec3b0cb
diff --git a/mbtk/mbtk_ril/src/main.c b/mbtk/mbtk_ril/src/main.c
index 4ed52ce..eeabc7c 100755
--- a/mbtk/mbtk_ril/src/main.c
+++ b/mbtk/mbtk_ril/src/main.c
@@ -25,6 +25,7 @@
#include "mbtk_ntp.h"
#include "mbtk_net_control.h"
#include "info_data.h"
+#include "mbtk_led.h"
#define TEMP_FAILURE_RETRY(exp) ({ \
typeof (exp) _rc; \
@@ -419,6 +420,14 @@
data[1] = 0; // GMS/WCDMA
} else {
data[1] = 1; // LTE
+ if(data[0] == 1)
+ {
+ mbtk_net_led_set(MBTK_NET_LED_NET_CONNECT);
+ }
+ else
+ {
+ mbtk_net_led_set(MBTK_NET_LED_SEARCH_NETWORK);
+ }
}
urc_msg_distribute(true, INFO_URC_MSG_NET_PS_REG_STATE, data, sizeof(data));
@@ -1804,6 +1813,10 @@
LOGE("mbtk_info_server_start() fail.");
return -1;
}
+
+#ifdef MBTK_PROJECT_T108
+ mbtk_led_init();
+#endif
#if 0
if(uevent_main())