mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
use my Timer class on all platforms, it works better than the freertos version
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "PeriodicTask.h"
|
||||
#include "RadioInterface.h"
|
||||
|
||||
#include <RadioLib.h>
|
||||
@@ -11,13 +12,12 @@
|
||||
#define INTERRUPT_ATTR
|
||||
#endif
|
||||
|
||||
class RadioLibInterface : public RadioInterface
|
||||
class RadioLibInterface : public RadioInterface, private PeriodicTask
|
||||
{
|
||||
/// Used as our notification from the ISR
|
||||
enum PendingISR { ISR_NONE = 0, ISR_RX, ISR_TX, TRANSMIT_DELAY_COMPLETED };
|
||||
|
||||
volatile PendingISR pending = ISR_NONE;
|
||||
volatile bool timerRunning = false;
|
||||
|
||||
/**
|
||||
* Raw ISR handler that just calls our polymorphic method
|
||||
@@ -104,7 +104,14 @@ class RadioLibInterface : public RadioInterface
|
||||
|
||||
static void timerCallback(void *p1, uint32_t p2);
|
||||
|
||||
virtual void doTask();
|
||||
|
||||
protected:
|
||||
/// Initialise the Driver transport hardware and software.
|
||||
/// Make sure the Driver is properly configured before calling init().
|
||||
/// \return true if initialisation succeeded.
|
||||
virtual bool init();
|
||||
|
||||
/**
|
||||
* Convert our modemConfig enum into wf, sf, etc...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user