diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-01-28 23:35:59 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-01-28 23:35:59 +0100 |
| commit | a08ae9e31873a094a5e7d47ae8cfd2edfe6a60a4 (patch) | |
| tree | 9c9075631e97c21e255c3f964072fc2da412440b /src/util.h | |
| parent | c70a527d0418b4f32437873f682680f451fa4fb8 (diff) | |
| download | sxkbd-a08ae9e31873a094a5e7d47ae8cfd2edfe6a60a4.tar.gz sxkbd-a08ae9e31873a094a5e7d47ae8cfd2edfe6a60a4.zip | |
Add led blips for warnings and on startup
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,7 @@ #pragma once #include "ws2812.h" +#include "led.h" #include <stdbool.h> #include <stdint.h> @@ -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; |
