commit c7cd988cc0e2c87708df8885a9c5c148a47edb6b
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Tue Nov 12 15:31:37 2019 +0100

    Makefile structure revised:
    - Module specific tests nor come with individual makefiles, which include the general test code.
    - Board configuration (e.g. connected breakout module) can now be set in Makefile or via CLI.

diff --git a/core/core.mk b/core/core.mk
index 4f0df56..6a2c2bb 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -30,8 +30,15 @@ AMIROOS_CORE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
 AMIROOS_CORE_INC = $(AMIROOS_CORE_DIR)inc
 
 # C source files
-AMIROOS_CORE_CSRC = $(wildcard $(AMIROOS_CORE_DIR)src/*.[Cc])
+AMIROOS_CORE_CSRC = $(AMIROOS_CORE_DIR)src/aos_iostream.c \
+                    $(AMIROOS_CORE_DIR)src/aos_shell.c \
+                    $(AMIROOS_CORE_DIR)src/aos_sssp.c \
+                    $(AMIROOS_CORE_DIR)src/aos_system.c \
+                    $(AMIROOS_CORE_DIR)src/aos_test.c \
+                    $(AMIROOS_CORE_DIR)src/aos_thread.c \
+                    $(AMIROOS_CORE_DIR)src/aos_time.c \
+                    $(AMIROOS_CORE_DIR)src/aos_timer.c
 
 # C++ source files
-AMIROOS_CORE_CPPSRC = $(wildcard $(AMIROOS_CORE_DIR)src/*.[Cc]?*)
+AMIROOS_CORE_CPPSRC = $(AMIROOS_CORE_DIR)src/aos_main.cpp
 
diff --git a/kernel/kernel.mk b/kernel/kernel.mk
index 5009cb0..46b49b3 100644
--- a/kernel/kernel.mk
+++ b/kernel/kernel.mk
@@ -54,7 +54,7 @@ include $(CHIBIOS)/test/rt/rt_test.mk
 include $(CHIBIOS)/test/oslib/oslib_test.mk
 
 # include paths
-AMIROOS_KERNEL_INC = $(ALLINC) \
+AMIROOS_KERNEL_INC = $(ALLINC)  \
                      $(TESTINC) \
                      $(CHIBIOS)/os/hal/lib/streams
 
diff --git a/modules/DiWheelDrive_1-1/Makefile b/modules/DiWheelDrive_1-1/Makefile
index 0accbe7..1d6f2a7 100644
--- a/modules/DiWheelDrive_1-1/Makefile
+++ b/modules/DiWheelDrive_1-1/Makefile
@@ -140,7 +140,7 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/A3906/v1/alld_A3906.mk
 include $(AMIROLLD)/drivers/AT24C01B/v1/alld_AT24C01B.mk
 include $(AMIROLLD)/drivers/HMC5883L/v1/alld_HMC5883L.mk
@@ -153,25 +153,25 @@ include $(AMIROLLD)/drivers/PCA9544A/v1/alld_PCA9544A.mk
 include $(AMIROLLD)/drivers/TPS6211x/v1/alld_TPS6211x.mk
 include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
 
-# Tests.
-include $(AMIROOS_TEST_DIR)periphery-lld/A3906_v1/aos_test_A3906.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/HMC5883L_v1/aos_test_HMC5883L.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/L3G4200D_v1/aos_test_L3G4200D.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LIS331DLH_v1/aos_test_LIS331DLH.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LTC4412_v1/aos_test_LTC4412.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
-
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/A3906/module_test_A3906.mk
+include $(MODULE_DIR)/test/AT24C01B/module_test_AT24C01B.mk
+include $(MODULE_DIR)/test/HMC5883L/module_test_HMC5883L.mk
+include $(MODULE_DIR)/test/INA219/module_test_INA219.mk
+include $(MODULE_DIR)/test/L3G4200D/module_test_L3G4200D.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/LIS331DLH/module_test_LIS331DLH.mk
+include $(MODULE_DIR)/test/LTC4412/module_test_LTC4412.mk
+include $(MODULE_DIR)/test/PCA9544A/module_test_PCA9544A.mk
+include $(MODULE_DIR)/test/TPS6211x/module_test_TPS6211x.mk
+include $(MODULE_DIR)/test/VCNL4020/module_test_VCNL4020.mk
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
diff --git a/modules/DiWheelDrive_1-1/test/A3906/module_test_A3906.mk b/modules/DiWheelDrive_1-1/test/A3906/module_test_A3906.mk
new file mode 100644
index 0000000..3f89fab
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/A3906/module_test_A3906.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_A3906_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/A3906_v1/aos_test_A3906.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_A3906_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_A3906_DIR)module_test_A3906.c
+
diff --git a/modules/DiWheelDrive_1-1/test/AT24C01B/module_test_AT24C01B.mk b/modules/DiWheelDrive_1-1/test/AT24C01B/module_test_AT24C01B.mk
new file mode 100644
index 0000000..80eae15
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/AT24C01B/module_test_AT24C01B.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT24C01B_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT24C01B_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT24C01B_DIR)module_test_AT24C01B.c
+
diff --git a/modules/DiWheelDrive_1-1/test/HMC5883L/module_test_HMC5883L.mk b/modules/DiWheelDrive_1-1/test/HMC5883L/module_test_HMC5883L.mk
new file mode 100644
index 0000000..5240b8b
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/HMC5883L/module_test_HMC5883L.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_HMC5883L_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/HMC5883L_v1/aos_test_HMC5883L.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_HMC5883L_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_HMC5883L_DIR)module_test_HMC5883L.c
+
diff --git a/modules/DiWheelDrive_1-1/test/INA219/module_test_INA219.mk b/modules/DiWheelDrive_1-1/test/INA219/module_test_INA219.mk
new file mode 100644
index 0000000..ea4b1a0
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/INA219/module_test_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_INA219_DIR)module_test_INA219.c
+
diff --git a/modules/DiWheelDrive_1-1/test/L3G4200D/module_test_L3G4200D.mk b/modules/DiWheelDrive_1-1/test/L3G4200D/module_test_L3G4200D.mk
new file mode 100644
index 0000000..da1fb7a
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/L3G4200D/module_test_L3G4200D.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_L3G4200D_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/L3G4200D_v1/aos_test_L3G4200D.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_L3G4200D_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_L3G4200D_DIR)module_test_L3G4200D.c
+
diff --git a/modules/DiWheelDrive_1-1/test/LED/module_test_LED.mk b/modules/DiWheelDrive_1-1/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/DiWheelDrive_1-1/test/LIS331DLH/module_test_LIS331DLH.mk b/modules/DiWheelDrive_1-1/test/LIS331DLH/module_test_LIS331DLH.mk
new file mode 100644
index 0000000..0ab6e13
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/LIS331DLH/module_test_LIS331DLH.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LIS331DLH_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LIS331DLH_v1/aos_test_LIS331DLH.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LIS331DLH_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LIS331DLH_DIR)module_test_LIS331DLH.c
+
diff --git a/modules/DiWheelDrive_1-1/test/LTC4412/module_test_LTC4412.mk b/modules/DiWheelDrive_1-1/test/LTC4412/module_test_LTC4412.mk
new file mode 100644
index 0000000..4f4693d
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/LTC4412/module_test_LTC4412.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LTC4412_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LTC4412_v1/aos_test_LTC4412.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LTC4412_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LTC4412_DIR)module_test_LTC4412.c
+
diff --git a/modules/DiWheelDrive_1-1/test/PCA9544A/module_test_PCA9544A.mk b/modules/DiWheelDrive_1-1/test/PCA9544A/module_test_PCA9544A.mk
new file mode 100644
index 0000000..2e66867
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/PCA9544A/module_test_PCA9544A.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PCA9544A_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PCA9544A_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PCA9544A_DIR)module_test_PCA9544A.c
+
diff --git a/modules/DiWheelDrive_1-1/test/TPS6211x/module_test_TPS6211x.mk b/modules/DiWheelDrive_1-1/test/TPS6211x/module_test_TPS6211x.mk
new file mode 100644
index 0000000..b1213b3
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/TPS6211x/module_test_TPS6211x.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS6211x_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS6211x_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS6211x_DIR)module_test_TPS6211x.c
+
diff --git a/modules/DiWheelDrive_1-1/test/VCNL4020/module_test_VCNL4020.mk b/modules/DiWheelDrive_1-1/test/VCNL4020/module_test_VCNL4020.mk
new file mode 100644
index 0000000..7d77545
--- /dev/null
+++ b/modules/DiWheelDrive_1-1/test/VCNL4020/module_test_VCNL4020.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_VCNL4020_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_VCNL4020_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_VCNL4020_DIR)module_test_VCNL4020.c
+
diff --git a/modules/DiWheelDrive_1-2/Makefile b/modules/DiWheelDrive_1-2/Makefile
index 813ed05..09d4038 100644
--- a/modules/DiWheelDrive_1-2/Makefile
+++ b/modules/DiWheelDrive_1-2/Makefile
@@ -140,7 +140,7 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/A3906/v1/alld_A3906.mk
 include $(AMIROLLD)/drivers/AT24C01B/v1/alld_AT24C01B.mk
 #include $(AMIROLLD)/drivers/BNO055/v1/alld_BNO055.mk
@@ -151,22 +151,23 @@ include $(AMIROLLD)/drivers/PCA9544A/v1/alld_PCA9544A.mk
 include $(AMIROLLD)/drivers/TPS6211x/v1/alld_TPS6211x.mk
 include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
 
-# Tests.
-include $(AMIROOS_TEST_DIR)periphery-lld/A3906_v1/aos_test_A3906.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LTC4412_v1/aos_test_LTC4412.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
-
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/A3906/module_test_A3906.mk
+include $(MODULE_DIR)/test/AT24C01B/module_test_AT24C01B.mk
+#include $(MODULE_DIR)/test/BNO055/module_test_BNO055.mk
+include $(MODULE_DIR)/test/INA219/module_test_INA219.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/LTC4412/module_test_LTC4412.mk
+include $(MODULE_DIR)/test/PCA9544A/module_test_PCA9544A.mk
+include $(MODULE_DIR)/test/TPS6211x/module_test_TPS6211x.mk
+include $(MODULE_DIR)/test/VCNL4020/module_test_VCNL4020.mk
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
diff --git a/modules/DiWheelDrive_1-2/test/A3906/module_test_A3906.mk b/modules/DiWheelDrive_1-2/test/A3906/module_test_A3906.mk
new file mode 100644
index 0000000..3f89fab
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/A3906/module_test_A3906.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_A3906_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/A3906_v1/aos_test_A3906.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_A3906_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_A3906_DIR)module_test_A3906.c
+
diff --git a/modules/DiWheelDrive_1-2/test/AT24C01B/module_test_AT24C01B.mk b/modules/DiWheelDrive_1-2/test/AT24C01B/module_test_AT24C01B.mk
new file mode 100644
index 0000000..80eae15
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/AT24C01B/module_test_AT24C01B.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT24C01B_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT24C01B_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT24C01B_DIR)module_test_AT24C01B.c
+
diff --git a/modules/DiWheelDrive_1-2/test/INA219/module_test_INA219.mk b/modules/DiWheelDrive_1-2/test/INA219/module_test_INA219.mk
new file mode 100644
index 0000000..ea4b1a0
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/INA219/module_test_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_INA219_DIR)module_test_INA219.c
+
diff --git a/modules/DiWheelDrive_1-2/test/LED/module_test_LED.mk b/modules/DiWheelDrive_1-2/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/DiWheelDrive_1-2/test/LTC4412/module_test_LTC4412.mk b/modules/DiWheelDrive_1-2/test/LTC4412/module_test_LTC4412.mk
new file mode 100644
index 0000000..4f4693d
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/LTC4412/module_test_LTC4412.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LTC4412_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LTC4412_v1/aos_test_LTC4412.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LTC4412_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LTC4412_DIR)module_test_LTC4412.c
+
diff --git a/modules/DiWheelDrive_1-2/test/PCA9544A/module_test_PCA9544A.mk b/modules/DiWheelDrive_1-2/test/PCA9544A/module_test_PCA9544A.mk
new file mode 100644
index 0000000..2e66867
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/PCA9544A/module_test_PCA9544A.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PCA9544A_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PCA9544A_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PCA9544A_DIR)module_test_PCA9544A.c
+
diff --git a/modules/DiWheelDrive_1-2/test/TPS6211x/module_test_TPS6211x.mk b/modules/DiWheelDrive_1-2/test/TPS6211x/module_test_TPS6211x.mk
new file mode 100644
index 0000000..b1213b3
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/TPS6211x/module_test_TPS6211x.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS6211x_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS6211x_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS6211x_DIR)module_test_TPS6211x.c
+
diff --git a/modules/DiWheelDrive_1-2/test/VCNL4020/module_test_VCNL4020.mk b/modules/DiWheelDrive_1-2/test/VCNL4020/module_test_VCNL4020.mk
new file mode 100644
index 0000000..7d77545
--- /dev/null
+++ b/modules/DiWheelDrive_1-2/test/VCNL4020/module_test_VCNL4020.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_VCNL4020_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_VCNL4020_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_VCNL4020_DIR)module_test_VCNL4020.c
+
diff --git a/modules/LightRing_1-0/Makefile b/modules/LightRing_1-0/Makefile
index 800f43d..6557859 100644
--- a/modules/LightRing_1-0/Makefile
+++ b/modules/LightRing_1-0/Makefile
@@ -140,22 +140,22 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/AT24C01B/v1/alld_AT24C01B.mk
 include $(AMIROLLD)/drivers/TLC5947/v1/alld_TLC5947.mk
 include $(AMIROLLD)/drivers/TPS20xxB/v1/alld_TPS20xxB.mk
 
-# Tests.
-include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TLC5947_v1/aos_test_TLC5947.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.mk
-
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/AT24C01B/module_test_AT24C01B.mk
+include $(MODULE_DIR)/test/TLC5947/module_test_TLC5947.mk
+include $(MODULE_DIR)/test/TPS20xxB/module_test_TPS20xxB.mk
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
diff --git a/modules/LightRing_1-0/test/AT24C01B/module_test_AT24C01B.mk b/modules/LightRing_1-0/test/AT24C01B/module_test_AT24C01B.mk
new file mode 100644
index 0000000..80eae15
--- /dev/null
+++ b/modules/LightRing_1-0/test/AT24C01B/module_test_AT24C01B.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT24C01B_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT24C01B_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT24C01B_DIR)module_test_AT24C01B.c
+
diff --git a/modules/LightRing_1-0/test/TLC5947/module_test_TLC5947.mk b/modules/LightRing_1-0/test/TLC5947/module_test_TLC5947.mk
new file mode 100644
index 0000000..3c4b47b
--- /dev/null
+++ b/modules/LightRing_1-0/test/TLC5947/module_test_TLC5947.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TLC5947_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TLC5947_v1/aos_test_TLC5947.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TLC5947_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TLC5947_DIR)module_test_TLC5947.c
+
diff --git a/modules/LightRing_1-0/test/TPS20xxB/module_test_TPS20xxB.mk b/modules/LightRing_1-0/test/TPS20xxB/module_test_TPS20xxB.mk
new file mode 100644
index 0000000..234f84f
--- /dev/null
+++ b/modules/LightRing_1-0/test/TPS20xxB/module_test_TPS20xxB.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS20xxB_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS20xxB_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS20xxB_DIR)module_test_TPS20xxB.c
+
diff --git a/modules/LightRing_1-2/Makefile b/modules/LightRing_1-2/Makefile
index 34c3d88..0d20422 100644
--- a/modules/LightRing_1-2/Makefile
+++ b/modules/LightRing_1-2/Makefile
@@ -140,28 +140,41 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific configuration
+## select one (or none) of the following
+#BOARD_BREAKOUT_MODULE := BOARD_BREAKOUT_NONE
+#BOARD_BREAKOUT_MODULE := BOARD_BREAKOUT_UWBv10
+
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/AT24C01B/v1/alld_AT24C01B.mk
 include $(AMIROLLD)/drivers/INA219/v1/alld_INA219.mk
 include $(AMIROLLD)/drivers/LED/v1/alld_LED.mk
 include $(AMIROLLD)/drivers/MIC9404x/v1/alld_MIC9404x.mk
 include $(AMIROLLD)/drivers/TLC5947/v1/alld_TLC5947.mk
-include $(AMIROLLD)/drivers/DW1000/v2/alld_DW1000.mk
-
-# Tests.
-include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/MIC9404x_v1/aos_test_MIC9404x.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TLC5947_v1/aos_test_TLC5947.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/DW1000_v2/aos_test_DW1000.mk
+ifeq ($(BOARD_BREAKOUT_MODULE), BOARD_BREAKOUT_UWBv10)
+  include $(AMIROLLD)/drivers/DW1000/v2/alld_DW1000.mk
+else ifeq ($(BOARD_BREAKOUT_MODULE),)
+  include $(AMIROLLD)/drivers/DW1000/v2/alld_DW1000.mk
+endif
 
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/AT24C01B/module_test_AT24C01B.mk
+include $(MODULE_DIR)/test/INA219/module_test_INA219.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/MIC9404x/module_test_MIC9404x.mk
+include $(MODULE_DIR)/test/TLC5947/module_test_TLC5947.mk
+ifeq ($(BOARD_BREAKOUT_MODULE), BOARD_BREAKOUT_UWBv10)
+  include $(MODULE_DIR)/test/DW1000/module_test_DW1000.mk
+else ifeq ($(BOARD_BREAKOUT_MODULE),)
+  include $(MODULE_DIR)/test/DW1000/module_test_DW1000.mk
+endif
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
@@ -181,6 +194,9 @@ SREC = $(CP) -O srec --srec-len=248
 #                                                                              #
 
 # List all user C define here, like -D_DEBUG=1
+ifneq ($(BOARD_SENSORRING),)
+  UDEFS += -DBOARD_BREAKOUT_MODULE=$(BOARD_BREAKOUT_MODULE)
+endif
 UDEFS +=
 
 # Define ASM defines here
diff --git a/modules/LightRing_1-2/board.h b/modules/LightRing_1-2/board.h
index 98f5c8d..07d0502 100644
--- a/modules/LightRing_1-2/board.h
+++ b/modules/LightRing_1-2/board.h
@@ -67,14 +67,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * Identifiers for the several breakout modules, which can be attached to the LightRing v1.2 module.
  */
-#define BOARD_BREAKOUT_NONE         0
+#define BOARD_BREAKOUT_NONE         -1
 #define BOARD_BREAKOUT_UWBv10       1
 
 /*
  * Configuration macro to define which breakout module is attached.
  */
 #if !defined(BOARD_BREAKOUT_MODULE) || defined(__DOXYGEN__)
-#define BOARD_BREAKOUT_MODULE       BOARD_BREAKOUT_NONE
+  #define BOARD_BREAKOUT_MODULE     BOARD_BREAKOUT_NONE
+#elif ((BOARD_BREAKOUT_MODULE != BOARD_BREAKOUT_NONE) && \
+       (BOARD_BREAKOUT_MODULE != BOARD_BREAKOUT_UWBv10))
+  #error "BOARD_BREAKOUT_MODULE set to invalid value"
 #endif
 
 /*
diff --git a/modules/LightRing_1-2/test/AT24C01B/module_test_AT24C01B.mk b/modules/LightRing_1-2/test/AT24C01B/module_test_AT24C01B.mk
new file mode 100644
index 0000000..80eae15
--- /dev/null
+++ b/modules/LightRing_1-2/test/AT24C01B/module_test_AT24C01B.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT24C01B_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT24C01B_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT24C01B_DIR)module_test_AT24C01B.c
+
diff --git a/modules/LightRing_1-2/test/DW1000/module_test_DW1000.mk b/modules/LightRing_1-2/test/DW1000/module_test_DW1000.mk
new file mode 100644
index 0000000..aa56a9d
--- /dev/null
+++ b/modules/LightRing_1-2/test/DW1000/module_test_DW1000.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_DW1000_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/DW1000_v2/aos_test_DW1000.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_DW1000_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_DW1000_DIR)module_test_DW1000.c
+
diff --git a/modules/LightRing_1-2/test/INA219/module_test_INA219.mk b/modules/LightRing_1-2/test/INA219/module_test_INA219.mk
new file mode 100644
index 0000000..ea4b1a0
--- /dev/null
+++ b/modules/LightRing_1-2/test/INA219/module_test_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_INA219_DIR)module_test_INA219.c
+
diff --git a/modules/LightRing_1-2/test/LED/module_test_LED.mk b/modules/LightRing_1-2/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/LightRing_1-2/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/LightRing_1-2/test/MIC9404x/module_test_MIC9404x.mk b/modules/LightRing_1-2/test/MIC9404x/module_test_MIC9404x.mk
new file mode 100644
index 0000000..4115fe5
--- /dev/null
+++ b/modules/LightRing_1-2/test/MIC9404x/module_test_MIC9404x.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_MIC9404x_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/MIC9404x_v1/aos_test_MIC9404x.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_MIC9404x_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_MIC9404x_DIR)module_test_MIC9404x.c
+
diff --git a/modules/LightRing_1-2/test/TLC5947/module_test_TLC5947.mk b/modules/LightRing_1-2/test/TLC5947/module_test_TLC5947.mk
new file mode 100644
index 0000000..3c4b47b
--- /dev/null
+++ b/modules/LightRing_1-2/test/TLC5947/module_test_TLC5947.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TLC5947_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TLC5947_v1/aos_test_TLC5947.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TLC5947_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TLC5947_DIR)module_test_TLC5947.c
+
diff --git a/modules/NUCLEO-F103RB/Makefile b/modules/NUCLEO-F103RB/Makefile
index 904f2cb..121c5b1 100644
--- a/modules/NUCLEO-F103RB/Makefile
+++ b/modules/NUCLEO-F103RB/Makefile
@@ -140,22 +140,22 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/LED/v1/alld_LED.mk
 include $(AMIROLLD)/drivers/button/v1/alld_button.mk
 include $(AMIROLLD)/drivers/DW1000/v1/alld_DW1000.mk
 
-# Tests.
-include $(AMIROOS_TEST_DIR)periphery-lld/button_v1/aos_test_button.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/DW1000_v1/aos_test_DW1000.mk
-
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/button/module_test_button.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/DW1000/module_test_DW1000.mk
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
diff --git a/modules/NUCLEO-F103RB/test/DW1000/module_test_DW1000.mk b/modules/NUCLEO-F103RB/test/DW1000/module_test_DW1000.mk
new file mode 100644
index 0000000..907cad8
--- /dev/null
+++ b/modules/NUCLEO-F103RB/test/DW1000/module_test_DW1000.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_DW1000_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/DW1000_v1/aos_test_DW1000.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_DW1000_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_DW1000_DIR)module_test_DW1000.c
+
diff --git a/modules/NUCLEO-F103RB/test/LED/module_test_LED.mk b/modules/NUCLEO-F103RB/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/NUCLEO-F103RB/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/NUCLEO-F103RB/test/button/module_test_button.mk b/modules/NUCLEO-F103RB/test/button/module_test_button.mk
new file mode 100644
index 0000000..63be091
--- /dev/null
+++ b/modules/NUCLEO-F103RB/test/button/module_test_button.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_button_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/button_v1/aos_test_button.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_button_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_button_DIR)module_test_button.c
+
diff --git a/modules/NUCLEO-L476RG/Makefile b/modules/NUCLEO-L476RG/Makefile
index d7aaa5f..5e547e6 100644
--- a/modules/NUCLEO-L476RG/Makefile
+++ b/modules/NUCLEO-L476RG/Makefile
@@ -140,22 +140,22 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32L4xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/LED/v1/alld_LED.mk
 include $(AMIROLLD)/drivers/button/v1/alld_button.mk
 include $(AMIROLLD)/drivers/MPU6050/v1/alld_MPU6050.mk
 
-# Tests.
-include $(AMIROOS_TEST_DIR)periphery-lld/button_v1/aos_test_button.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/MPU6050_v1/aos_test_MPU6050.mk
-
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/button/module_test_button.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/MPU6050/module_test_MPU6050.mk
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
diff --git a/modules/NUCLEO-L476RG/test/LED/module_test_LED.mk b/modules/NUCLEO-L476RG/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/NUCLEO-L476RG/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/NUCLEO-L476RG/test/MPU6050/module_test_MPU6050.mk b/modules/NUCLEO-L476RG/test/MPU6050/module_test_MPU6050.mk
new file mode 100644
index 0000000..da1c27e
--- /dev/null
+++ b/modules/NUCLEO-L476RG/test/MPU6050/module_test_MPU6050.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_MPU6050_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/MPU6050_v1/aos_test_MPU6050.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_MPU6050_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_MPU6050_DIR)module_test_MPU6050.c
+
diff --git a/modules/NUCLEO-L476RG/test/button/module_test_button.mk b/modules/NUCLEO-L476RG/test/button/module_test_button.mk
new file mode 100644
index 0000000..63be091
--- /dev/null
+++ b/modules/NUCLEO-L476RG/test/button/module_test_button.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_button_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/button_v1/aos_test_button.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_button_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_button_DIR)module_test_button.c
+
diff --git a/modules/PowerManagement_1-1/Makefile b/modules/PowerManagement_1-1/Makefile
index 6d62524..c02d07c 100644
--- a/modules/PowerManagement_1-1/Makefile
+++ b/modules/PowerManagement_1-1/Makefile
@@ -140,43 +140,72 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific configuration
+## select one (or none) of the following
+#BOARD_SENSORRING := BOARD_NOSENSORRING
+#BOARD_SENSORRING := BOARD_PROXIMITYSENSOR
+#BOARD_SENSORRING := BOARD_DISTANCESENSOR_VL53L0X
+#BOARD_SENSORRING := BOARD_DISTANCESENSOR_VL53L1X
+
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/AT24C01B/v1/alld_AT24C01B.mk
-include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
 include $(AMIROLLD)/drivers/bq241xx/v1/alld_bq241xx.mk
 include $(AMIROLLD)/drivers/bq27500/v1/alld_bq27500.mk
 include $(AMIROLLD)/drivers/INA219/v1/alld_INA219.mk
 include $(AMIROLLD)/drivers/LED/v1/alld_LED.mk
-include $(AMIROLLD)/drivers/MPR121/v1/alld_MPR121.mk
 include $(AMIROLLD)/drivers/PCA9544A/v1/alld_PCA9544A.mk
-include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
 include $(AMIROLLD)/drivers/PKxxxExxx/v1/alld_PKxxxExxx.mk
 include $(AMIROLLD)/drivers/TPS6211x/v1/alld_TPS6211x.mk
-include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
-
-# Tests.
-include $(AMIROOS_TEST_DIR)lld/adc/aos_test_adc.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/bq241xx_v1/aos_test_bq241xx.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1/aos_test_bq27500.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/MPR121_v1/aos_test_MPR121.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PCAL6524_v1/aos_test_PCAL6524.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
+ifeq ($(BOARD_SENSORRING), BOARD_PROXIMITYSENSOR)
+  include $(AMIROLLD)/drivers/MPR121/v1/alld_MPR121.mk
+  include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L0X)
+  include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
+  include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L1X)
+  include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
+  include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING),)
+  include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
+  include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
+  include $(AMIROLLD)/drivers/MPR121/v1/alld_MPR121.mk
+  include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
+endif
 
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/adc/module_test_adc.mk
+include $(MODULE_DIR)/test/AT24C01B/module_test_AT24C01B.mk
+include $(MODULE_DIR)/test/bq241xx/module_test_bq241xx.mk
+include $(MODULE_DIR)/test/bq27500/module_test_bq27500.mk
+include $(MODULE_DIR)/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk
+include $(MODULE_DIR)/test/INA219/module_test_INA219.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/PCA9544A/module_test_PCA9544A.mk
+include $(MODULE_DIR)/test/PKxxxExxx/module_test_PKxxxExxx.mk
+include $(MODULE_DIR)/test/TPS6211x/module_test_TPS6211x.mk
+include $(MODULE_DIR)/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk
+ifeq ($(BOARD_SENSORRING), BOARD_PROXIMITYSENSOR)
+  include $(MODULE_DIR)/test/MPR121/module_test_MPR121.mk
+  include $(MODULE_DIR)/test/VCNL4020/module_test_VCNL4020.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L0X)
+  include $(MODULE_DIR)/test/AT42QT1050/module_test_AT42QT1050.mk
+  include $(MODULE_DIR)/test/PCAL6524/module_test_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L1X)
+  include $(MODULE_DIR)/test/AT42QT1050/module_test_AT42QT1050.mk
+  include $(MODULE_DIR)/test/PCAL6524/module_test_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING),)
+  include $(MODULE_DIR)/test/AT42QT1050/module_test_AT42QT1050.mk
+  include $(MODULE_DIR)/test/MPR121/module_test_MPR121.mk
+  include $(MODULE_DIR)/test/PCAL6524/module_test_PCAL6524.mk
+  include $(MODULE_DIR)/test/VCNL4020/module_test_VCNL4020.mk
+endif
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
@@ -196,6 +225,9 @@ SREC = $(CP) -O srec --srec-len=248
 #                                                                              #
 
 # List all user C define here, like -D_DEBUG=1
+ifneq ($(BOARD_SENSORRING),)
+  UDEFS += -DBOARD_SENSORRING=$(BOARD_SENSORRING)
+endif
 UDEFS +=
 
 # Define ASM defines here
diff --git a/modules/PowerManagement_1-1/board.h b/modules/PowerManagement_1-1/board.h
index 87541a9..de2e990 100644
--- a/modules/PowerManagement_1-1/board.h
+++ b/modules/PowerManagement_1-1/board.h
@@ -86,7 +86,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * Identifiers for the several sensor rings, which can be attached to the PowerManagement v1.1 module.
  */
-#define BOARD_NOSENSORRING              0
+#define BOARD_NOSENSORRING              -1
 #define BOARD_PROXIMITYSENSOR           1
 #define BOARD_DISTANCESENSOR_VL53L0X    2
 #define BOARD_DISTANCESENSOR_VL53L1X    3
@@ -95,7 +95,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * Configuration macro to define which type of sensor ring is attached.
  */
 #if !defined(BOARD_SENSORRING) || defined(__DOXYGEN__)
-#define BOARD_SENSORRING                BOARD_PROXIMITYSENSOR
+  #define BOARD_SENSORRING              BOARD_PROXIMITYSENSOR
+#elif ((BOARD_SENSORRING != BOARD_NOSENSORRING) && \
+       (BOARD_SENSORRING != BOARD_PROXIMITYSENSOR) && \
+       (BOARD_SENSORRING != BOARD_DISTANCESENSOR_VL53L0X) && \
+       (BOARD_SENSORRING != BOARD_DISTANCESENSOR_VL53L1X))
+  #error "BOARD_SENSORRING set to invalid value"
 #endif
 
 /*
diff --git a/modules/PowerManagement_1-1/test/AT24C01B/module_test_AT24C01B.mk b/modules/PowerManagement_1-1/test/AT24C01B/module_test_AT24C01B.mk
new file mode 100644
index 0000000..80eae15
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/AT24C01B/module_test_AT24C01B.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT24C01B_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT24C01B_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT24C01B_DIR)module_test_AT24C01B.c
+
diff --git a/modules/PowerManagement_1-1/test/AT42QT1050/module_test_AT42QT1050.mk b/modules/PowerManagement_1-1/test/AT42QT1050/module_test_AT42QT1050.mk
new file mode 100644
index 0000000..ee4f7a3
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/AT42QT1050/module_test_AT42QT1050.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT42QT1050_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT42QT1050_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT42QT1050_DIR)module_test_AT42QT1050.c
+
diff --git a/modules/PowerManagement_1-1/test/INA219/module_test_INA219.mk b/modules/PowerManagement_1-1/test/INA219/module_test_INA219.mk
new file mode 100644
index 0000000..ea4b1a0
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/INA219/module_test_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_INA219_DIR)module_test_INA219.c
+
diff --git a/modules/PowerManagement_1-1/test/LED/module_test_LED.mk b/modules/PowerManagement_1-1/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/PowerManagement_1-1/test/MPR121/module_test_MPR121.mk b/modules/PowerManagement_1-1/test/MPR121/module_test_MPR121.mk
new file mode 100644
index 0000000..7d2d1d8
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/MPR121/module_test_MPR121.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_MPR121_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/MPR121_v1/aos_test_MPR121.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_MPR121_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_MPR121_DIR)module_test_MPR121.c
+
diff --git a/modules/PowerManagement_1-1/test/PCA9544A/module_test_PCA9544A.mk b/modules/PowerManagement_1-1/test/PCA9544A/module_test_PCA9544A.mk
new file mode 100644
index 0000000..2e66867
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/PCA9544A/module_test_PCA9544A.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PCA9544A_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PCA9544A_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PCA9544A_DIR)module_test_PCA9544A.c
+
diff --git a/modules/PowerManagement_1-1/test/PCAL6524/module_test_PCAL6524.mk b/modules/PowerManagement_1-1/test/PCAL6524/module_test_PCAL6524.mk
new file mode 100644
index 0000000..d8b249a
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/PCAL6524/module_test_PCAL6524.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PCAL6524_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PCAL6524_v1/aos_test_PCAL6524.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PCAL6524_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PCAL6524_DIR)module_test_PCAL6524.c
+
diff --git a/modules/PowerManagement_1-1/test/PKxxxExxx/module_test_PKxxxExxx.mk b/modules/PowerManagement_1-1/test/PKxxxExxx/module_test_PKxxxExxx.mk
new file mode 100644
index 0000000..a766432
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/PKxxxExxx/module_test_PKxxxExxx.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PKxxxExxx_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PKxxxExxx_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PKxxxExxx_DIR)module_test_PKxxxExxx.c
+
diff --git a/modules/PowerManagement_1-1/test/TPS6211x/module_test_TPS6211x.mk b/modules/PowerManagement_1-1/test/TPS6211x/module_test_TPS6211x.mk
new file mode 100644
index 0000000..b1213b3
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/TPS6211x/module_test_TPS6211x.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS6211x_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS6211x_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS6211x_DIR)module_test_TPS6211x.c
+
diff --git a/modules/PowerManagement_1-1/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk b/modules/PowerManagement_1-1/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk
new file mode 100644
index 0000000..7de6088
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS6211x_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS6211x_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS6211x_INA219_DIR)module_test_TPS6211x_INA219.c
+
diff --git a/modules/PowerManagement_1-1/test/VCNL4020/module_test_VCNL4020.mk b/modules/PowerManagement_1-1/test/VCNL4020/module_test_VCNL4020.mk
new file mode 100644
index 0000000..7d77545
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/VCNL4020/module_test_VCNL4020.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_VCNL4020_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_VCNL4020_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_VCNL4020_DIR)module_test_VCNL4020.c
+
diff --git a/modules/PowerManagement_1-1/test/adc/module_test_adc.mk b/modules/PowerManagement_1-1/test/adc/module_test_adc.mk
new file mode 100644
index 0000000..0017034
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/adc/module_test_adc.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_ADC_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)lld/adc/aos_test_adc.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_ADC_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_ADC_DIR)module_test_adc.c
+
diff --git a/modules/PowerManagement_1-1/test/bq241xx/module_test_bq241xx.mk b/modules/PowerManagement_1-1/test/bq241xx/module_test_bq241xx.mk
new file mode 100644
index 0000000..f923a23
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/bq241xx/module_test_bq241xx.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_bq241xx_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/bq241xx_v1/aos_test_bq241xx.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_bq241xx_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_bq241xx_DIR)module_test_bq241xx.c
+
diff --git a/modules/PowerManagement_1-1/test/bq27500/module_test_bq27500.mk b/modules/PowerManagement_1-1/test/bq27500/module_test_bq27500.mk
new file mode 100644
index 0000000..3e56d41
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/bq27500/module_test_bq27500.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_bq27500_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1/aos_test_bq27500.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_bq27500_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_bq27500_DIR)module_test_bq27500.c
+
diff --git a/modules/PowerManagement_1-1/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk b/modules/PowerManagement_1-1/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk
new file mode 100644
index 0000000..4065926
--- /dev/null
+++ b/modules/PowerManagement_1-1/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_bq27500_bq241xx_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_bq27500_bq241xx_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_bq27500_bq241xx_DIR)module_test_bq27500_bq241xx.c
+
diff --git a/modules/PowerManagement_1-2/Makefile b/modules/PowerManagement_1-2/Makefile
index 6d62524..c02d07c 100644
--- a/modules/PowerManagement_1-2/Makefile
+++ b/modules/PowerManagement_1-2/Makefile
@@ -140,43 +140,72 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.m
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
 include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
 
-# Periphery LLDs.
+# Module specific configuration
+## select one (or none) of the following
+#BOARD_SENSORRING := BOARD_NOSENSORRING
+#BOARD_SENSORRING := BOARD_PROXIMITYSENSOR
+#BOARD_SENSORRING := BOARD_DISTANCESENSOR_VL53L0X
+#BOARD_SENSORRING := BOARD_DISTANCESENSOR_VL53L1X
+
+# Module specific periphery LLDs.
 include $(AMIROLLD)/drivers/AT24C01B/v1/alld_AT24C01B.mk
-include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
 include $(AMIROLLD)/drivers/bq241xx/v1/alld_bq241xx.mk
 include $(AMIROLLD)/drivers/bq27500/v1/alld_bq27500.mk
 include $(AMIROLLD)/drivers/INA219/v1/alld_INA219.mk
 include $(AMIROLLD)/drivers/LED/v1/alld_LED.mk
-include $(AMIROLLD)/drivers/MPR121/v1/alld_MPR121.mk
 include $(AMIROLLD)/drivers/PCA9544A/v1/alld_PCA9544A.mk
-include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
 include $(AMIROLLD)/drivers/PKxxxExxx/v1/alld_PKxxxExxx.mk
 include $(AMIROLLD)/drivers/TPS6211x/v1/alld_TPS6211x.mk
-include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
-
-# Tests.
-include $(AMIROOS_TEST_DIR)lld/adc/aos_test_adc.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/bq241xx_v1/aos_test_bq241xx.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1/aos_test_bq27500.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/MPR121_v1/aos_test_MPR121.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PCAL6524_v1/aos_test_PCAL6524.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.mk
-include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
+ifeq ($(BOARD_SENSORRING), BOARD_PROXIMITYSENSOR)
+  include $(AMIROLLD)/drivers/MPR121/v1/alld_MPR121.mk
+  include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L0X)
+  include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
+  include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L1X)
+  include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
+  include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING),)
+  include $(AMIROLLD)/drivers/AT42QT1050/v1/alld_AT42QT1050.mk
+  include $(AMIROLLD)/drivers/PCAL6524/v1/alld_PCAL6524.mk
+  include $(AMIROLLD)/drivers/MPR121/v1/alld_MPR121.mk
+  include $(AMIROLLD)/drivers/VCNL4020/v1/alld_VCNL4020.mk
+endif
 
 # Module specific inclusion directories
-MODULE_INC = $(MODULE_DIR) \
-             $(wildcard $(MODULE_DIR)/test/*)
+MODULE_INC = $(MODULE_DIR)
 
 # Module specific C source files.
-MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+MODULE_CSRC = $(MODULE_DIR)/board.c \
+              $(MODULE_DIR)/module.c
+
+# Module specific tests.
+include $(MODULE_DIR)/test/adc/module_test_adc.mk
+include $(MODULE_DIR)/test/AT24C01B/module_test_AT24C01B.mk
+include $(MODULE_DIR)/test/bq241xx/module_test_bq241xx.mk
+include $(MODULE_DIR)/test/bq27500/module_test_bq27500.mk
+include $(MODULE_DIR)/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk
+include $(MODULE_DIR)/test/INA219/module_test_INA219.mk
+include $(MODULE_DIR)/test/LED/module_test_LED.mk
+include $(MODULE_DIR)/test/PCA9544A/module_test_PCA9544A.mk
+include $(MODULE_DIR)/test/PKxxxExxx/module_test_PKxxxExxx.mk
+include $(MODULE_DIR)/test/TPS6211x/module_test_TPS6211x.mk
+include $(MODULE_DIR)/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk
+ifeq ($(BOARD_SENSORRING), BOARD_PROXIMITYSENSOR)
+  include $(MODULE_DIR)/test/MPR121/module_test_MPR121.mk
+  include $(MODULE_DIR)/test/VCNL4020/module_test_VCNL4020.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L0X)
+  include $(MODULE_DIR)/test/AT42QT1050/module_test_AT42QT1050.mk
+  include $(MODULE_DIR)/test/PCAL6524/module_test_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING), BOARD_DISTANCESENSOR_VL53L1X)
+  include $(MODULE_DIR)/test/AT42QT1050/module_test_AT42QT1050.mk
+  include $(MODULE_DIR)/test/PCAL6524/module_test_PCAL6524.mk
+else ifeq ($(BOARD_SENSORRING),)
+  include $(MODULE_DIR)/test/AT42QT1050/module_test_AT42QT1050.mk
+  include $(MODULE_DIR)/test/MPR121/module_test_MPR121.mk
+  include $(MODULE_DIR)/test/PCAL6524/module_test_PCAL6524.mk
+  include $(MODULE_DIR)/test/VCNL4020/module_test_VCNL4020.mk
+endif
 
 # C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
@@ -196,6 +225,9 @@ SREC = $(CP) -O srec --srec-len=248
 #                                                                              #
 
 # List all user C define here, like -D_DEBUG=1
+ifneq ($(BOARD_SENSORRING),)
+  UDEFS += -DBOARD_SENSORRING=$(BOARD_SENSORRING)
+endif
 UDEFS +=
 
 # Define ASM defines here
diff --git a/modules/PowerManagement_1-2/board.h b/modules/PowerManagement_1-2/board.h
index 5290b10..dcf2ee5 100644
--- a/modules/PowerManagement_1-2/board.h
+++ b/modules/PowerManagement_1-2/board.h
@@ -86,7 +86,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * Identifiers for the several sensor rings, which can be attached to the PowerManagement v1.2 module.
  */
-#define BOARD_NOSENSORRING              0
+#define BOARD_NOSENSORRING              -1
 #define BOARD_PROXIMITYSENSOR           1
 #define BOARD_DISTANCESENSOR_VL53L0X    2
 #define BOARD_DISTANCESENSOR_VL53L1X    3
@@ -95,7 +95,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * Configuration macro to define which type of sensor ring is attached.
  */
 #if !defined(BOARD_SENSORRING) || defined(__DOXYGEN__)
-#define BOARD_SENSORRING                BOARD_NOSENSORRING
+  #define BOARD_SENSORRING              BOARD_NOSENSORRING
+#elif ((BOARD_SENSORRING != BOARD_NOSENSORRING) && \
+       (BOARD_SENSORRING != BOARD_PROXIMITYSENSOR) && \
+       (BOARD_SENSORRING != BOARD_DISTANCESENSOR_VL53L0X) && \
+       (BOARD_SENSORRING != BOARD_DISTANCESENSOR_VL53L1X))
+  #error "BOARD_SENSORRING set to invalid value"
 #endif
 
 /*
diff --git a/modules/PowerManagement_1-2/test/AT24C01B/module_test_AT24C01B.mk b/modules/PowerManagement_1-2/test/AT24C01B/module_test_AT24C01B.mk
new file mode 100644
index 0000000..80eae15
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/AT24C01B/module_test_AT24C01B.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT24C01B_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT24C01B_v1/aos_test_AT24C01B.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT24C01B_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT24C01B_DIR)module_test_AT24C01B.c
+
diff --git a/modules/PowerManagement_1-2/test/AT42QT1050/module_test_AT42QT1050.mk b/modules/PowerManagement_1-2/test/AT42QT1050/module_test_AT42QT1050.mk
new file mode 100644
index 0000000..ee4f7a3
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/AT42QT1050/module_test_AT42QT1050.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_AT42QT1050_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_AT42QT1050_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_AT42QT1050_DIR)module_test_AT42QT1050.c
+
diff --git a/modules/PowerManagement_1-2/test/INA219/module_test_INA219.mk b/modules/PowerManagement_1-2/test/INA219/module_test_INA219.mk
new file mode 100644
index 0000000..ea4b1a0
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/INA219/module_test_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/INA219_v1/aos_test_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_INA219_DIR)module_test_INA219.c
+
diff --git a/modules/PowerManagement_1-2/test/LED/module_test_LED.mk b/modules/PowerManagement_1-2/test/LED/module_test_LED.mk
new file mode 100644
index 0000000..503ab59
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/LED/module_test_LED.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_LED_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/LED_v1/aos_test_LED.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_LED_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_LED_DIR)module_test_LED.c
+
diff --git a/modules/PowerManagement_1-2/test/MPR121/module_test_MPR121.mk b/modules/PowerManagement_1-2/test/MPR121/module_test_MPR121.mk
new file mode 100644
index 0000000..7d2d1d8
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/MPR121/module_test_MPR121.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_MPR121_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/MPR121_v1/aos_test_MPR121.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_MPR121_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_MPR121_DIR)module_test_MPR121.c
+
diff --git a/modules/PowerManagement_1-2/test/PCA9544A/module_test_PCA9544A.mk b/modules/PowerManagement_1-2/test/PCA9544A/module_test_PCA9544A.mk
new file mode 100644
index 0000000..2e66867
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/PCA9544A/module_test_PCA9544A.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PCA9544A_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PCA9544A_v1/aos_test_PCA9544A.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PCA9544A_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PCA9544A_DIR)module_test_PCA9544A.c
+
diff --git a/modules/PowerManagement_1-2/test/PCAL6524/module_test_PCAL6524.mk b/modules/PowerManagement_1-2/test/PCAL6524/module_test_PCAL6524.mk
new file mode 100644
index 0000000..d8b249a
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/PCAL6524/module_test_PCAL6524.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PCAL6524_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PCAL6524_v1/aos_test_PCAL6524.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PCAL6524_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PCAL6524_DIR)module_test_PCAL6524.c
+
diff --git a/modules/PowerManagement_1-2/test/PKxxxExxx/module_test_PKxxxExxx.mk b/modules/PowerManagement_1-2/test/PKxxxExxx/module_test_PKxxxExxx.mk
new file mode 100644
index 0000000..a766432
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/PKxxxExxx/module_test_PKxxxExxx.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_PKxxxExxx_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_PKxxxExxx_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_PKxxxExxx_DIR)module_test_PKxxxExxx.c
+
diff --git a/modules/PowerManagement_1-2/test/TPS6211x/module_test_TPS6211x.mk b/modules/PowerManagement_1-2/test/TPS6211x/module_test_TPS6211x.mk
new file mode 100644
index 0000000..b1213b3
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/TPS6211x/module_test_TPS6211x.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS6211x_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1/aos_test_TPS6211x.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS6211x_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS6211x_DIR)module_test_TPS6211x.c
+
diff --git a/modules/PowerManagement_1-2/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk b/modules/PowerManagement_1-2/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk
new file mode 100644
index 0000000..7de6088
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/TPS6211x_INA219/module_test_TPS6211x_INA219.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_TPS6211x_INA219_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_TPS6211x_INA219_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_TPS6211x_INA219_DIR)module_test_TPS6211x_INA219.c
+
diff --git a/modules/PowerManagement_1-2/test/VCNL4020/module_test_VCNL4020.mk b/modules/PowerManagement_1-2/test/VCNL4020/module_test_VCNL4020.mk
new file mode 100644
index 0000000..7d77545
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/VCNL4020/module_test_VCNL4020.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_VCNL4020_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/VCNL4020_v1/aos_test_VCNL4020.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_VCNL4020_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_VCNL4020_DIR)module_test_VCNL4020.c
+
diff --git a/modules/PowerManagement_1-2/test/adc/module_test_adc.mk b/modules/PowerManagement_1-2/test/adc/module_test_adc.mk
new file mode 100644
index 0000000..0017034
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/adc/module_test_adc.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_ADC_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)lld/adc/aos_test_adc.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_ADC_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_ADC_DIR)module_test_adc.c
+
diff --git a/modules/PowerManagement_1-2/test/bq241xx/module_test_bq241xx.mk b/modules/PowerManagement_1-2/test/bq241xx/module_test_bq241xx.mk
new file mode 100644
index 0000000..f923a23
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/bq241xx/module_test_bq241xx.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_bq241xx_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/bq241xx_v1/aos_test_bq241xx.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_bq241xx_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_bq241xx_DIR)module_test_bq241xx.c
+
diff --git a/modules/PowerManagement_1-2/test/bq27500/module_test_bq27500.mk b/modules/PowerManagement_1-2/test/bq27500/module_test_bq27500.mk
new file mode 100644
index 0000000..3e56d41
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/bq27500/module_test_bq27500.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_bq27500_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1/aos_test_bq27500.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_bq27500_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_bq27500_DIR)module_test_bq27500.c
+
diff --git a/modules/PowerManagement_1-2/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk b/modules/PowerManagement_1-2/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk
new file mode 100644
index 0000000..4065926
--- /dev/null
+++ b/modules/PowerManagement_1-2/test/bq27500_bq241xx/module_test_bq27500_bq241xx.mk
@@ -0,0 +1,36 @@
+################################################################################
+# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
+# (AMiRo) platform.                                                            #
+# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
+#                                                                              #
+# This program is free software: you can redistribute it and/or modify         #
+# it under the terms of the GNU General Public License as published by         #
+# the Free Software Foundation, either version 3 of the License, or            #
+# (at your option) any later version.                                          #
+#                                                                              #
+# This program is distributed in the hope that it will be useful,              #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
+# GNU General Public License for more details.                                 #
+#                                                                              #
+# You should have received a copy of the GNU General Public License            #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
+#                                                                              #
+# This research/work was supported by the Cluster of Excellence Cognitive      #
+# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
+# funded by the German Research Foundation (DFG).                              #
+################################################################################
+
+
+
+# path to this directory
+MODULE_TEST_bq27500_bq241xx_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+
+include $(AMIROOS_TEST_DIR)periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.mk
+
+# include paths
+MODULE_INC += $(MODULE_TEST_bq27500_bq241xx_DIR:/=)
+
+# C source files
+MODULE_CSRC += $(MODULE_TEST_bq27500_bq241xx_DIR)module_test_bq27500_bq241xx.c
+
diff --git a/periphery-lld/periphery-lld.mk b/periphery-lld/periphery-lld.mk
index 2b9f0f6..75d22da 100644
--- a/periphery-lld/periphery-lld.mk
+++ b/periphery-lld/periphery-lld.mk
@@ -35,4 +35,4 @@ AMIROOS_PERIPHERYLLD_INC = $(AMIRO_PERIPHERYLLD_DIR:/=) \
 
 # C source files
 AMIROOS_PERIPHERYLLD_CSRC = $(AMIRO_PERIPHERYLLD_DIR)periphAL.c \
-                            $(AMIROLLD_CSRC) \
+                            $(AMIROLLD_CSRC)
