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:
55
external/CMSIS_5/CMSIS/DoxyGen/Driver/src/Flash_Demo.c
vendored
Normal file
55
external/CMSIS_5/CMSIS/DoxyGen/Driver/src/Flash_Demo.c
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "Driver_Flash.h"
|
||||
#include "cmsis_os2.h" // ARM::CMSIS:RTOS2:Keil RTX5
|
||||
|
||||
/* Flash driver instance */
|
||||
extern ARM_DRIVER_FLASH Driver_Flash0;
|
||||
static ARM_DRIVER_FLASH * flashDev = &Driver_Flash0;
|
||||
|
||||
/* CMSIS-RTOS2 Thread Id */
|
||||
osThreadId_t Flash_Thread_Id;
|
||||
|
||||
/* Flash signal event */
|
||||
void Flash_Callback(uint32_t event)
|
||||
{
|
||||
if (event & ARM_FLASH_EVENT_READY) {
|
||||
/* The read/program/erase operation is completed */
|
||||
osThreadFlagsSet(Flash_Thread_Id, 1U);
|
||||
}
|
||||
if (event & ARM_FLASH_EVENT_ERROR) {
|
||||
/* The read/program/erase operation is completed with errors */
|
||||
/* Call debugger or replace with custom error handling */
|
||||
__breakpoint(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* CMSIS-RTOS2 Thread */
|
||||
void Flash_Thread (void *argument)
|
||||
{
|
||||
/* Query drivers capabilities */
|
||||
const ARM_FLASH_CAPABILITIES capabilities = flashDev->GetCapabilities();
|
||||
|
||||
/* Initialize Flash device */
|
||||
if (capabilities.event_ready) {
|
||||
flashDev->Initialize (&Flash_Callback);
|
||||
} else {
|
||||
flashDev->Initialize (NULL);
|
||||
}
|
||||
|
||||
/* Power-on Flash device */
|
||||
flashDev->PowerControl (ARM_POWER_FULL);
|
||||
|
||||
/* Read data taking data_width into account */
|
||||
uint8_t buf[256U];
|
||||
flashDev->ReadData (0x1000U, buf, sizeof(buf)>>capabilities.data_width);
|
||||
|
||||
/* Wait operation to be completed */
|
||||
if (capabilities.event_ready) {
|
||||
osThreadFlagsWait (1U, osFlagsWaitAny, 100U);
|
||||
} else {
|
||||
osDelay(100U);
|
||||
}
|
||||
|
||||
/* Switch off gracefully */
|
||||
flashDev->PowerControl (ARM_POWER_OFF);
|
||||
flashDev->Uninitialize ();
|
||||
}
|
||||
Reference in New Issue
Block a user