77c02d58f8
Now the necessary settings are in adc.h. Refactored to allow repeated ADC reads without reinitialization. Arduino allows setting analogReference, this is now also implemented. ADC is now initialized to sane values in apps/arduino/arduino-process.c dev/arduino/arduino-compat.h now has all hardware independent settings for arduino (some moved from platform/osd-merkur/dev/hw-arduino.h). turnOffPWM re-implemented with hw_timer, removed from wiring_digital.c ADC-specific arduino stuff moved to arduino-compat.h Arduinos wiring_analog no longer necessary. arduino-sketch example now reads analog inputs 1 and 5 using analogRead. |
||
---|---|---|
.. | ||
arduino-process.c | ||
arduino-process.h | ||
Makefile.arduino | ||
Makefile.include | ||
README.md |
Arduino Compatibility
This application contains hardware-independent implementations of arduino compatibilty libraries and include files to be used with contiki.
The whole arduino compatibility library is work in progress. Note that
features having to do with timers like millis
and delay
are
currently untested. In Arduino they use timer 0 of the AVR
microcontroller. It should be investigated to use the hardware timer
already in use by contiki (on the OSD-merkur platform this is currently
timer 5).