4 Threads of: (each with its own ADC)
Code: Select all
void processingThread(chanend usb) {
char data[2];
int ii;
//read data and store
for (ii = 0; ii < 4; ii++) {
//process each pair and store. Each result is an int
}
for (ii = 0; ii < 4; ii++)
{
usb <: (d); //send each int out
}
}
Code: Select all
int i = 0;
int ii = 0;
long d;
t :> start;
for (i = 0; i < 1; i++) {
for (ii = 0; ii < 4; ii++) {
dataIn [ii] :> d; //read in the data. This is what is slow.
}
}
}