chore: beautify MutexLock, add example code and prevent wrong usage (#6756)
This commit is contained in:
@@ -55,7 +55,7 @@ static I2C_HandleTypeDef* i2c_get_handle(uint8_t bus)
|
||||
}
|
||||
|
||||
#if !defined(BOOT)
|
||||
#define I2CMutex(bus) MutexLock mutexLock(&i2c_get_device(bus)->mutex)
|
||||
#define I2CMutex(bus) MutexLock mutexLock = MutexLock::MakeInstance(&i2c_get_device(bus)->mutex)
|
||||
#else
|
||||
#define I2CMutex(bus)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user