[DONE] Interested only at specific flags in a Event [patch]
Posted: Sun Feb 23, 2014 9:27 pm
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
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