From 939d0df345c99866cfc5d0649178c8e9f19d8fda Mon Sep 17 00:00:00 2001 From: Dual Tachyon Date: Wed, 16 Aug 2023 10:04:06 +0100 Subject: [PATCH] Fixed some warnings from clang's -Weverything. --- driver/backlight.h | 4 ++++ driver/bk4819.c | 3 ++- helper.c | 1 + init.c | 3 +++ overlay.c | 2 ++ scheduler.c | 2 ++ sram-overlay.h | 4 ++-- 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/driver/backlight.h b/driver/backlight.h index 63552e4..1819a24 100644 --- a/driver/backlight.h +++ b/driver/backlight.h @@ -17,6 +17,10 @@ #ifndef DRIVER_BACKLIGHT_H #define DRIVER_BACKLIGHT_H +#include + +extern uint8_t gBacklightCountdown; + void BACKLIGHT_TurnOn(void); #endif diff --git a/driver/bk4819.c b/driver/bk4819.c index 3100152..7b66e4a 100644 --- a/driver/bk4819.c +++ b/driver/bk4819.c @@ -21,7 +21,8 @@ #include "driver/system.h" #include "driver/systick.h" -uint16_t gBK4819_GpioOutState; +static uint16_t gBK4819_GpioOutState; + bool gThisCanEnable_BK4819_Rxon; void BK4819_Init(void) diff --git a/helper.c b/helper.c index 29aa1b2..918441c 100644 --- a/helper.c +++ b/helper.c @@ -21,6 +21,7 @@ #include "driver/gpio.h" #include "driver/system.h" #include "gui.h" +#include "helper.h" #include "misc.h" #include "radio.h" #include "settings.h" diff --git a/init.c b/init.c index ac50368..04e6f3f 100644 --- a/init.c +++ b/init.c @@ -25,6 +25,9 @@ extern uint8_t _sdata[]; extern uint8_t _sidata_end__[]; extern uint8_t _edata[]; +void BSS_Init(void); +void DATA_Init(void); + void BSS_Init(void) { uint8_t *pBss; diff --git a/overlay.c b/overlay.c index 49c556a..b14d622 100644 --- a/overlay.c +++ b/overlay.c @@ -27,6 +27,8 @@ extern uint8_t overlay_data_end[]; extern const uint8_t sram_overlay_bin[]; +void OVERLAY_Install(void); + void OVERLAY_Install(void) { uint8_t *pStart; diff --git a/scheduler.c b/scheduler.c index 125c367..35671f8 100644 --- a/scheduler.c +++ b/scheduler.c @@ -23,6 +23,8 @@ static volatile uint32_t gGlobalSysTickCounter; +void SystickHandler(void); + void SystickHandler(void) { gGlobalSysTickCounter++; diff --git a/sram-overlay.h b/sram-overlay.h index c2d45b8..d12f23a 100644 --- a/sram-overlay.h +++ b/sram-overlay.h @@ -37,13 +37,13 @@ void overlay_FLASH_Lock(void); void overlay_FLASH_Unlock(void); uint32_t overlay_FLASH_ReadByAHB(uint32_t Offset); uint32_t overlay_FLASH_ReadByAPB(uint32_t Offset); -void overlay_FLASH_Set_NVR_SEL(FLASH_AREA Area); +void overlay_FLASH_SetArea(FLASH_AREA Area); void overlay_FLASH_SetReadMode(FLASH_READ_MODE Mode); void overlay_FLASH_SetEraseTime(void); void overlay_FLASH_WakeFromDeepSleep(void); void overlay_FLASH_SetMode(FLASH_MODE Mode); void overlay_FLASH_SetProgramTime(void); -void overlay_SystemReset(void); +void overlay_SystemReset(void) __attribute__((noreturn)); uint32_t overlay_FLASH_ReadNvrWord(uint32_t Offset); void overlay_FLASH_ConfigureTrimValues(void);