Browse Source

refactor: move EspIdfHal.h to src/helpers/radiolib/ per reviewer suggestion

Move the ESP-IDF SPI HAL from the variant-specific directory to the
shared helpers/radiolib/ directory, making it available for reuse by
other ESP32 variants that may need the same SPI workaround.

Addresses feedback from @ripplebiz: 'I'd probably move the IDF Hal to
/src/helpers/radiolib, as it's related only to RadioLib and could
potentially be re-used by other variants'

Also update the include path in target.cpp to use the shared location.
pull/2739/head
c03rad0r 1 month ago
parent
commit
05ad173a05
  1. 0
      src/helpers/radiolib/EspIdfHal.h
  2. 2
      variants/nicerf_lr2021/target.cpp

0
variants/nicerf_lr2021/EspIdfHal.h → src/helpers/radiolib/EspIdfHal.h

2
variants/nicerf_lr2021/target.cpp

@ -8,7 +8,7 @@ NiceRFLR2021Board board;
// your board, define USE_ESPIDF_HAL in platformio.ini to use the ESP-IDF SPI
// HAL workaround (see EspIdfHal.h for details).
#ifdef USE_ESPIDF_HAL
#include "EspIdfHal.h"
#include <helpers/radiolib/EspIdfHal.h>
static EspIdfHal hal(P_LORA_SCLK, P_LORA_MISO, P_LORA_MOSI);
RADIO_CLASS radio(new Module(&hal, P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET,
P_LORA_BUSY));

Loading…
Cancel
Save