From a6bcf5f8e2a2af37dc42401c4d17a606613b87bc Mon Sep 17 00:00:00 2001 From: Roy_01 Date: Tue, 24 Sep 2024 10:18:56 +0800 Subject: [PATCH] fix: add max14802 definition and fix app_config.h --- app_config.h | 9 +++++++++ max14802.c | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app_config.h b/app_config.h index 9db7bb4..d9fe08f 100644 --- a/app_config.h +++ b/app_config.h @@ -116,6 +116,8 @@ extern "C" #define MAJOR_VERSION_NUMBER 0 #define MINOR_VERSION_NUMBER 0 +#define DEF_TW1508_ENABLED 0 + #define DEF_LED_COUNT 0 #define DEF_LED_DRV_ENABLED 0 #define DEF_APA102_2020_ENABLED 0 @@ -128,6 +130,7 @@ extern "C" #define DEF_MAX5136_ENABLED 0 #define DEF_SW_DRV_ENABLED 0 +#define DEF_MAX14802_ENABLED 0 #define DEF_ADGS1412_ENABLED 0 #define DEF_FS_ENABLED 0 @@ -145,6 +148,8 @@ extern "C" #define MAJOR_VERSION_NUMBER 1 #define MINOR_VERSION_NUMBER 9 +#define DEF_TW1508_ENABLED 0 + #define DEF_LED_COUNT 12 #define DEF_LED_DRV_ENABLED 1 #define DEF_APA102_2020_ENABLED 1 @@ -157,6 +162,7 @@ extern "C" #define DEF_MAX5136_ENABLED 1 #define DEF_SW_DRV_ENABLED 1 +#define DEF_MAX14802_ENABLED 0 #define DEF_ADGS1412_ENABLED 1 #define DEF_FS_ENABLED 0 @@ -174,6 +180,8 @@ extern "C" #define MAJOR_VERSION_NUMBER 0 #define MINOR_VERSION_NUMBER 0 +#define DEF_TW1508_ENABLED 0 + #define DEF_LED_COUNT 0 #define DEF_LED_DRV_ENABLED 0 #define DEF_APA102_2020_ENABLED 0 @@ -186,6 +194,7 @@ extern "C" #define DEF_MAX5136_ENABLED 0 #define DEF_SW_DRV_ENABLED 0 +#define DEF_MAX14802_ENABLED 0 #define DEF_ADGS1412_ENABLED 0 #define DEF_FS_ENABLED 0 diff --git a/max14802.c b/max14802.c index 8316d50..7928516 100644 --- a/max14802.c +++ b/max14802.c @@ -3,11 +3,13 @@ #include "nrf_delay.h" #include "nrf_gpio.h" -# + #include "string.h" #pragma GCC optimize("O2") +#if (DEF_MAX14802_ENABLED) + static sw_t m_sw = { .val = UINT64_MAX }; #define EXCLUDE_IO_ENABLE 1 @@ -181,3 +183,5 @@ const sw_drv_if_t max14802 = { .read = max14802_read, .get_sw_count = max14802_get_sw_count, }; + +#endif