Hi, Currently I'm using the Atm128AdcC module and I'm a bit confused on how to use the Atm128AdcMultiple interface. How do I set my next conversion to be on another channel? This is what I have so far. I get a conflicting types error message for Multiple.dataReady when I try to compile, have I done somethign wrong in the event?

****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

Reply via email to