Page 1 of 1

[DONE] Interested only at specific flags in a Event [patch]

Posted: Sun Feb 23, 2014 9:27 pm
by sam0737
I am on 2.5.2.
I am using chEvtWaitAnyTimeout to wait for serial event and some other application events. For the serial, I am only interested at CHN_CONNECTED | CHN_INPUT_AVAILABLE. I don't want the thread to be waken up by the CHN_OUTPUT_EMPTY.
The problem is exaggerated when combined with Win32's serial_lld.c, because it is polling the queue and raising the event for every tick.

Hence I suggest adding a chEvtRegisterMaskWithFlags(), so application can wait for specific flags it is interested at.

Patch
https://github.com/sam0737/chibios-rt-a ... 765824d33f
https://github.com/sam0737/chibios-rt-a ... b6d0385873

Re: Interested only at specific flags in a Event [patch]

Posted: Sun Feb 23, 2014 10:11 pm
by Giovanni
Hi,

It is a good idea, it could be eventually added to version 3.0.0. Adding to the TODO.

Giovanni

Re: [TODO] Interested only at specific flags in a Event [pat

Posted: Wed Aug 13, 2014 11:29 am
by Giovanni
Hi,

A bit late but the change has been merged in 3.0, thanks for the idea.

Giovanni