EmbeddedRelated.com
Forums

Re: LPCusb with crossworks

Started by pete...@esysr.com November 22, 2008
--- In l..., 42Bastian wrote:
>
> mjames_doveridge schrieb:
>
> > I had forgotten about events:(
> >
> > I have not used them in my project because the events have no count.
> > Without a count, there can be conditions where an event is signaled
> > twice before the handling thread runs and so one signal gets lost.
>
> Use (direct) message passing :-) instead of events.
> http://www.google.de/search?q=direct+message+passing
>

Yup - that's what I do. Every time an ISR or another thread queues a
message object, I send a unit to the semaphore. This ensures that all
requested signals get serviced. If the thread ever runs and finds
nothing to do in the various queues, I know there is an error :)

Rgds,
Martin

An Engineer's Guide to the LPC2100 Series