ISR to thread
Angelo Fraietta
afraiett at bigpond.net.au
Tue Dec 21 19:00:02 UTC 2004
Steve Holle wrote:
> That's exactly what I was looking for. I think I need an event task
> because I need to read from a queue and send data out in
> synchronization with receiving.
I am using an event. I store my data into a queue. I'll show you the code
Inside My ISR
bool process_required =
pMidiIn[dev_num]->isEmpty();
pMidiIn[dev_num]->DataReady (io_in_data); //
this enques data
if (process_required)
{
pMidiIn[dev_num]->ProcessInputData
(); // this sends the event
}
}//if (pMidiIn[dev_num])
Inside My task
// this gets from the queue
bool data_valid = ReadData(&iodata);
while (data_valid)
{
processData (iodata);
// this gets from the queue
data_valid = ReadData(&iodata);
}
I hope this helps
--
Angelo Fraietta
PO Box 859
Hamilton NSW 2303
Home Page
http://www.users.bigpond.com/angelo_f/
There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
Bernard of Clairvaux (1090 - 1153)
More information about the users
mailing list