From 1eff8fdba8101e13961ddda13f9ef34a2b2c3ba9 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 23 Mar 2023 19:35:51 -0500 Subject: [PATCH] WIP scaffolding --- arch/apollo3/apollo3.ini | 14 ++++++++++++++ src/platform/apollo3/architecture.h | 15 +++++++++++++++ src/platform/apollo3/main-apollo3.cpp | 24 ++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 arch/apollo3/apollo3.ini create mode 100644 src/platform/apollo3/architecture.h create mode 100644 src/platform/apollo3/main-apollo3.cpp diff --git a/arch/apollo3/apollo3.ini b/arch/apollo3/apollo3.ini new file mode 100644 index 0000000000..b9bb36b50d --- /dev/null +++ b/arch/apollo3/apollo3.ini @@ -0,0 +1,14 @@ +[apollo3_base] +platform_packages = platform_packages=framework-arduinoapollo3@https://github.com/sparkfun/Arduino_Apollo3#v2.2.0 +board = RAK11722 +framework = arduino +build_type = debug +build_flags = + ${arduino_base.build_flags} + -Isrc/platform/apollo3 -g +build_src_filter = + ${arduino_base.build_src_filter} - - - - - - - - - - - - - - - +lib_deps = + ${env.lib_deps} +lib_ignore = + mathertel/OneButton@^2.0.3 diff --git a/src/platform/apollo3/architecture.h b/src/platform/apollo3/architecture.h new file mode 100644 index 0000000000..a80dd24d41 --- /dev/null +++ b/src/platform/apollo3/architecture.h @@ -0,0 +1,15 @@ +#pragma once + +#define ARCH_APOLLO3 + +// +// defaults for ARCH_APOLLO3 architecture +// + +// +// set HW_VENDOR +// + +#ifndef HW_VENDOR +#define HW_VENDOR HardwareModel_PRIVATE_HW +#endif diff --git a/src/platform/apollo3/main-apollo3.cpp b/src/platform/apollo3/main-apollo3.cpp new file mode 100644 index 0000000000..31534768d6 --- /dev/null +++ b/src/platform/apollo3/main-apollo3.cpp @@ -0,0 +1,24 @@ +#include "RTC.h" +#include "configuration.h" + +void setBluetoothEnable(bool on) {} + +void playStartMelody() {} + +void updateBatteryLevel(uint8_t level) {} + +void getMacAddr(uint8_t *dmac) +{ + for (int i = 0; i < 6; i++) + dmac[i] = i; +} + +void cpuDeepSleep(uint64_t msecToWake) {} + +/* pacify libc_nano */ +extern "C" { +int _gettimeofday(struct timeval *tv, void *tzvp) +{ + return -1; +} +}