中医30s检测
authorhu <1224667075@qq.com>
Tue, 20 Feb 2024 02:35:16 +0000 (10:35 +0800)
committer1 <1>
Tue, 20 Feb 2024 09:10:14 +0000 (17:10 +0800)
1.doc/K18/BLE_Watch/code/sensor_drive.c
1.doc/K18/BLE_Watch/code/sensor_drive.h
1.doc/K18/BLE_Watch/components/driver/driver_timer.c
1.doc/K18/fr8010h_config_200826.exe [new file with mode: 0644]

index 67ca63a..f52db49 100644 (file)
@@ -472,10 +472,23 @@ char SPO2_test(void)
     return send_spo2_data_flag;
 }
 ////////////////////////////////////云医链中医测试////////////////////////////////////////////////
+unsigned int yyl_timer=0;
+void YYL_test_timer(void)
+{
+       if(send_yyl_data_flag==2)
+       {
+               if(yyl_timer>=30)
+               {
+                       YYL_open();
+                       yyl_timer=0;
+               }
+       }
+}
 int YYL_test_count = 0;
+
 char YYL_test(void)
 {
-       if(send_yyl_data_flag)//中医
+       if(send_yyl_data_flag==1)//中医
        {
                yylPFE_OutputData *pOutputData; 
                yylPFE_OutputData *pOutputData_tmp;     
@@ -526,9 +539,16 @@ char YYL_test(void)
                        co_printf("%s","\"}\n");
                        co_printf("YYL_test:printf_len:%d\n",printf_len);
                        yyl_in_data_len =0;
-               }       
-               
+                       ///////关闭//////////
+                       pInit_Param.work_mode = WORK_MODE_NONE;
+                       vc9202_usr_init(&pInit_Param);
+                       send_yyl_data_flag=2;
+                       yyl_timer=0;
+                       co_printf(" colse\n");
+               }
        }
+
+
        // YYL_test_count++;
        // co_printf("os_msg_post_count:%d  YYL_test_count:%d\n",os_msg_post_count,YYL_test_count);
     return send_yyl_data_flag;
@@ -754,6 +774,8 @@ void sensor_while(void)
                EMO_test();
                BP_test();
        }
+       YYL_test_timer();
+
        // pmu_port_wakeup_func_set(GPIO_PC7|GPIO_PD4|GPIO_PD5|GPIO_PD6|GPIO_PD7);//GPIO中断
        // NVIC_EnableIRQ(PMU_IRQn);
 }
index 135f9ad..dca9ac4 100644 (file)
@@ -26,6 +26,7 @@ char HRS_test(void);
 char HRV_test(void);
 char SPO2_test(void);
 char YYL_test(void);
+void YYL_test_timer(void);
 char EMO_test(void);
 void get_tp_data(void);
 void temp_test(void);
index de7818b..c6d1530 100644 (file)
@@ -315,6 +315,7 @@ uint8_t timer_init(uint32_t timer_addr, uint32_t count_us, uint8_t run_mode)
 unsigned int timer0_count = 0;
 extern unsigned int timestamp_d; //秒的时间戳,需要配合RTC使用
 extern unsigned int uart0_timer;//判断主机是否在线的超时时间计数
+extern unsigned int yyl_timer;
 __attribute__((weak)) __attribute__((section("ram_code"))) void timer0_isr_ram(void)
 {
     timer_clear_interrupt(TIMER0);
@@ -324,6 +325,7 @@ __attribute__((weak)) __attribute__((section("ram_code"))) void timer0_isr_ram(v
         timer0_count=0;
         timestamp_d++;
         uart0_timer++;
+        yyl_timer++;
         //co_printf("timer0_isr_ram:0\r\n");
     }
     //
diff --git a/1.doc/K18/fr8010h_config_200826.exe b/1.doc/K18/fr8010h_config_200826.exe
new file mode 100644 (file)
index 0000000..28d2ccc
Binary files /dev/null and b/1.doc/K18/fr8010h_config_200826.exe differ