UA1ZBE Custom Firmware v1.0
Features: - VFO mode with direct frequency input - POCSAG decoder (512/1200 baud) with BCH(31,21) correction - Full-screen Spectrum analyzer - FM Radio receiver - RSSI signal indicator overlay - Custom boot splash (UA1ZBE / POCSAG pager / build date) Architecture: - app/mode.c — mode dispatcher (VFO/POCSAG/Spectrum/FM) - app/boot_splash.c — 2-second boot splash - app/pocsag/ — POCSAG decoder + BCH correction - app/display_rssi.c — RSSI indicator - main.c — entry point with custom init - syscalls.c — bare-metal _sbrk stub Build: arm-none-eabi-gcc -Os -flto -Wall -Werror -Wextra Size: 57.9KB Flash / 3.6KB RAM Controls: - 0-9: Direct frequency input (VFO) - SK2: POCSAG mode - SK1: Spectrum analyzer - 0: FM Radio - EXIT: Return to VFO - F/*: Toggle 512/1200 baud (in POCSAG)
This commit is contained in:
53
app/boot_splash.c
Normal file
53
app/boot_splash.c
Normal file
@@ -0,0 +1,53 @@
|
||||
/* UA1ZBE Custom Firmware - Boot Splash Screen
|
||||
* Displays:
|
||||
* Line 1 (top, large): UA1ZBE
|
||||
* Line 2 (center): POCSAG pager
|
||||
* Line 3 (bottom): YYYY-MM-DD (build date)
|
||||
* Then fades to VFO mode after 2 seconds.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "driver/st7565.h"
|
||||
#include "driver/system.h"
|
||||
#include "ui/helper.h"
|
||||
#include "font.h"
|
||||
|
||||
#ifndef BUILD_DATE
|
||||
#define BUILD_DATE "unknown"
|
||||
#endif
|
||||
|
||||
void BOOT_SplashShow(void)
|
||||
{
|
||||
/* Clear screen */
|
||||
ST7565_FillScreen(0x00);
|
||||
memset(gStatusLine, 0, sizeof(gStatusLine));
|
||||
for (int line = 0; line < FRAME_LINES; line++)
|
||||
memset(gFrameBuffer[line], 0, LCD_WIDTH);
|
||||
|
||||
/* Line 1: UA1ZBE — large font, centered, top */
|
||||
UI_PrintString("UA1ZBE", 0, LCD_WIDTH, 0, 12);
|
||||
|
||||
/* Line 2: "POCSAG pager" — small font, centered */
|
||||
/* Small font is 6 pixels tall, at y-offset line 3 (~24px) */
|
||||
const char *line2 = "POCSAG pager";
|
||||
int len2 = 0;
|
||||
while (line2[len2]) len2++;
|
||||
int x2 = (LCD_WIDTH - len2 * 6) / 2;
|
||||
if (x2 < 0) x2 = 0;
|
||||
UI_PrintStringSmallNormal(line2, x2, LCD_WIDTH, 24);
|
||||
|
||||
/* Line 3: BUILD_DATE — small font, centered, bottom */
|
||||
const char *date_str = BUILD_DATE;
|
||||
int len3 = 0;
|
||||
while (date_str[len3]) len3++;
|
||||
int x3 = (LCD_WIDTH - len3 * 6) / 2;
|
||||
if (x3 < 0) x3 = 0;
|
||||
UI_PrintStringSmallNormal(date_str, x3, LCD_WIDTH, 48);
|
||||
|
||||
/* Blit to screen */
|
||||
ST7565_BlitStatusLine();
|
||||
ST7565_BlitFullScreen();
|
||||
|
||||
/* Hold for 2 seconds */
|
||||
SYSTEM_DelayMs(2000);
|
||||
}
|
||||
Reference in New Issue
Block a user