new _ASSERT function

This commit is contained in:
Klaus K Wilting committed 2020-10-30 12:24:16 +01:00
1 parent 7330419f5e
commit 5bbe4bee02
12 files changed
+47 -36

No files matched your search

+11
View File
@@ -1,5 +1,6 @@
#ifndef _GLOBALS_H
#define _GLOBALS_H
#endif
// The mother of all embedded development...
#include <Arduino.h>
@@ -49,6 +50,16 @@
(xSemaphoreTake(I2Caccess, pdMS_TO_TICKS(DISPLAYREFRESH_MS)) == pdTRUE)
#define I2C_MUTEX_UNLOCK() (xSemaphoreGive(I2Caccess))
// pseudo system halt function, useful to prevent writeloops to NVRAM
#ifndef _ASSERT
#define _ASSERT(cond) \
if ((cond) == 0) { \
ESP_LOGE(TAG, "FAILURE in %s:%d", __FILE__, __LINE__); \
mask_user_IRQ(); \
for (;;) \
; \
}
enum sendprio_t { prio_low, prio_normal, prio_high };
enum timesource_t { _gps, _rtc, _lora, _unsynced };
+1 -1
View File
@@ -21,4 +21,4 @@
#include "timekeeper.h"
#include "corona.h"
#endif
#endif