add L508TLCv03.05b04_XX.02 gpio test
Change-Id: Id38120cece4550beb1620807f065f939856f6907
diff --git a/mbtk/mbtk_lib/src/mbtk_gpio.c b/mbtk/mbtk_lib/src/mbtk_gpio.c
index 18d216d..de143ba 100755
--- a/mbtk/mbtk_lib/src/mbtk_gpio.c
+++ b/mbtk/mbtk_lib/src/mbtk_gpio.c
@@ -697,15 +697,17 @@
}
#elif defined(MBTK_PROJECT_L508)
+
int test_gpio[] =
{
0,2,1,6,16,15,17,99,
34,36,35,33,14,49,50,12,118,120,
43,19,7,3,
20,59,126,117,125,18,56,55,58,48,57,5,4,21,
- 23,24,13,27,28,26,25
- //32,31
- //,54,53,123,122
+ 23,24,13,27,28,26,25,
+ 32,31,
+ //54,
+ 53,123,122
};
int total;
total = (sizeof(test_gpio)/sizeof(int));
@@ -715,11 +717,14 @@
{
int i,j,ret;
//int *fail_io = (int *)arg;
- printf("[init] L508 GPIOTEST v1.2 \n");
+ printf("[init] L508 XX GPIOTEST v1.2 \n");
system("i2cset -y -f 2 0x31 0x12 0x46");
- gpio_register_set_func_0(22);
- gpio_register_set_direction(22, 0); //GPIO22 DTR做输入,检测电压
+ gpio_register_set_func_0(22);
+ gpio_register_set_direction(22, 1); //输出
+
+ usleep(500); //这里要先设置输出再设置为输入,怀疑L508TLC软件使用了GPIO22
+ gpio_register_set_direction(22, 0); //GPIO22 DTR做输入,检测电压
#if 0
/* 错误点预先关闭 */
gpio_register_set_func_0(123);
@@ -806,7 +811,11 @@
int i, j, ret, total, n = 0;
//int *fail_io = (int *)arg;
- gpio_test_init();
+ n = gpio_test_init();
+ if(-1 == n)
+ {
+ //return -1;
+ }
n = gpio_test(arg);
return n;