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
[DONE] Interested only at specific flags in a Event [patch]
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Interested only at specific flags in a Event [patch]
Hi,
It is a good idea, it could be eventually added to version 3.0.0. Adding to the TODO.
Giovanni
It is a good idea, it could be eventually added to version 3.0.0. Adding to the TODO.
Giovanni
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] Interested only at specific flags in a Event [pat
Hi,
A bit late but the change has been merged in 3.0, thanks for the idea.
Giovanni
A bit late but the change has been merged in 3.0, thanks for the idea.
Giovanni