Portduino WIP now compiles but does not link

This commit is contained in:
geeksville
2020-09-05 12:34:48 -07:00
parent 6a475d8288
commit fefd3d78f3
26 changed files with 41 additions and 67 deletions

View File

@@ -15,6 +15,13 @@ class BaseNotifiedWorkerThread : public WorkerThread
*/
virtual void notify(uint32_t v = 0, eNotifyAction action = eNoAction) = 0;
/**
* Notify from an ISR
*
* This must be inline or IRAM_ATTR on ESP32
*/
virtual void notifyFromISR(BaseType_t *highPriWoken, uint32_t v = 0, eNotifyAction action = eNoAction) { notify(v, action); }
protected:
/**
* The notification that was most recently used to wake the thread. Read from loop()

View File

@@ -1,5 +1,4 @@
#include "Thread.h"
#include "timing.h"
#include <assert.h>
namespace concurrency

View File

@@ -2,7 +2,6 @@
#ifdef HAS_FREE_RTOS
#include "timing.h"
#include <assert.h>
#ifdef ARDUINO_ARCH_ESP32

View File

@@ -1,7 +1,6 @@
#include "PeriodicScheduler.h"
#include "PeriodicTask.h"
#include "LockGuard.h"
#include "../timing.h"
namespace concurrency {
@@ -10,7 +9,7 @@ void PeriodicScheduler::loop()
{
LockGuard lg(&lock);
uint32_t now = timing::millis();
uint32_t now = millis();
for (auto t : tasks) {
if (t->period && (now - t->lastMsec) >= t->period) {

View File

@@ -1,7 +1,7 @@
#pragma once
#include <Arduino.h>
#include "PeriodicScheduler.h"
#include "timing.h"
namespace concurrency {
@@ -38,7 +38,7 @@ class PeriodicTask
*/
void setPeriod(uint32_t p)
{
lastMsec = timing::millis(); // reset starting from now
lastMsec = millis(); // reset starting from now
period = p;
}

View File

@@ -1,5 +1,4 @@
#include "WorkerThread.h"
#include "timing.h"
namespace concurrency {
@@ -17,8 +16,8 @@ void WorkerThread::doRun()
#ifdef DEBUG_STACK
static uint32_t lastPrint = 0;
if (timing::millis() - lastPrint > 10 * 1000L) {
lastPrint = timing::millis();
if (millis() - lastPrint > 10 * 1000L) {
lastPrint = millis();
meshtastic::printThreadInfo("net");
}
#endif