SPI HAL implemented and more (#207)
- Cleanup unused code and move ISR/IRQ checks to `Kernel.h` - Improve clang-format - Fix for LVGL lock transfer: ensure lock isn't activate when changing the lock - Implement SPI HAL - Remove `initHardware` HAL configuration entry - Fix `I2cScanner`: don't scan when port isn't started
This commit is contained in:
committed by
GitHub
parent
88b3bfbe3e
commit
c1f55429b6
@@ -39,7 +39,7 @@ Mutex::Mutex(Type type) : handle(createSemaphoreHandle(type)), type(type) {
|
||||
}
|
||||
|
||||
bool Mutex::lock(TickType_t timeout) const {
|
||||
assert(!TT_IS_IRQ_MODE());
|
||||
assert(!kernel::isIsr());
|
||||
assert(handle != nullptr);
|
||||
tt_mutex_info(mutex, "acquire");
|
||||
|
||||
@@ -54,7 +54,7 @@ bool Mutex::lock(TickType_t timeout) const {
|
||||
}
|
||||
|
||||
bool Mutex::unlock() const {
|
||||
assert(!TT_IS_IRQ_MODE());
|
||||
assert(!kernel::isIsr());
|
||||
assert(handle != nullptr);
|
||||
tt_mutex_info(mutex, "release");
|
||||
|
||||
@@ -69,7 +69,7 @@ bool Mutex::unlock() const {
|
||||
}
|
||||
|
||||
ThreadId Mutex::getOwner() const {
|
||||
assert(!TT_IS_IRQ_MODE());
|
||||
assert(!kernel::isIsr());
|
||||
assert(handle != nullptr);
|
||||
return (ThreadId)xSemaphoreGetMutexHolder(handle.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user