****InsoleAppC.nc******
implementation {
components Atm128AdcC as MyADC;
....
InsoleC.Multiple -> MyADC;
InsoleC.Resource -> MyADC.Resource;
....
}
****InsoleC.nc******
module InsoleC {
uses interface Atm128AdcMultiple as Multiple;
.....
}
implementation
{
.....
event void Multiple.dataReady(uint16_t data, bool precise, uint8_t channel, uint8_t *newChannel, uint8_t *newRefVoltage) {
if(precise == TRUE) {
*newChannel = channel+1;
sample[channel + sample_num] = data;
if(channel == 7) {
call Resource.release[1]();
post sendPacket();
}
}
}
......
}
Any help would be great. Also, am I using the correct Module? I'm just getting in to TOS2.x and still a bit unclear on the order of things.
Thanks.
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
