Skip to content

Commit bf825be

Browse files
committed
support pmic driver
1 parent 1185618 commit bf825be

5 files changed

Lines changed: 4056 additions & 0 deletions

File tree

src/peripherals/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/encoder)
1111
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/button)
1212
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/led)
1313
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/joystick)
14+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pmic)
1415

1516
########################################
1617
# Layer Configure
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
##
2+
# @file CMakeLists.txt
3+
# @brief
4+
#/
5+
6+
# MODULE_PATH
7+
set(MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
8+
9+
# MODULE_NAME
10+
get_filename_component(MODULE_NAME ${MODULE_PATH} NAME)
11+
12+
# LIB_SRCS
13+
file(GLOB_RECURSE LIB_SRCS
14+
"${MODULE_PATH}/axp2101/src/*.c")
15+
16+
# LIB_PUBLIC_INC
17+
set(LIB_PUBLIC_INC
18+
${MODULE_PATH}/axp2101/include
19+
)
20+
21+
########################################
22+
# Target Configure
23+
########################################
24+
add_library(${MODULE_NAME})
25+
26+
target_sources(${MODULE_NAME}
27+
PRIVATE
28+
${LIB_SRCS}
29+
)
30+
31+
target_include_directories(${MODULE_NAME}
32+
PRIVATE
33+
${LIB_PRIVATE_INC}
34+
35+
PUBLIC
36+
${LIB_PUBLIC_INC}
37+
)
38+
39+
40+
########################################
41+
# Layer Configure
42+
########################################
43+
list(APPEND COMPONENT_LIBS ${MODULE_NAME})
44+
set(COMPONENT_LIBS "${COMPONENT_LIBS}" PARENT_SCOPE)
45+
list(APPEND COMPONENT_PUBINC ${LIB_PUBLIC_INC})
46+
set(COMPONENT_PUBINC "${COMPONENT_PUBINC}" PARENT_SCOPE)

0 commit comments

Comments
 (0)