mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
Full dashboard - make LEDs and graph overridable
This commit is contained in:
1 parent
364c979a1d
commit
37db92bfc2
7 files changed
+294
-69
No files matched your search
@@ -2,7 +2,6 @@
|
||||
// All rights reserved
|
||||
|
||||
#include "hal.h"
|
||||
#include <string.h>
|
||||
|
||||
static volatile uint64_t s_ticks; // Milliseconds since boot
|
||||
void SysTick_Handler(void) { // SysTick IRQ handler, triggered every 1ms
|
||||
@@ -13,20 +12,6 @@ uint64_t hal_get_tick(void) {
|
||||
return s_ticks;
|
||||
}
|
||||
|
||||
// Mongoose time source, see MG_ENABLE_CUSTOM_MILLIS
|
||||
uint64_t mg_millis(void) {
|
||||
return s_ticks;
|
||||
}
|
||||
|
||||
// Mongoose random source, see MG_ENABLE_CUSTOM_RANDOM
|
||||
bool mg_random(void *buf, size_t len) {
|
||||
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
|
||||
uint32_t r = hal_rng_read();
|
||||
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Avoid pulling printf and friends in through assert()
|
||||
void __assert_func(const char *s, int line, const char *fn, const char *expr) {
|
||||
(void) s, (void) line, (void) fn, (void) expr;
|
||||
|
||||
Reference in new issue
Block a user