Unify bare metal projects

This commit is contained in:
cpq committed 2026-10-11 08:42:00 +01:00
1 parent a9a843d6e2
commit 2b9d805d84
63 files changed
+455 -59

No files matched your search

+6
View File
@@ -3,6 +3,12 @@
#include "hal.h"
// Added to minimise the bin size: avoid pulling printf and friends
void __assert_func(const char *s, int line, const char *fn, const char *expr) {
(void) s, (void) line, (void) fn, (void) expr;
for (;;) (void) 0; // or trigger the fault handler
}
bool hal_timer_expired(volatile uint64_t *t, uint64_t period, uint64_t now) {
uint64_t diff = now - *t; // Wrap-safe elapsed time since last expiry
if (period == 0) return false; // Avoid division by zero