From efa55eb5b3d3a4942789bdf397c3a6d6226475d4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 7 Sep 2020 12:57:22 +0200 Subject: Revert "remove external libraries from main branch" This reverts commit 0558244645611f314f47e0fa427f7323ce253eaf. --- src/app/prototest/main.cc | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/app/prototest/main.cc (limited to 'src/app/prototest/main.cc') diff --git a/src/app/prototest/main.cc b/src/app/prototest/main.cc new file mode 100644 index 0000000..7fc897e --- /dev/null +++ b/src/app/prototest/main.cc @@ -0,0 +1,79 @@ +#include "arch.h" +#include "driver/gpio.h" +#include "driver/stdout.h" + +#ifdef PROTOTEST_BENCH_CYCLES +#include "driver/counter.h" +#endif + +#ifdef PROTOTEST_ARDUINOJSON +#include "lib/ArduinoJson.h" +#endif +#ifdef PROTOTEST_BINN +#include "lib/binn.h" +#endif +#ifdef PROTOTEST_CAPNPROTO_C +#include +#include "capnp_c_bench.capnp.h" +#endif +#ifdef PROTOTEST_MANUALJSON +#include "object/stdbuf.h" +#endif +#ifdef PROTOTEST_MODERNJSON +#include "lib/modernjson/json.h" +#endif +#ifdef PROTOTEST_MPACK +#include "mpack.h" +#endif +#ifdef PROTOTEST_NANOPB +#include +#include "nanopbbench.pb.h" +#include +#include +#endif +#ifdef PROTOTEST_UBJSON +#include "ubj.h" +#endif +#ifdef PROTOTEST_XDR +#include "lib/xdr.h" +#endif +#ifdef PROTOTEST_XDR16 +#include "lib/xdr16.h" +#endif + +#include + +#ifdef PROTOTEST_INCLUDE_GLOBAL +#include "prototest_global.cc.inc" +#endif + +void loop(void) +{ + //static uint16_t ts = 0; + //ts++; + +#ifdef PROTOTEST_INCLUDE_LOCAL +#include "prototest_local.cc.inc" +#endif + +} + +int main(void) +{ + arch.setup(); + gpio.setup(); + kout.setup(); + + //gpio.led_on(0); + kout << "Hello, World!" << endl; + +#if defined(PROTOTEST_BENCH_CYCLES) and !defined(PROTOTEST_ARCH_esp8266) + while (1) { + loop(); + } +#else + arch.idle_loop(); +#endif + + return 0; +} -- cgit v1.2.3