From 96e347912491e10e583df307ac64acdac3e12719 Mon Sep 17 00:00:00 2001 From: Brian Park Date: Thu, 2 Nov 2023 10:11:43 -0700 Subject: [PATCH] Esp.h: fix tabs; remove unnecessary trailing ; --- cores/epoxy/Esp.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cores/epoxy/Esp.h b/cores/epoxy/Esp.h index a70f71b..1745301 100644 --- a/cores/epoxy/Esp.h +++ b/cores/epoxy/Esp.h @@ -8,35 +8,35 @@ class EspClass { - public: - EspClass() { + public: + EspClass() { gettimeofday(&start, NULL); } - void reset() {}; + void reset() {} - void restart() {}; + void restart() {} - // Very ugly approximation, this is freeStack - unsigned long getFreeHeap() { + // Very ugly approximation, this is freeStack + unsigned long getFreeHeap() { int i; static int* h=40000+&i; return h-&i; } - uint32_t getCpuFreqMHZ() { return 80; } + uint32_t getCpuFreqMHZ() { return 80; } - uint32_t getChipId() { return 0; } + uint32_t getChipId() { return 0; } - uint32_t getCycleCount() { - struct timeval now; - gettimeofday(&now, NULL); - return getCpuFreqMHZ() + uint32_t getCycleCount() { + struct timeval now; + gettimeofday(&now, NULL); + return getCpuFreqMHZ() * ((now.tv_sec-start.tv_sec)*1000000+(now.tv_usec-start.tv_usec)); - } + } - private: - struct timeval start; + private: + struct timeval start; }; class Serial_ : public Stream