stub classes implementing basic arduino/teensy functions for compiling and debuging on your x86/x64 architecture
sd | audio | st7735 | midi | bounce2 | encoder
#include <Arduino.h>
IntervalTimer myTimer;
void blinkLED() {
Serial.printf("BLINK %d\n", 1000);
}
int main(int argc, char **argv){
initialize_mock_arduino();
myTimer.begin(blinkLED, 250000);
delay(1000000);
}
- using macro from cmake-declare-and-fetch
project(thing C CXX)
include(cmake_declare_and_fetch.cmake.in)
DeclareAndFetch(teensy_x86_stubs https://github.com/newdigate/teensy-x86-stubs.git main src)
add_executable(thing main.cpp)
target_link_libraries(thing teensy_x86_stubs)
git clone https://github.com/newdigate/teensy-x86-stubs.git
cd teensy-x86-stubs
mkdir cmake-build-debug
cd cmake-build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
- to initialize the arduino timing library so that millis() will return the duration in milliseconds since the test app has been runnning
initialize_mock_arduino()
- simial to maniacbug/ncore
- Don't Run Unit Tests on the Arduino Device or Emulator
- stackoverflow 11437456
- includes code from IronSavior/dsm2_tx
- cmake uninstaller
Unless specified in source code file, all code is MIT license.