From 006081900238dbbff8dd472d72e49e0413a45bc9 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 6 Sep 2018 12:52:16 +0000 Subject: Fixed bug #977. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12242 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/rt/src/chevents.c | 4 ++-- readme.txt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/os/rt/src/chevents.c b/os/rt/src/chevents.c index 0f41699cf..3286c5f94 100644 --- a/os/rt/src/chevents.c +++ b/os/rt/src/chevents.c @@ -333,7 +333,7 @@ void chEvtBroadcastFlags(event_source_t *esp, eventflags_t flags) { } /** - * @brief Returns the flags associated to an @p event_listener_t. + * @brief Returns the unmasked flags associated to an @p event_listener_t. * @details The flags are returned and the @p event_listener_t flags mask is * cleared. * @@ -349,7 +349,7 @@ eventflags_t chEvtGetAndClearFlagsI(event_listener_t *elp) { flags = elp->flags; elp->flags = (eventflags_t)0; - return flags; + return flags & elp->wflags; } /** diff --git a/readme.txt b/readme.txt index e2cdcce56..031071bc4 100644 --- a/readme.txt +++ b/readme.txt @@ -141,6 +141,8 @@ - EX: Updated LIS302DL to 1.1.0 (backported to 18.2.1). - EX: Updated LPS25H to 1.1.0 (backported to 18.2.1). - EX: Updated LSM303DLHC to 1.1.0 (backported to 18.2.1). +- RT: Fixed chEvtGetAndClearFlags(...) does not mask events (bug #977) + (backported to 18.2.2 and 17.6.5). - HAL: Fixed HAL channels chnControl() macro broken (bug #976) (backported to 18.2.2). - OTH: Fixed wrong timeout handling in CMSIS OS layer (bug #975) -- cgit v1.2.3