aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2021-02-20 17:43:24 +1300
committerDavid Phillips <david@yeah.nah.nz>2021-02-27 21:54:56 +1300
commit27d6d2fc5a1647395a7a9074faf8362d6d0c358a (patch)
tree81f81c6b4a5a835e01968e0059271bb90c3768ab /Makefile
parente843e9da835f058e09810cfeba7c60d0b270e7b3 (diff)
downloadaltimeter-27d6d2fc5a1647395a7a9074faf8362d6d0c358a.tar.xz
Use more generic interface for barometer and timer
This patch abstracts the global symbols for getting barometer readings behind a "struct of function pointers" interface as popular in Linux Kernel, U-Boot and others. This means that unit testing can take place with mocked hardware peripherals. The old "global" drivers are still available, behind explicit function calls required to access the now-static functions. This patch also introduces a timer peripheral software module with the same model, to support future unit testing of altitude rate etc.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6ba3a4f..809c153 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,7 @@ REAL_OBJ = \
$(REAL_DIR)/display_sim.o \
$(REAL_DIR)/altimeter.o \
$(REAL_DIR)/util.o \
+ $(REAL_DIR)/timer.o \
$(REAL_DIR)/data_manager.o
SIM_OBJ = \
@@ -76,6 +77,7 @@ SIM_OBJ = \
$(SIM_DIR)/display_sim.o \
$(SIM_DIR)/altimeter.o \
$(SIM_DIR)/util.o \
+ $(SIM_DIR)/timer.o \
$(SIM_DIR)/data_manager.o
ALL_OBJ = $(TEST_OBJ) $(REAL_OBJ) $(SIM_OBJ)