From fa8e2b1deb7d812ca1109bb96815f271a12ae0d4 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Mon, 27 Dec 2021 22:08:58 -0500 Subject: [PATCH] better io file arrangement - Makefile gives more flexibility than relative path from .cpp file (#30) Co-authored-by: rusefillc --- firmware/Makefile | 2 +- firmware/boards/f0_module/bootloader/Makefile | 3 ++- firmware/boards/f0_module/bootloader/bootloader.cpp | 2 +- firmware/boards/f0_module/{ => io}/io_pins.h | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename firmware/boards/f0_module/{ => io}/io_pins.h (100%) diff --git a/firmware/Makefile b/firmware/Makefile index 6e09f65..9c5bc57 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -152,7 +152,7 @@ ASMSRC = $(ALLASMSRC) ASMXSRC = $(ALLXASMSRC) # Inclusion directories. -INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) boards/ +INCDIR = $(CONFDIR) $(ALLINC) boards/ $(BOARDDIR)/io/ # Define C warning options here. CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes diff --git a/firmware/boards/f0_module/bootloader/Makefile b/firmware/boards/f0_module/bootloader/Makefile index 2bf70b0..7c2ec31 100644 --- a/firmware/boards/f0_module/bootloader/Makefile +++ b/firmware/boards/f0_module/bootloader/Makefile @@ -128,7 +128,8 @@ ASMSRC = $(ALLASMSRC) ASMXSRC = $(ALLXASMSRC) # Inclusion directories. -INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) $(SRCDIR)/shared/ +INCDIR = $(CONFDIR) $(ALLINC) $(SRCDIR)/shared/ \ + ../io # Define C warning options here. CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes diff --git a/firmware/boards/f0_module/bootloader/bootloader.cpp b/firmware/boards/f0_module/bootloader/bootloader.cpp index 08e12dd..6ce5993 100644 --- a/firmware/boards/f0_module/bootloader/bootloader.cpp +++ b/firmware/boards/f0_module/bootloader/bootloader.cpp @@ -2,7 +2,7 @@ #include "hal.h" #include "flash.h" -#include "../io_pins.h" +#include "io_pins.h" #include diff --git a/firmware/boards/f0_module/io_pins.h b/firmware/boards/f0_module/io/io_pins.h similarity index 100% rename from firmware/boards/f0_module/io_pins.h rename to firmware/boards/f0_module/io/io_pins.h