fix multithread logic in template app, update gpio HAL (#250)
* fix multithread logic * more buffer for dallas id string * update apps to use new logic * delay_us small speedup * add consant qualifier to gpio records and some core api * fix some apps to use simpler method of getting gpio record * fix ibutton app, stupid stack problem
This commit is contained in:
@@ -33,7 +33,7 @@ void* acquire_mutex(ValueMutex* valuemutex, uint32_t timeout) {
|
||||
}
|
||||
}
|
||||
|
||||
bool release_mutex(ValueMutex* valuemutex, void* value) {
|
||||
bool release_mutex(ValueMutex* valuemutex, const void* value) {
|
||||
if(value != valuemutex->value) return false;
|
||||
|
||||
if(osMutexRelease(valuemutex->mutex) != osOK) return false;
|
||||
|
@@ -58,7 +58,7 @@ static inline void* acquire_mutex_block(ValueMutex* valuemutex) {
|
||||
Release mutex after end of work with data.
|
||||
Call `release_mutex` and pass ValueData instance and pointer to data.
|
||||
*/
|
||||
bool release_mutex(ValueMutex* valuemutex, void* value);
|
||||
bool release_mutex(ValueMutex* valuemutex, const void* value);
|
||||
|
||||
/*
|
||||
Instead of take-access-give sequence you can use `read_mutex` and `write_mutex` functions.
|
||||
|
Reference in New Issue
Block a user