c46d6afa39
New discovery: Contiki also uses timer 0. With almost the same interface as Arduino. So we now completely get rid of wiring.c (only the main file, the other wiring_xxx stay) and implement Arduino timer, delay, etc in terms of the corresponding Contiki routines. Verified that now delay works as expected. The LED in examples/osd/arduino-sketch blinks! Before this, the arduino_init routine in wiring.c destroyed the timer-0 initialization of contiki, making both, contiki timer implementation *and* contiki timer implementation fail if the arduino_init routine was called. Now both work. Squashed with following bug-fix commit. |
||
---|---|---|
.. | ||
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).