diff --git a/apps/earphone/board/br28/board_jl701n_demo_cfg.h b/apps/earphone/board/br28/board_jl701n_demo_cfg.h index f3b0d90..26cabfd 100644 --- a/apps/earphone/board/br28/board_jl701n_demo_cfg.h +++ b/apps/earphone/board/br28/board_jl701n_demo_cfg.h @@ -47,7 +47,7 @@ */ #define TCFG_HW_I2C0_PORTS 'B' -#define TCFG_HW_I2C0_CLK 1000000 //硬件IIC波特率:100k +#define TCFG_HW_I2C0_CLK 400000 //硬件IIC波特率:400k //*********************************************************************************// // 硬件SPI 配置 // diff --git a/apps/earphone/xtell_Sensor/send_data.c b/apps/earphone/xtell_Sensor/send_data.c index b0bcbad..9f178d4 100644 --- a/apps/earphone/xtell_Sensor/send_data.c +++ b/apps/earphone/xtell_Sensor/send_data.c @@ -441,19 +441,12 @@ void bmp280_test(void){ void gsensor_test(void){ #if 1 - if(count >= 5){ - xlog("==============time============\n"); - - u32 current_time = get_ms_timer(); - xlog("Time since last reset: %u ms\n", current_time); - - // 为了演示,我们在这里调用重置 - if (current_time > 5000) { // 比如超过5秒就重置一次 - reset_ms_timer(); - } - - count = 0; - } - count++; + signed short acc_data_buf[3]; + signed short gyr_data_buf[3]; + SL_SC7U22_RawData_Read(acc_data_buf,gyr_data_buf); #endif +} +static u16 gtest_id = 0; +void test_func(void){ + create_process(>est_id,"gtest_id",NULL,gsensor_test,1000); } \ No newline at end of file diff --git a/apps/earphone/xtell_Sensor/sensor/SC7U22.h b/apps/earphone/xtell_Sensor/sensor/SC7U22.h index e33a056..77e73bb 100644 --- a/apps/earphone/xtell_Sensor/sensor/SC7U22.h +++ b/apps/earphone/xtell_Sensor/sensor/SC7U22.h @@ -20,7 +20,7 @@ Copyright (c) 2022 Silan MEMS. All Rights Reserved. /***使用前请根据实际情况配置以下参数******/ /**SC7U22的SDO 接地: 0****************/ /**SC7U22的SDO 接电源:1****************/ -#define SL_SC7U22_SDO_VDD_GND 0 +#define SL_SC7U22_SDO_VDD_GND 1 /*****************************************/ /***使用前请根据实际IIC地址配置参数***/ /**SC7U22的IIC 接口地址为 7bits: 0****/ diff --git a/apps/earphone/xtell_Sensor/xtell_handler.c b/apps/earphone/xtell_Sensor/xtell_handler.c index b3b8272..45a4c9d 100644 --- a/apps/earphone/xtell_Sensor/xtell_handler.c +++ b/apps/earphone/xtell_Sensor/xtell_handler.c @@ -234,6 +234,10 @@ void le_user_app_event_handler(struct sys_event* event){ send_data_to_ble_client(&device_buff,founds); } break; + case 0x02: + extern void test_func(void); + // test_func(); + break; default: break; } diff --git a/cpu/br28/tools/app.bin b/cpu/br28/tools/app.bin index 75e069a..d348c6d 100644 Binary files a/cpu/br28/tools/app.bin and b/cpu/br28/tools/app.bin differ diff --git a/cpu/br28/tools/data_code.bin b/cpu/br28/tools/data_code.bin index bb68600..bbb2491 100644 Binary files a/cpu/br28/tools/data_code.bin and b/cpu/br28/tools/data_code.bin differ diff --git a/cpu/br28/tools/download/earphone/jl_isd.bin b/cpu/br28/tools/download/earphone/jl_isd.bin index 322e5a2..5bf56b0 100644 Binary files a/cpu/br28/tools/download/earphone/jl_isd.bin and b/cpu/br28/tools/download/earphone/jl_isd.bin differ diff --git a/cpu/br28/tools/sdk.elf.resolution.txt b/cpu/br28/tools/sdk.elf.resolution.txt index cc2fda7..27d3245 100644 --- a/cpu/br28/tools/sdk.elf.resolution.txt +++ b/cpu/br28/tools/sdk.elf.resolution.txt @@ -5751,6 +5751,7 @@ objs/apps/earphone/xtell_Sensor/xtell_handler.c.o -r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,printf,l -r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,i2c_scanner_probe,l -r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,send_data_to_ble_client,l +-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,test_func,l -r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,stop_calibration,l -r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,SL_SC7U22_Config,l -r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,start_calibration,l @@ -5839,6 +5840,7 @@ objs/apps/earphone/xtell_Sensor/send_data.c.o -r=objs/apps/earphone/xtell_Sensor/send_data.c.o,circle_buffer_init,l -r=objs/apps/earphone/xtell_Sensor/send_data.c.o,bmp280_test,pl -r=objs/apps/earphone/xtell_Sensor/send_data.c.o,gsensor_test,pl +-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,test_func,pl -r=objs/apps/earphone/xtell_Sensor/send_data.c.o,SC7U22_init,l -r=objs/apps/earphone/xtell_Sensor/send_data.c.o,SC7U22_calibration_id,pl -r=objs/apps/earphone/xtell_Sensor/send_data.c.o,foot_init,l