big refactoring and features added

This commit is contained in:
Ayzen
2026-04-24 16:51:15 +03:00
parent eafc328caa
commit ea1fbb071d
184 changed files with 35336 additions and 75480 deletions

1416
App/Core/app_core.c Normal file

File diff suppressed because it is too large Load Diff

61
App/Core/app_core.h Normal file
View File

@ -0,0 +1,61 @@
/**
* @file app_core.h
* @brief Top-level application runtime and IRQ entry points.
*/
#ifndef APP_CORE_H
#define APP_CORE_H
#include <stdint.h>
#include "app_types.h"
/**
* @brief Initialise the modular application layer after CubeMX peripherals are ready.
*/
void app_init(void);
/**
* @brief Execute one non-blocking iteration of the top-level application state machine.
*/
void app_run_once(void);
/**
* @brief Post a deferred application event from an ISR, button handler, or future UI backend.
*
* The event is latched and consumed inside `app_run_once()` so hardware-facing
* interrupt adapters stay thin and the main runtime keeps ownership of mode
* transitions and safe-stop sequencing.
*
* @param event Event to enqueue for the application core.
*/
void app_post_event(app_event_t event);
/**
* @brief Forward one raw UART byte into the transport-agnostic protocol parser.
*
* @param byte Newly received UART byte.
*/
void app_on_uart_byte(uint8_t byte);
/**
* @brief Notify the application core about a UART framing/parity/overrun error.
*/
void app_on_uart_error(void);
/**
* @brief Notify the application core about the 10 ms housekeeping tick.
*/
void app_on_tim6_tick(void);
/**
* @brief Notify the application core about the 1 ms timebase tick.
*/
void app_on_tim7_tick(void);
/**
* @brief Notify the application core that the USART DMA transmit finished.
*/
void app_on_dma_tx_complete(void);
#endif /* APP_CORE_H */