Skip to content

Commit

Permalink
Esp.h: fix tabs; remove unnecessary trailing ;
Browse files Browse the repository at this point in the history
  • Loading branch information
bxparks committed Nov 2, 2023
1 parent 3c51f6f commit 96e3479
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions cores/epoxy/Esp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 96e3479

Please sign in to comment.