From fb1360cce2404a9907038ade9cb683c5c2e898a1 Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Mon, 6 Jul 2026 03:52:57 +0200 Subject: [PATCH] Replace unreachable RX/TX log EEPROM mapping with documentation comment --- App/app/rxtx_log.c | 6 +----- App/app/rxtx_log.h | 5 ----- App/driver/eeprom_compat.c | 9 ++++++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/App/app/rxtx_log.c b/App/app/rxtx_log.c index 8dbdf1b1..f61532d6 100644 --- a/App/app/rxtx_log.c +++ b/App/app/rxtx_log.c @@ -15,7 +15,6 @@ #include "driver/py25q16.h" #include "driver/st7565.h" #include "external/printf/printf.h" -#include "frequencies.h" #include "misc.h" #include "settings.h" #include "ui/helper.h" @@ -610,7 +609,7 @@ static void RXTX_LOG_AdvanceFlashAddress(void) gNextFlashAddress = RXTX_LOG_FLASH_BASE; } -static uint32_t RXTX_LOG_WriteEntry(const RXTX_LogEntry_t *src) +static void RXTX_LOG_WriteEntry(const RXTX_LogEntry_t *src) { RXTX_LogFlashEntry_t entry; uint8_t commit = RXTX_LOG_ENTRY_COMMIT; @@ -621,12 +620,9 @@ static uint32_t RXTX_LOG_WriteEntry(const RXTX_LogEntry_t *src) RXTX_LOG_PrepareNextSlot(); - const uint32_t address = gNextFlashAddress; PY25Q16_WriteBuffer(gNextFlashAddress, &entry, sizeof(entry), false); PY25Q16_WriteBuffer(gNextFlashAddress + sizeof(entry) - 1u, &commit, 1, false); RXTX_LOG_AdvanceFlashAddress(); - - return address; } static void RXTX_LOG_WriteSessionMarker(void) diff --git a/App/app/rxtx_log.h b/App/app/rxtx_log.h index a0843a43..821995cc 100644 --- a/App/app/rxtx_log.h +++ b/App/app/rxtx_log.h @@ -17,11 +17,6 @@ #define RXTX_LOG_VISIBLE_COUNT 512 -typedef enum { - RXTX_LOG_DIR_RX = 0, - RXTX_LOG_DIR_TX = 1, -} RXTX_LogDirection_t; - // Field order mirrors RXTX_LogFlashEntry_t (rxtx_log.c) so both layouts // match byte-for-byte up to and including flags, copied in one pass. // The channel name is not stored: it is resolved from `channel` at display diff --git a/App/driver/eeprom_compat.c b/App/driver/eeprom_compat.c index ea8139cc..d880e97c 100644 --- a/App/driver/eeprom_compat.c +++ b/App/driver/eeprom_compat.c @@ -73,9 +73,12 @@ static const AddrMapping_t ADDR_MAPPINGS[] = { // [0x08..0x407] 128x64 monochrome bitmap, 1024 Bytes // ST7565-native: 8 pages * 128 columns, column-major LSB-top -#ifdef ENABLE_FEAT_F4HWN_RXTX_LOG - _MK_MAPPING(0x1E0000, 0x00D000, 0x015000), // RX/TX append-only log * 32 KB / 8 sectors -#endif + // Not mapped, for documentation only (the EEPROM API uses 16-bit + // addresses and could not reach a 32 KB window anyway): + // + // 0x1E0000 -> 0x1E8000: RX/TX append-only log * 32 KB / 8 sectors + // (ENABLE_FEAT_F4HWN_RXTX_LOG, accessed directly + // by app/rxtx_log.c, not through this layer) }; static void AddrTranslate(uint16_t EEPROM_Addr, uint16_t Size, uint32_t *PY25Q16_Addr_out, uint16_t *Size_out, bool *End_out);