I2C Implementation (#84)
This commit is contained in:
committed by
GitHub
parent
881c8517bf
commit
d8731eaa17
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,7 +36,6 @@ Mutex::Mutex(MutexType type) : type(type) {
|
||||
}
|
||||
|
||||
tt_check(semaphore != nullptr);
|
||||
|
||||
}
|
||||
|
||||
Mutex::~Mutex() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user