修复fd230编译错误 1574/1
authorSnickerSun <snickersun@163.com>
Thu, 26 Dec 2024 22:46:04 +0000 (06:46 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 26 Dec 2024 22:46:04 +0000 (06:46 +0800)
code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c
code/sdk/zhihui/drivers/ppg/hx3695/hx3695_hal.h
code/sdk/zhihui/drivers/ppg/service/ppg_service.cpp

index 33588eb..aa3bde8 100644 (file)
@@ -41,22 +41,22 @@ uint8_t buffer_verify[DEFALUT_BUFLENGTH] __attribute__((aligned(4)));
 uint8_t buffer_oob_verify[128] __attribute__((aligned(4))); // 128 is one max oob size\r
 int has_nandflash_init = 0;\r
 \r
-#ifndef MEMORY_MINI\r
-#ifdef  SINGLE_USER_PARTITION\r
+// #ifndef MEMORY_MINI\r
+// #ifdef  SINGLE_USER_PARTITION\r
+// #define YF_VOLUMES_NUM 1\r
+// #define YF_NAME_STRS "/user/"\r
+// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100};\r
+// #else\r
+// #define YF_VOLUMES_NUM 4\r
+// #define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/"\r
+// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 };\r
+// // uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 };\r
+// #endif\r
+// #else\r
 #define YF_VOLUMES_NUM 1\r
 #define YF_NAME_STRS "/user/"\r
 uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100};\r
-#else\r
-#define YF_VOLUMES_NUM 4\r
-#define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/"\r
-uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 };\r
-// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 };\r
-#endif\r
-#else\r
-#define YF_VOLUMES_NUM 1\r
-#define YF_NAME_STRS "/user/"\r
-uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100};\r
-#endif\r
+// #endif\r
 \r
 static const char * const g_volume_names[YF_VOLUMES_NUM] = { YF_NAME_STRS };\r
 \r
index 0f61427..c40d0b9 100644 (file)
@@ -1,15 +1,15 @@
 /*
  * @Author: penglei 1624952103@qq.com
  * @Date: 2024-06-07 11:18:26
- * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2024-07-25 18:14:12
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-12-26 21:30:19
  * @FilePath: /FD230/code/sdk/drivers/peripheral/ppg/hx3695/hx3695_hal.h
  * @Description: 
  * 
  * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
  */
-#ifndef HX_3695_H__
-#define HX_3695_H__
+#ifndef HX_3695_HAL_H__
+#define HX_3695_HAL_H__
 #ifdef __cplusplus
 #if __cplusplus
 extern "C" {
index 5374055..2a25562 100644 (file)
@@ -46,18 +46,15 @@ extern "C" {
 #include "custom_utils.h"
 
 
-#ifdef PPG_VC9202
+#if defined(PPG_VC9202)
 #include "vc9202_hal.h"
 #include "vc9202_user.h"
-#endif
-
-#ifdef PPG_HX3695
-#include "hx3695_hal.h"
-#endif
-
-#ifdef PPG_VC921X
+#elif  defined(PPG_VC921X)
 #include "vc921x_hal.h"
 #include "vc921x_user_app.h"
+#else
+#include "hx3695_hal.h"
+#include "hx3695.h"
 #endif
 
 static bool g_ppg_service_initialled = false;
@@ -67,17 +64,7 @@ uint8_t light_databuf[64] = {0};
 
 osTimerId_t g_ppg_service_timer = NULL;
 
-typedef uint32_t PPG_CMD_TYPE_T ;
-
-typedef enum{
-    HX3695_MSG_TYPE_HRS_UPDATE,
-    HX3695_MSG_TYPE_HRV_UPDATE,
-    HX3695_MSG_TYPE_SPO2_UPDATE,
-    HX3695_MSG_TYPE_LEAKLIGHT_UPDATE,
-    HX3695_MSG_TYPE_GRAYCARD_UPDATE,
-    HX3695_MSG_TYPE_WEARSTAT_UPDATE,
-    HX3695_MSG_TYPE_STATIC_HRS_UPDATE,
-} hx3695_msg_type_t;
+
 /***
  * 其他cmd在Header里定义,对外开放
 */
@@ -102,7 +89,7 @@ void set_keep_in_wear_det_mode(uint8_t mod)
     keep_in_wear_det_mod = mod;
 }
 
-#if 0
+#ifdef PPG_HX3695
 //漏光测试
 errcode_t update_leaklight_event_notify(uint8_t *data)
 {
@@ -406,7 +393,7 @@ static void ppg_service_check_task(void  *arg)
 
 #ifdef PPG_VC9202
        ppg_send_cmd_to_vc9202_driver(cmd,enable);
-#elif defined PPG_VC921X
+#elif defined(PPG_VC921X)
     ppg_send_cmd_to_vc921x_driver(cmd,enable);
 #endif
 
@@ -454,7 +441,7 @@ errcode_t uapi_ppg_service_init(void)
     }
     hx3695_register_msg_callback(hx3695_msg_callback);//注册驱动回调
     // //ppg_send_cmd_to_driver("wear",0);
-#elif defined PPG_VC9202
+#elif defined(PPG_VC9202)
     if ( vc9202_drv_get_chip_id() != 0x21)
     {
         //TODO 没找到3695,退出线程