From: SnickerSun Date: Thu, 26 Dec 2024 22:46:04 +0000 (+0800) Subject: 修复fd230编译错误 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=c20a87723fc01a3df57e512996be61addbe466fc;p=mirrors%2FFD230.git 修复fd230编译错误 --- diff --git a/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c b/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c index 33588eb9f..aa3bde877 100644 --- a/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c +++ b/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c @@ -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 int has_nandflash_init = 0; -#ifndef MEMORY_MINI -#ifdef SINGLE_USER_PARTITION +// #ifndef MEMORY_MINI +// #ifdef SINGLE_USER_PARTITION +// #define YF_VOLUMES_NUM 1 +// #define YF_NAME_STRS "/user/" +// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100}; +// #else +// #define YF_VOLUMES_NUM 4 +// #define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/" +// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 }; +// // uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 }; +// #endif +// #else #define YF_VOLUMES_NUM 1 #define YF_NAME_STRS "/user/" uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100}; -#else -#define YF_VOLUMES_NUM 4 -#define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/" -uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 }; -// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 }; -#endif -#else -#define YF_VOLUMES_NUM 1 -#define YF_NAME_STRS "/user/" -uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100}; -#endif +// #endif static const char * const g_volume_names[YF_VOLUMES_NUM] = { YF_NAME_STRS }; diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695_hal.h b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695_hal.h index 0f614273a..c40d0b9fd 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695_hal.h +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695_hal.h @@ -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" { diff --git a/code/sdk/zhihui/drivers/ppg/service/ppg_service.cpp b/code/sdk/zhihui/drivers/ppg/service/ppg_service.cpp index 5374055fe..2a2556204 100644 --- a/code/sdk/zhihui/drivers/ppg/service/ppg_service.cpp +++ b/code/sdk/zhihui/drivers/ppg/service/ppg_service.cpp @@ -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,退出线程