moving build selection into platformio.ini rather than nasty #defines. thanks to @sensorslot

for the pointer to https://github.com/arendst/Tasmota - where I just borrowed heavily ;-)
This commit is contained in:
geeksville
2020-03-27 13:20:52 -07:00
parent 5c4ae6c042
commit d831beab3d
7 changed files with 53 additions and 46 deletions

View File

@@ -38,7 +38,7 @@
#include <Wire.h>
#include <driver/rtc_io.h>
#ifdef T_BEAM_V10
#ifdef ARDUINO_T_Beam
#include "axp20x.h"
AXP20X_Class axp;
bool pmu_irq = false;
@@ -81,7 +81,7 @@ void scanI2Cdevice(void)
ssd1306_found = true;
DEBUG_MSG("ssd1306 display found\n");
}
#ifdef T_BEAM_V10
#ifdef ARDUINO_T_Beam
if (addr == AXP192_SLAVE_ADDRESS) {
axp192_found = true;
DEBUG_MSG("axp192 PMU found\n");
@@ -108,7 +108,7 @@ void scanI2Cdevice(void)
*/
void axp192Init()
{
#ifdef T_BEAM_V10
#ifdef ARDUINO_T_Beam
if (axp192_found) {
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) {
DEBUG_MSG("AXP192 Begin PASS\n");