mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 09:16:01 +03:00
Fix tests
This commit is contained in:
parent
eb2b9d7947
commit
36b06a23c5
1 changed files with 5 additions and 0 deletions
|
@ -44,5 +44,10 @@ static inline uint8_t __basepriSetMemRetVal(uint8_t prio)
|
|||
|
||||
// Run block with elevated BASEPRI (using BASEPRI_MAX), restoring BASEPRI on exit. All exit paths are handled
|
||||
// Full memory barrier is placed at start and exit of block
|
||||
#ifdef UNIT_TEST
|
||||
#define ATOMIC_BLOCK(prio) {}
|
||||
#else
|
||||
#define ATOMIC_BLOCK(prio) for ( uint8_t __basepri_save __attribute__((__cleanup__(__basepriRestoreMem))) = __get_BASEPRI(), \
|
||||
__ToDo = __basepriSetMemRetVal((prio) << (8U - __NVIC_PRIO_BITS)); __ToDo ; __ToDo = 0 )
|
||||
|
||||
#endif // UNIT_TEST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue