Skip to content

Commit

Permalink
[HAL] HALs in src (#1281)
Browse files Browse the repository at this point in the history
* [HAL] Move HALs to src

* [CI] Temporarily drop unofficial STM32 (package down)

* [LR11x0] Fix ambiguous call

* [CI] Return Maple mini back to build matrix
  • Loading branch information
jgromes authored Oct 20, 2024
1 parent a525d45 commit 9e7c012
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion examples/NonArduino/ESP-IDF/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <RadioLib.h>

// include the hardware abstraction layer
#include "EspHal.h"
#include "hal/ESP-IDF/EspHal.h"

// create a new instance of the HAL class
EspHal* hal = new EspHal(5, 19, 27);
Expand Down
2 changes: 1 addition & 1 deletion examples/NonArduino/Pico/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <RadioLib.h>

// include the hardware abstraction layer
#include "PicoHal.h"
#include "hal/RPiPico/PicoHal.h"

// create a new instance of the HAL class
PicoHal* hal = new PicoHal(SPI_PORT, SPI_MISO, SPI_MOSI, SPI_SCK);
Expand Down
2 changes: 1 addition & 1 deletion examples/NonArduino/Raspberry/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <RadioLib.h>

// include the hardware abstraction layer
#include "PiHal.h"
#include "hal/RPi/PiHal.h"

// create a new instance of the HAL class
// use SPI channel 1, because on Waveshare LoRaWAN Hat,
Expand Down
2 changes: 1 addition & 1 deletion examples/NonArduino/Tock/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <RadioLib.h>

// include the hardware abstraction layer
#include "libtockHal.h"
#include "hal/Tock/libtockHal.h"

// the entry point for the program
int main(void) {
Expand Down
2 changes: 1 addition & 1 deletion src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string.h>

#if defined(RADIOLIB_BUILD_ARDUINO)
#include "ArduinoHal.h"
#include "hal/Arduino/ArduinoHal.h"

Module::Module(uint32_t cs, uint32_t irq, uint32_t rst, uint32_t gpio) : csPin(cs), irqPin(irq), rstPin(rst), gpioPin(gpio) {
this->hal = new ArduinoHal();
Expand Down
2 changes: 1 addition & 1 deletion src/RadioLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include "Hal.h"
#if defined(RADIOLIB_BUILD_ARDUINO)
#include "ArduinoHal.h"
#include "hal/Arduino/ArduinoHal.h"
#endif


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion src/modules/LR11x0/LR11x0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3601,7 +3601,9 @@ int16_t LR11x0::gnssWriteBitMaskSatActivated(uint8_t bitMask, uint32_t* bitMaskA
void LR11x0::gnssAbort() {
// send the abort signal (single NOP)
this->mod->spiConfig.widths[RADIOLIB_MODULE_SPI_WIDTH_CMD] = Module::BITS_8;
this->mod->SPIwriteStream(RADIOLIB_LR11X0_CMD_NOP, NULL, 0, false, false);
// we need to call the most basic overload of the SPI write method otherwise the call will be ambiguous
uint8_t cmd[2] = { 0, 0 };
this->mod->SPIwriteStream(cmd, 2, NULL, 0, false, false);
this->mod->spiConfig.widths[RADIOLIB_MODULE_SPI_WIDTH_CMD] = Module::BITS_16;

// wait for at least 2.9 seconds as specified by the user manual
Expand Down
2 changes: 1 addition & 1 deletion src/modules/SX126x/STM32WLx_Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This file is licensed under the MIT License: https://opensource.org/licenses/MIT

#if !RADIOLIB_EXCLUDE_STM32WLX

#include "../../ArduinoHal.h"
#include "hal/Arduino/ArduinoHal.h"

// This defines some dummy pin numbers (starting at NUM_DIGITAL_PINS to
// guarantee these are not valid regular pin numbers) that can be passed
Expand Down
3 changes: 0 additions & 3 deletions src/protocols/BellModem/BellModem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "../../TypeDef.h"
#include "../../Module.h"
#if defined(RADIOLIB_BUILD_ARDUINO)
#include "../../ArduinoHal.h"
#endif

#if !RADIOLIB_EXCLUDE_BELL

Expand Down
3 changes: 0 additions & 3 deletions src/protocols/ExternalRadio/ExternalRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "../../TypeDef.h"
#include "../../Module.h"
#if defined(RADIOLIB_BUILD_ARDUINO)
#include "../../ArduinoHal.h"
#endif

#include "../PhysicalLayer/PhysicalLayer.h"

Expand Down
3 changes: 0 additions & 3 deletions src/utils/CRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "../TypeDef.h"
#include "../Module.h"
#if defined(RADIOLIB_BUILD_ARDUINO)
#include "../ArduinoHal.h"
#endif

// CCITT CRC properties (used by AX.25)
#define RADIOLIB_CRC_CCITT_POLY (0x1021)
Expand Down
3 changes: 0 additions & 3 deletions src/utils/FEC.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "../TypeDef.h"
#include "../Module.h"
#if defined(RADIOLIB_BUILD_ARDUINO)
#include "../ArduinoHal.h"
#endif

// BCH(31, 21) code constants
#define RADIOLIB_PAGER_BCH_N (31)
Expand Down

0 comments on commit 9e7c012

Please sign in to comment.