iic速率调整到400k
This commit is contained in:
@ -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 配置 //
|
||||
|
||||
@ -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);
|
||||
}
|
||||
@ -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****/
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user