From c5f1b64cba5cdd59203d4a270a8716a43d92f607 Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Sat, 16 Apr 2022 21:43:26 -0500 Subject: [PATCH] Move filesystem code into its own directory Step one into cleaning up the codebase a little bit. --- sw/Makefile | 2 +- sw/exec.c | 4 ++-- sw/{ => filesystem}/fat.c | 2 +- sw/{ => filesystem}/fat.h | 0 sw/{ => filesystem}/o65.c | 0 sw/{ => filesystem}/o65.h | 0 sw/main.c | 3 +-- 7 files changed, 5 insertions(+), 6 deletions(-) rename sw/{ => filesystem}/fat.c (98%) rename sw/{ => filesystem}/fat.h (100%) rename sw/{ => filesystem}/o65.c (100%) rename sw/{ => filesystem}/o65.h (100%) diff --git a/sw/Makefile b/sw/Makefile index 3c85514..86e6789 100644 --- a/sw/Makefile +++ b/sw/Makefile @@ -15,7 +15,7 @@ LISTS=lists TESTS=tests SRCS=$(wildcard *.s) $(wildcard *.c) -SRCS+=$(wildcard usb/*.c) +SRCS+=$(wildcard filesystem/*.s) $(wildcard filesystem/*.c) OBJS+=$(patsubst %.s,%.o,$(filter %s,$(SRCS))) OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS))) diff --git a/sw/exec.c b/sw/exec.c index 8e3a622..0824eb6 100644 --- a/sw/exec.c +++ b/sw/exec.c @@ -2,8 +2,8 @@ #include #include -#include "fat.h" -#include "o65.h" +#include "filesystem/fat.h" +#include "filesystem/o65.h" void exec(char* filename) { o65_header_t* header; diff --git a/sw/fat.c b/sw/filesystem/fat.c similarity index 98% rename from sw/fat.c rename to sw/filesystem/fat.c index 5fb947f..7583210 100644 --- a/sw/fat.c +++ b/sw/filesystem/fat.c @@ -1,7 +1,7 @@ #include #include -#include "fat.h" +#include "filesystem/fat.h" #include "sd_card.h" uint8_t fat_buf[512]; diff --git a/sw/fat.h b/sw/filesystem/fat.h similarity index 100% rename from sw/fat.h rename to sw/filesystem/fat.h diff --git a/sw/o65.c b/sw/filesystem/o65.c similarity index 100% rename from sw/o65.c rename to sw/filesystem/o65.c diff --git a/sw/o65.h b/sw/filesystem/o65.h similarity index 100% rename from sw/o65.h rename to sw/filesystem/o65.h diff --git a/sw/main.c b/sw/main.c index 23cdb63..f57a9cc 100644 --- a/sw/main.c +++ b/sw/main.c @@ -6,8 +6,7 @@ #include "uart.h" #include "mapper.h" #include "sd_card.h" -#include "fat.h" -#include "o65.h" +#include "filesystem/fat.h" #include "exec.h" uint8_t buf[512];