From a08ae9e31873a094a5e7d47ae8cfd2edfe6a60a4 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sat, 28 Jan 2023 23:35:59 +0100 Subject: Add led blips for warnings and on startup --- src/util.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 8b33e2c..74e1997 100644 --- a/src/util.h +++ b/src/util.h @@ -1,6 +1,7 @@ #pragma once #include "ws2812.h" +#include "led.h" #include #include @@ -13,7 +14,7 @@ #define INFO(...) stdio_log(LOG_INFO, "INFO : " __VA_ARGS__) #define DEBUG(...) stdio_log(LOG_DEBUG, "DEBUG: " __VA_ARGS__) -#define PANIC(...) blink_panic(200, WS2812_U32RGB(255, 0, 0), __VA_ARGS__); +#define PANIC(...) blink_panic(200, HARD_RED, __VA_ARGS__); #define ASSERT(cond) do { \ if (!(cond)) PANIC("Assertion failed: (%s) in %s:%i", \ #cond, __FILE__, __LINE__); \ @@ -36,4 +37,5 @@ void stdio_log(int loglevel, const char *fmtstr, ...); void blink_panic(uint32_t blink_ms, uint32_t rgb, const char *fmtstr, ...); +extern char warnlog[]; extern int loglevel; -- cgit v1.2.3-71-gd317