From d67a7c0a876e9a0ee8f97900ce12d9c32dfbe6b3 Mon Sep 17 00:00:00 2001 From: Resaec Date: Wed, 26 Sep 2018 02:13:20 +0200 Subject: [PATCH] moving log.c and log.h to lib/ removing lib/driver_utils.h as it have no purpose anymore now --- .../fusee-secondary/src/exception_handlers.c | 3 +-- fusee/fusee-secondary/src/lib/driver_utils.h | 23 ------------------- fusee/fusee-secondary/src/{ => lib}/log.c | 6 ++--- fusee/fusee-secondary/src/{ => lib}/log.h | 4 ++-- fusee/fusee-secondary/src/loader.c | 2 +- fusee/fusee-secondary/src/main.c | 2 +- fusee/fusee-secondary/src/nxboot.c | 2 +- fusee/fusee-secondary/src/package2.c | 2 +- fusee/fusee-secondary/src/sdmmc/sdmmc.c | 1 - fusee/fusee-secondary/src/sdmmc/sdmmc_core.c | 3 +-- fusee/fusee-secondary/src/utils.c | 2 +- 11 files changed, 11 insertions(+), 39 deletions(-) delete mode 100644 fusee/fusee-secondary/src/lib/driver_utils.h rename fusee/fusee-secondary/src/{ => lib}/log.c (98%) rename fusee/fusee-secondary/src/{ => lib}/log.h (95%) diff --git a/fusee/fusee-secondary/src/exception_handlers.c b/fusee/fusee-secondary/src/exception_handlers.c index 16e8c7492..42a46516c 100644 --- a/fusee/fusee-secondary/src/exception_handlers.c +++ b/fusee/fusee-secondary/src/exception_handlers.c @@ -17,10 +17,9 @@ #include #include "exception_handlers.h" -#include "lib/driver_utils.h" #include "utils.h" #include "display/video_fb.h" -#include "log.h" +#include "lib/log.h" #define CODE_DUMP_SIZE 0x30 #define STACK_DUMP_SIZE 0x60 diff --git a/fusee/fusee-secondary/src/lib/driver_utils.h b/fusee/fusee-secondary/src/lib/driver_utils.h deleted file mode 100644 index 9ea00087b..000000000 --- a/fusee/fusee-secondary/src/lib/driver_utils.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2018 Atmosphère-NX - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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 . - */ - -#ifndef FUSEE_DRIVER_UTILS_H -#define FUSEE_DRIVER_UTILS_H - -#include -#include - -#endif diff --git a/fusee/fusee-secondary/src/log.c b/fusee/fusee-secondary/src/lib/log.c similarity index 98% rename from fusee/fusee-secondary/src/log.c rename to fusee/fusee-secondary/src/lib/log.c index 49e989508..b4e8782c8 100644 --- a/fusee/fusee-secondary/src/log.c +++ b/fusee/fusee-secondary/src/lib/log.c @@ -14,10 +14,9 @@ * along with this program. If not, see . */ -#include - #include "log.h" -#include "display/video_fb.h" + +#include /* default log level for screen output */ ScreenLogLevel g_screen_log_level = SCREEN_LOG_LEVEL_MANDATORY; @@ -34,7 +33,6 @@ void print_to_screen(ScreenLogLevel screen_log_level, char *message) { /* don't print to screen if below log level */ if(screen_log_level > g_screen_log_level) return; - //video_puts(buf); printf(message); } diff --git a/fusee/fusee-secondary/src/log.h b/fusee/fusee-secondary/src/lib/log.h similarity index 95% rename from fusee/fusee-secondary/src/log.h rename to fusee/fusee-secondary/src/lib/log.h index 73b7d86dd..080f34bef 100644 --- a/fusee/fusee-secondary/src/log.h +++ b/fusee/fusee-secondary/src/lib/log.h @@ -14,8 +14,8 @@ * along with this program. If not, see . */ -#ifndef FUSEE_PRINT_H -#define FUSEE_PRINT_H +#ifndef FUSEE_SECONDARY_PRINT_H +#define FUSEE_SECONDARY_PRINT_H #define PRINT_MESSAGE_MAX_LENGTH 512 diff --git a/fusee/fusee-secondary/src/loader.c b/fusee/fusee-secondary/src/loader.c index 1fc54206c..f9a2a7a30 100644 --- a/fusee/fusee-secondary/src/loader.c +++ b/fusee/fusee-secondary/src/loader.c @@ -24,7 +24,7 @@ #include "fs_utils.h" #include "stage2.h" #include "lib/ini.h" -#include "log.h" +#include "lib/log.h" static loader_ctx_t g_loader_ctx = {0}; diff --git a/fusee/fusee-secondary/src/main.c b/fusee/fusee-secondary/src/main.c index b598093f5..ec2ea8bc4 100644 --- a/fusee/fusee-secondary/src/main.c +++ b/fusee/fusee-secondary/src/main.c @@ -33,7 +33,7 @@ #include "gpt.h" #include "display/video_fb.h" #include "sdmmc/sdmmc.h" -#include "log.h" +#include "lib/log.h" extern void (*__program_exit_callback)(int rc); diff --git a/fusee/fusee-secondary/src/nxboot.c b/fusee/fusee-secondary/src/nxboot.c index 3c21786cf..83fb6ca3a 100644 --- a/fusee/fusee-secondary/src/nxboot.c +++ b/fusee/fusee-secondary/src/nxboot.c @@ -45,7 +45,7 @@ #define u8 uint8_t #define u32 uint32_t #include "exosphere_bin.h" -#include "log.h" +#include "lib/log.h" #undef u8 #undef u32 diff --git a/fusee/fusee-secondary/src/package2.c b/fusee/fusee-secondary/src/package2.c index 51ec914ff..7decd9510 100644 --- a/fusee/fusee-secondary/src/package2.c +++ b/fusee/fusee-secondary/src/package2.c @@ -27,7 +27,7 @@ #define u8 uint8_t #define u32 uint32_t #include "thermosphere_bin.h" -#include "log.h" +#include "lib/log.h" #undef u8 #undef u32 diff --git a/fusee/fusee-secondary/src/sdmmc/sdmmc.c b/fusee/fusee-secondary/src/sdmmc/sdmmc.c index e4a59c046..3aeb59f90 100644 --- a/fusee/fusee-secondary/src/sdmmc/sdmmc.c +++ b/fusee/fusee-secondary/src/sdmmc/sdmmc.c @@ -26,7 +26,6 @@ #include "mmc.h" #include "sd.h" #include "../timers.h" -#include "../lib/driver_utils.h" #define UNSTUFF_BITS(resp,start,size) \ ({ \ diff --git a/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c b/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c index 4a19dc718..56602bc49 100644 --- a/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c +++ b/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c @@ -30,8 +30,7 @@ #include "../gpio.h" #include "../pmc.h" #include "../max7762x.h" -#include "../lib/driver_utils.h" -#include "../log.h" +#include "../lib/log.h" static SdmmcLogLevel g_sdmmc_log_level = SDMMC_LOG_NONE; diff --git a/fusee/fusee-secondary/src/utils.c b/fusee/fusee-secondary/src/utils.c index 60bf63920..b74e0163d 100644 --- a/fusee/fusee-secondary/src/utils.c +++ b/fusee/fusee-secondary/src/utils.c @@ -24,7 +24,7 @@ #include "timers.h" #include "btn.h" #include "panic.h" -#include "log.h" +#include "lib/log.h" #include #include