[CCC DEV] Concerning commit 6894(ish)

Michael Pirrone-Brusse pirronm at allegheny.edu
Tue Jul 20 01:15:38 BST 2010


Hey hey,

BYTE FUNCTION analogRead(VAL INT pin)

 INT reading.value:

 VALOF

   SEQ

     ... do read via some call to something written previously...

   RESULT reading.value


    That's pretty much exactly what's going on. The call between
your ellipses is
  adc.base (avr.pin, ADC.REF, reading.value)

     The process-oriented PROC that wraps that functionality takes a the
pin, the voltage reference, and a couple channels (a SIGNAL for pinging a
new conversion, and an INT for the output). What I'm trying to do is remove
setting the voltage reference _for_ the ADC call (in wiring's case, this is
analogReference(type)) _from_ the actual conversion call (analogRead(pin)).

    It would be a break from the wiring API to not do that in wiring.module,
but I'm starting to think keeping to the wiring API isn't so much worth it.

    Thanks again,
        -Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.concurrency.cc/pipermail/developers/attachments/20100719/f380bd04/attachment.htm>


More information about the developers mailing list