Skip to content

Commit

Permalink
- Align sensor driver directory structure with the Examplesensor example
Browse files Browse the repository at this point in the history
- Zephyr path doesn´t work in the drivers CMakeLists currently and will be handled later
  • Loading branch information
Kampi committed Oct 8, 2023
1 parent e5394c8 commit be7f385
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory(display)
add_subdirectory(input)
add_subdirectory(sensor/apds9306)

add_subdirectory_ifdef(CONFIG_SENSOR sensor)
6 changes: 5 additions & 1 deletion app/drivers/Kconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
rsource "display/Kconfig"
rsource "input/Kconfig"
rsource "input/Kconfig"

menu "Drivers"
rsource "sensor/Kconfig"
endmenu
6 changes: 6 additions & 0 deletions app/drivers/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2023, Daniel Kampert
#
# SPDX-License-Identifier: Apache-2.0
#

add_subdirectory_ifdef(CONFIG_APDS9306 apds9306)
3 changes: 3 additions & 0 deletions app/drivers/sensor/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if SENSOR
rsource "apds9306/Kconfig"
endif # SENSOR
2 changes: 1 addition & 1 deletion app/drivers/sensor/apds9306/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# TODO: Doesn´t work with CMakeList.txt of the drivers directory -> Check it
#zephyr_library()

zephyr_library_sources(apds9306.c)
zephyr_sources(apds9306.c)

0 comments on commit be7f385

Please sign in to comment.