From eed74b31a1f1dc2b67d7e28f9818247aeabde1e3 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Tue, 26 Nov 2024 20:25:26 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E7=94=B5=E6=B1=A0=E8=B7=B3?= =?utf8?q?=E7=94=B5=EF=BC=8C=E8=B0=83=E6=95=B4=E5=BF=83=E7=8E=87=E6=A3=80?= =?utf8?q?=E6=B5=8B=E4=BD=A9=E6=88=B4=E9=98=88=E5=80=BC=EF=BC=8C=E8=B0=83?= =?utf8?q?=E6=95=B4=E9=87=87=E6=A0=B7=E7=8E=87=EF=BC=8C=E4=BC=98=E5=8C=96?= =?utf8?q?=E8=AE=A1=E7=AE=97=E6=B5=81=E7=A8=8B(=E8=A1=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c | 2 +- code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hrs_agc.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c index f8bc4ec94..a4f63cee2 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c @@ -43,7 +43,7 @@ int16_t gsen_fifo_x[64]={0}; int16_t gsen_fifo_y[64]={0}; int16_t gsen_fifo_z[64]={0}; -gsenson_t gsensordata[9]; +gsenson_t gsensordata[32]; static uint8_t msg_count = 0; diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hrs_agc.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hrs_agc.c index b229739c3..04fd3f824 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hrs_agc.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hrs_agc.c @@ -919,6 +919,10 @@ uint8_t hx3695_hrs_read(hrs_sensor_data_t * s_dat) } // TYHX_LOG("ppg_state: %d ,hrs_cal_state: %d\r\n",s_ppg_state,hrs_cal_state); data_count = hx3695_read_fifo_data(s_buf,hrs_phase_num,1); + + if(data_count > 20) + return 0; + // PRINT("ppg data size: %d %d\r\n", data_count,hrs_phase_num); // SEGGER_RTT_printf(0,"af_hx3695_read_fifo_data:::%d %d %d\r\n", hx3695_read_reg(0X2a),hx3695_read_reg(0X2b),hx3695_read_reg(0X2c)); s_dat->count = data_count; -- 2.17.1