Skip to content

Commit 8a53876

Browse files
committed
fix build error
1 parent 3cba6ce commit 8a53876

7 files changed

Lines changed: 30 additions & 10 deletions

File tree

boards/T2/T2-U/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
config BOARD_CHOICE
22
string
33
default "T2-U"
4+
5+
config BOARD_CONFIG
6+
bool
7+
default y
8+
select ENABLE_LED
9+
select ENABLE_BUTTON

boards/T5AI/TUYA_T5AI_POCKET/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ config BOARD_CONFIG
1818
select ENABLE_BUTTON_4
1919
select ENABLE_DISPLAY
2020
select ENABLE_JOYSTICK
21+
select ENABLE_PMIC
22+
select ENABLE_PMIC_AXP2101

platform/platform_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ platforms:
1212
- name: Ubuntu
1313
repo: https://github.com/tuya/TuyaOpen-ubuntu
1414
branch: platform_ubuntu
15-
commit: 5ec7f1b9687ccf0fd104fcc8372fac74c9676788
15+
commit: 90141766b9a1aa03cded820703c5d7f3e1d86f34
1616

1717
- name: T5AI
1818
repo: https://github.com/tuya/TuyaOpen-T5AI
1919
branch: feature/smp
20-
commit: 60192a6d448bcecc9ca0375ce24ba69562991f2a
20+
commit: 1e629fede502a57df100b7ed68978da61bb2147f
2121

2222
- name: ESP32
2323
repo: https://github.com/tuya/TuyaOpen-esp32

src/peripherals/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ menu "configure device driver"
66
rsource "touch/Kconfig"
77
rsource "encoder/Kconfig"
88
rsource "joystick/Kconfig"
9+
rsource "pmic/Kconfig"
910
endmenu

src/peripherals/display/tdl_display/include/tdl_display_driver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ typedef struct {
6868
TUYA_DISPLAY_IO_CTRL_T power;
6969
} TDD_DISP_DEV_INFO_T;
7070

71-
#if defined(ENABLE_RGB) && (ENABLE_RGB==1)
7271
typedef struct {
7372
OPERATE_RET (*open)(TDD_DISP_DEV_HANDLE_T device);
7473
OPERATE_RET (*flush)(TDD_DISP_DEV_HANDLE_T device, TDL_DISP_FRAME_BUFF_T *frame_buff);

src/peripherals/pmic/CMakeLists.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
#/
55

66
# MODULE_PATH
7+
if (CONFIG_ENABLE_PMIC STREQUAL "y")
8+
79
set(MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
810

911
# MODULE_NAME
1012
get_filename_component(MODULE_NAME ${MODULE_PATH} NAME)
1113

1214
# LIB_SRCS
13-
file(GLOB_RECURSE LIB_SRCS
14-
"${MODULE_PATH}/axp2101/src/*.c")
15+
set(LIB_SRCS "")
16+
set(LIB_PUBLIC_INC "")
1517

16-
# LIB_PUBLIC_INC
17-
set(LIB_PUBLIC_INC
18-
${MODULE_PATH}/axp2101/include
19-
)
18+
if (CONFIG_ENABLE_PMIC_AXP2101 STREQUAL "y")
19+
list(APPEND LIB_SRCS ${MODULE_PATH}/axp2101/src/axp2101_driver.c)
20+
list(APPEND LIB_PUBLIC_INC ${MODULE_PATH}/axp2101/include)
21+
endif()
2022

2123
########################################
2224
# Target Configure
@@ -43,4 +45,5 @@ target_include_directories(${MODULE_NAME}
4345
list(APPEND COMPONENT_LIBS ${MODULE_NAME})
4446
set(COMPONENT_LIBS "${COMPONENT_LIBS}" PARENT_SCOPE)
4547
list(APPEND COMPONENT_PUBINC ${LIB_PUBLIC_INC})
46-
set(COMPONENT_PUBINC "${COMPONENT_PUBINC}" PARENT_SCOPE)
48+
set(COMPONENT_PUBINC "${COMPONENT_PUBINC}" PARENT_SCOPE)
49+
endif()

src/peripherals/pmic/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config ENABLE_PMIC
2+
bool "Enable PMIC"
3+
default n
4+
5+
if (ENABLE_PMIC)
6+
config ENABLE_PMIC_AXP2101
7+
bool "Enable axp2101"
8+
default y
9+
endif

0 commit comments

Comments
 (0)