Browse Source

0.8.15

fix fusion build
pull/1262/head
lumapu 1 year ago
parent
commit
379654fa51
  1. 12
      src/hm/hmRadio.h
  2. 4
      src/hms/cmt2300a.h

12
src/hm/hmRadio.h

@ -10,7 +10,7 @@
#include "SPI.h" #include "SPI.h"
#include "radio.h" #include "radio.h"
#include "../config/config.h" #include "../config/config.h"
#if defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
#include "nrfHal.h" #include "nrfHal.h"
#endif #endif
@ -40,7 +40,7 @@ class HmRadio : public Radio {
void setup(bool *serialDebug, bool *privacyMode, bool *printWholeTrace, uint8_t irq = IRQ_PIN, uint8_t ce = CE_PIN, uint8_t cs = CS_PIN, uint8_t sclk = SCLK_PIN, uint8_t mosi = MOSI_PIN, uint8_t miso = MISO_PIN) { void setup(bool *serialDebug, bool *privacyMode, bool *printWholeTrace, uint8_t irq = IRQ_PIN, uint8_t ce = CE_PIN, uint8_t cs = CS_PIN, uint8_t sclk = SCLK_PIN, uint8_t mosi = MOSI_PIN, uint8_t miso = MISO_PIN) {
DPRINTLN(DBG_VERBOSE, F("hmRadio.h:setup")); DPRINTLN(DBG_VERBOSE, F("hmRadio.h:setup"));
#if defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
mNrfHal.init(mosi, miso, sclk, cs, ce); mNrfHal.init(mosi, miso, sclk, cs, ce);
mNrf24 = new RF24(&mNrfHal); mNrf24 = new RF24(&mNrfHal);
#else #else
@ -66,8 +66,10 @@ class HmRadio : public Radio {
DTU_RADIO_ID = ((uint64_t)(((mDtuSn >> 24) & 0xFF) | ((mDtuSn >> 8) & 0xFF00) | ((mDtuSn << 8) & 0xFF0000) | ((mDtuSn << 24) & 0xFF000000)) << 8) | 0x01; DTU_RADIO_ID = ((uint64_t)(((mDtuSn >> 24) & 0xFF) | ((mDtuSn >> 8) & 0xFF00) | ((mDtuSn << 8) & 0xFF0000) | ((mDtuSn << 24) & 0xFF000000)) << 8) | 0x01;
#ifdef ESP32 #ifdef ESP32
#if !defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 //
#else
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
mSpi = new SPIClass(HSPI); mSpi = new SPIClass(HSPI);
#else #else
mSpi = new SPIClass(VSPI); mSpi = new SPIClass(VSPI);
@ -353,7 +355,7 @@ class HmRadio : public Radio {
SPIClass* mSpi; SPIClass* mSpi;
RF24 *mNrf24; RF24 *mNrf24;
#if defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
nrfHal mNrfHal; nrfHal mNrfHal;
#endif #endif
Inverter<> *mLastIv = NULL; Inverter<> *mLastIv = NULL;

4
src/hms/cmt2300a.h

@ -6,7 +6,7 @@
#ifndef __CMT2300A_H__ #ifndef __CMT2300A_H__
#define __CMT2300A_H__ #define __CMT2300A_H__
#if defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
#include "cmtHal.h" #include "cmtHal.h"
#else #else
#include "esp32_3wSpi.h" #include "esp32_3wSpi.h"
@ -480,7 +480,7 @@ class Cmt2300a {
return mSpi.readReg(CMT2300A_CUS_MODE_STA) & CMT2300A_MASK_CHIP_MODE_STA; return mSpi.readReg(CMT2300A_CUS_MODE_STA) & CMT2300A_MASK_CHIP_MODE_STA;
} }
#if defined(CONFIG_IDF_TARGET_ESP32S3) #if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
cmtHal mSpi; cmtHal mSpi;
#else #else
esp32_3wSpi mSpi; esp32_3wSpi mSpi;

Loading…
Cancel
Save