From 01b6f2525f47ee781d86a2495dfcd17f68ccbafd Mon Sep 17 00:00:00 2001 From: zhangbo <zhangbo@qq.com> Date: 星期二, 17 六月 2025 11:54:47 +0800 Subject: [PATCH] 通过debug已经测试功能正常,移植到正确的工卡试下 --- keil/include/drivers/lis3dh_driver.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/keil/include/drivers/lis3dh_driver.c b/keil/include/drivers/lis3dh_driver.c index e01b3b8..ba0b602 100644 --- a/keil/include/drivers/lis3dh_driver.c +++ b/keil/include/drivers/lis3dh_driver.c @@ -226,7 +226,7 @@ // g_com_map[IMU_ENABLE]=0; // } lisid = mir3da_ReadOneByte(REG_CHIP_ID); - + SL_SC7A22H_Check(); if(lisid == 0x13) { mir3da_init(); @@ -701,7 +701,13 @@ } return temp; } - +void SC7A22H_ReadLenByte(uint16_t ReadAddr, uint8_t Len, uint8_t *buf) +{ + for(uint8_t t = 0; t < Len; t++) + { + buf[t] = LIS3DH_ReadOneByte(ReadAddr + t); + } +} //在mir3da里面的指定地址开始读一字节数据 //ReadAddr :读出的地址 //返回值 :读出的数据 -- Gitblit v1.9.3