From afa3635e55b8ae8a492a99c4464026f70590eae3 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Fri, 17 Sep 2021 16:32:29 +0200 Subject: [PATCH] Add stm32f7 --- src/dev/device.h | 6 +++++- src/dev/stm32f7/stm32f7.cpp | 5 +++++ src/dev/stm32f7/stm32f7.h | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/dev/device.h b/src/dev/device.h index 10f541f8..cd9f25d7 100644 --- a/src/dev/device.h +++ b/src/dev/device.h @@ -109,6 +109,10 @@ class BaseDevice { {} virtual void get_sensors(JsonDocument& doc) {} + virtual long get_uptime() + { + return 0; + } virtual bool is_system_pin(uint8_t pin) { return false; @@ -137,7 +141,7 @@ class BaseDevice { // #warning Building for STM32F4xx Devices #include "stm32f4/stm32f4.h" #elif defined(STM32F7) -#warning Building for STM32F7xx Devices +//#warning Building for STM32F7xx Devices #include "stm32f7/stm32f7.h" #elif defined(WINDOWS) // #warning Building for Win32 Devices diff --git a/src/dev/stm32f7/stm32f7.cpp b/src/dev/stm32f7/stm32f7.cpp index 97294c79..028dc6a1 100644 --- a/src/dev/stm32f7/stm32f7.cpp +++ b/src/dev/stm32f7/stm32f7.cpp @@ -12,6 +12,11 @@ #define BACKLIGHT_CHANNEL 0 +int _gettimeofday(struct timeval *tv, struct timezone *tz) +{ + return 0; +} + namespace dev { void Stm32f7Device::reboot() diff --git a/src/dev/stm32f7/stm32f7.h b/src/dev/stm32f7/stm32f7.h index ebe7f11c..dfbc6ad1 100644 --- a/src/dev/stm32f7/stm32f7.h +++ b/src/dev/stm32f7/stm32f7.h @@ -8,6 +8,9 @@ #include "dev/device.h" #if defined(STM32F7xx) +extern "C" { + int _gettimeofday(struct timeval *tv, struct timezone *tz); +} namespace dev {