mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-10-02 05:59:45 +02:00
Update README.md
This commit is contained in:
1 parent
35eacd2c0e
commit
b3e0a05ade
24 files changed
+56
-118
No files matched your search
@@ -31,6 +31,9 @@
|
||||
#ifndef CONSOLE_H
|
||||
#define CONSOLE_H
|
||||
|
||||
#include "grid.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/**
|
||||
* @brief Print the response controller's boot identity and unconditional signal line.
|
||||
*
|
||||
@@ -40,7 +43,14 @@
|
||||
* @param None.
|
||||
* @return None.
|
||||
*/
|
||||
void print_boot_banner(void);
|
||||
static inline void print_boot_banner(void)
|
||||
{
|
||||
printf("GLOBAL EMBEDDED RESPONSE NETWORK\r\n");
|
||||
printf("BLACK START WINDOW: 27 MINUTES\r\n");
|
||||
printf("UART0 115200 8N1 | AUTHORIZED LAB CONSOLE\r\n");
|
||||
printf("SIGNAL: NORMAL\r\n");
|
||||
printf("RESPONSE> ");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Print the recurring grid classification and dispatch authorization report.
|
||||
@@ -51,6 +61,12 @@ void print_boot_banner(void);
|
||||
* @param None.
|
||||
* @return None.
|
||||
*/
|
||||
void print_status(void);
|
||||
static inline void print_status(void)
|
||||
{
|
||||
printf("GRID STATUS: %s\r\n", operator_state ? "STABLE" : "CRITICAL");
|
||||
printf("DISPATCH PATH: %s\r\n", dispatch_state ? "AUTHORIZED" : "HELD");
|
||||
printf("LAST FRAME: QUARANTINED\r\n");
|
||||
printf("RESPONSE> ");
|
||||
}
|
||||
|
||||
#endif // CONSOLE_H
|
||||
@@ -46,6 +46,22 @@ extern volatile uint32_t operator_state;
|
||||
// Automated dispatch authorization decision (drives DISPATCH PATH).
|
||||
extern volatile uint32_t dispatch_state;
|
||||
|
||||
// Quarantined black-start authorization frame, retained in flash, never sent.
|
||||
static volatile const char dispatch_frame[] =
|
||||
"WORLDGRID:BLACKSTART:GRID-7:WATER-3";
|
||||
|
||||
static inline void retain_dispatch_frame(void)
|
||||
{
|
||||
volatile char frame_marker = dispatch_frame[0];
|
||||
(void)frame_marker;
|
||||
}
|
||||
|
||||
static inline void evaluate_grid(void)
|
||||
{
|
||||
operator_state = (grid_deviation < SAFE_THRESHOLD) ? 1 : 0;
|
||||
dispatch_state = (grid_deviation < SAFE_THRESHOLD) ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Anchor the hidden dispatch frame in flash without transmitting it.
|
||||
*
|
||||
@@ -56,8 +72,6 @@ extern volatile uint32_t dispatch_state;
|
||||
* @param None.
|
||||
* @return None.
|
||||
*/
|
||||
void retain_dispatch_frame(void);
|
||||
|
||||
/**
|
||||
* @brief Classify the frozen telemetry reading against the compiled threshold.
|
||||
*
|
||||
@@ -68,6 +82,4 @@ void retain_dispatch_frame(void);
|
||||
* @param None.
|
||||
* @return None.
|
||||
*/
|
||||
void evaluate_grid(void);
|
||||
|
||||
#endif // GRID_H
|
||||
Reference in new issue
Block a user