Bring in a bugfix from 78de2a6322:

Fixed group flags comparison, when waiting on all flags (osFlagsWaitAll).
Previous implementation invokes fail every time, when other flags (those
we don't wait for) are set.  This fix only compares flags specified to
wait for, as API docs suggests.
This commit is contained in:
John Polstra 2021-02-19 10:42:38 -08:00
parent 08376dce1b
commit e9959d45a1

View File

@ -1176,7 +1176,7 @@ uint32_t osEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t opti
rflags = xEventGroupWaitBits (hEventGroup, (EventBits_t)flags, exit_clr, wait_all, (TickType_t)timeout);
if (options & osFlagsWaitAll) {
if (flags != rflags) {
if ((flags & rflags) != flags) {
if (timeout > 0U) {
rflags = (uint32_t)osErrorTimeout;
} else {