40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <MeshCore.h>
|
|
#include <Arduino.h>
|
|
#include <helpers/NRF52Board.h>
|
|
#include <helpers/RefCountedDigitalPin.h>
|
|
#include <helpers/KeyValueStore.h>
|
|
#include "LoRaFEMControl.h"
|
|
|
|
class T096Board : public NRF52BoardDCDC {
|
|
KeyValueStore* _prefs = NULL;
|
|
|
|
protected:
|
|
#ifdef NRF52_POWER_MANAGEMENT
|
|
void initiateShutdown(uint8_t reason) override;
|
|
#endif
|
|
void variant_shutdown();
|
|
|
|
public:
|
|
RefCountedDigitalPin periph_power;
|
|
LoRaFEMControl loRaFEMControl;
|
|
|
|
T096Board() :periph_power(PIN_VEXT_EN,PIN_VEXT_EN_ACTIVE), NRF52Board("T096_OTA") {}
|
|
void begin();
|
|
void attachDynamicPrefs(KeyValueStore* prefs);
|
|
bool handleCommand(const char* command, uint32_t sender_timestamp, char* reply) override;
|
|
|
|
void onBeforeTransmit(void) override;
|
|
void onAfterTransmit(void) override;
|
|
uint16_t getBattMilliVolts() override;
|
|
const char* getManufacturerName() const override ;
|
|
void shutdownPeripherals() override;
|
|
bool setLoRaFemLnaEnabled(bool enable) override;
|
|
bool canControlLoRaFemLna() const override;
|
|
bool isLoRaFemLnaEnabled() const override;
|
|
// KCT8103L TX has no populated bypass path on T096. CSD shuts down the
|
|
// whole FEM, so the PA is always used when this board transmits.
|
|
bool isLoRaFemPaGainEnabled() const override { return true; }
|
|
};
|