Skip to content

Commit

Permalink
0.8.15
Browse files Browse the repository at this point in the history
fix fusion build
  • Loading branch information
lumapu committed Dec 9, 2023
1 parent a91455e commit 379654f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/hm/hmRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "SPI.h"
#include "radio.h"
#include "../config/config.h"
#if defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
#include "nrfHal.h"
#endif

Expand Down Expand Up @@ -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) {
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);
mNrf24 = new RF24(&mNrfHal);
#else
Expand All @@ -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;

#ifdef ESP32
#if !defined(CONFIG_IDF_TARGET_ESP32S3)
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
//
#else
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
mSpi = new SPIClass(HSPI);
#else
mSpi = new SPIClass(VSPI);
Expand Down Expand Up @@ -353,7 +355,7 @@ class HmRadio : public Radio {

SPIClass* mSpi;
RF24 *mNrf24;
#if defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
nrfHal mNrfHal;
#endif
Inverter<> *mLastIv = NULL;
Expand Down
4 changes: 2 additions & 2 deletions src/hms/cmt2300a.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef __CMT2300A_H__
#define __CMT2300A_H__

#if defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(ETHERNET)
#include "cmtHal.h"
#else
#include "esp32_3wSpi.h"
Expand Down Expand Up @@ -480,7 +480,7 @@ class Cmt2300a {
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;
#else
esp32_3wSpi mSpi;
Expand Down

0 comments on commit 379654f

Please sign in to comment.