Add heltec rc32 board
This commit is contained in:
1 parent
3705a7fdd2
commit
0c0965ea3a
10 files changed
+1295
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <driver/rtc_io.h>
|
||||
#include <helpers/ESP32Board.h>
|
||||
#include <helpers/RefCountedDigitalPin.h>
|
||||
|
||||
#ifndef ADC_MULTIPLIER
|
||||
#define ADC_MULTIPLIER 4.9f
|
||||
#endif
|
||||
|
||||
class HeltecRC32Board : public ESP32Board {
|
||||
protected:
|
||||
float adc_mult = ADC_MULTIPLIER;
|
||||
|
||||
public:
|
||||
RefCountedDigitalPin periph_power;
|
||||
RefCountedDigitalPin vext_power;
|
||||
|
||||
HeltecRC32Board() :
|
||||
periph_power(SENSOR_POWER_CTRL_PIN, SENSOR_POWER_ON),
|
||||
vext_power(PIN_VEXT_EN, PIN_VEXT_EN_ACTIVE) { }
|
||||
|
||||
void begin();
|
||||
void onBeforeTransmit() override;
|
||||
void onAfterTransmit() override;
|
||||
void powerOff() override;
|
||||
uint16_t getBattMilliVolts() override;
|
||||
bool setAdcMultiplier(float multiplier) override;
|
||||
float getAdcMultiplier() const override { return adc_mult; }
|
||||
const char* getManufacturerName() const override;
|
||||
};
|
||||
Reference in new issue
Block a user