I2C Implementation (#84)

This commit is contained in:
Ken Van Hoeylandt
2024-11-24 18:04:57 +01:00
committed by GitHub
parent 881c8517bf
commit d8731eaa17
51 changed files with 936 additions and 433 deletions
+1 -5
View File
@@ -53,11 +53,7 @@ TT_NORETURN void tt_crash_implementation();
* @param optional message (const char*)
*/
#ifdef NDEBUG
#define tt_check(x, ...) if (!(x)) { TT_LOG_E("check", "check failed: %s", #x); }
#else
#define tt_check(x, ...) assert(x)
#endif
#define tt_check(x, ...) if (!(x)) { TT_LOG_E("check", "Failed: %s", #x); };
/** Only in debug build: Assert condition and crash if assert failed */
#ifdef TT_DEBUG
+1 -1
View File
@@ -17,7 +17,7 @@
ESP_LOGI(tag, format, ##__VA_ARGS__)
#define TT_LOG_D(tag, format, ...) \
ESP_LOGD(tag, format, ##__VA_ARGS__)
#define TT_LOG_T(tag, format, ...) \
#define TT_LOG_V(tag, format, ...) \
ESP_LOGV(tag, format, ##__VA_ARGS__)
#else
-1
View File
@@ -36,7 +36,6 @@ Mutex::Mutex(MutexType type) : type(type) {
}
tt_check(semaphore != nullptr);
}
Mutex::~Mutex() {
+1 -1
View File
@@ -27,7 +27,7 @@ private:
SemaphoreHandle_t semaphore;
MutexType type;
public:
Mutex(MutexType type);
explicit Mutex(MutexType type = MutexTypeNormal);
~Mutex();
TtStatus acquire(uint32_t timeout) const;