diff --git a/_arduino_hal_8h_source.html b/_arduino_hal_8h_source.html index 665f3fb0..6d54f601 100644 --- a/_arduino_hal_8h_source.html +++ b/_arduino_hal_8h_source.html @@ -107,53 +107,53 @@ $(document).ready(function(){initNavTree('_arduino_hal_8h_source.html',''); init
25  public:
29  ArduinoHal();
30 
-
36  ArduinoHal(SPIClass& spi, SPISettings spiSettings = RADIOLIB_DEFAULT_SPI_SETTINGS);
-
37 
-
38  // implementations of pure virtual RadioLibHal methods
-
39  void pinMode(uint32_t pin, uint32_t mode) override;
-
40  void digitalWrite(uint32_t pin, uint32_t value) override;
-
41  uint32_t digitalRead(uint32_t pin) override;
-
42  void attachInterrupt(uint32_t interruptNum, void (*interruptCb)(void), uint32_t mode) override;
-
43  void detachInterrupt(uint32_t interruptNum) override;
-
44  void delay(unsigned long ms) override;
-
45  void delayMicroseconds(unsigned long us) override;
-
46  unsigned long millis() override;
-
47  unsigned long micros() override;
-
48  long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override;
-
49  void spiBegin() override;
-
50  void spiBeginTransaction() override;
-
51  uint8_t spiTransfer(uint8_t b) override;
-
52  void spiEndTransaction() override;
-
53  void spiEnd() override;
-
54 
-
55  // implementations of virtual RadioLibHal methods
-
56  void init() override;
-
57  void term() override;
-
58  void tone(uint32_t pin, unsigned int frequency, unsigned long duration = 0) override;
-
59  void noTone(uint32_t pin) override;
-
60  void yield() override;
-
61  uint32_t pinToInterrupt(uint32_t pin) override;
-
62 
-
63 #if !defined(RADIOLIB_GODMODE)
-
64  private:
-
65 #endif
-
66  SPIClass* _spi = NULL;
-
67  SPISettings _spiSettings = RADIOLIB_DEFAULT_SPI_SETTINGS;
-
68  bool _initInterface = false;
-
69 
-
70  #if defined(RADIOLIB_MBED_TONE_OVERRIDE)
-
71  mbed::PwmOut *pwmPin = NULL;
-
72  #endif
-
73 
-
74  #if defined(ESP32)
-
75  int32_t _prev = -1;
-
76  #endif
-
77 };
-
78 
-
79 #endif
+
38  ArduinoHal(SPIClass& spi, SPISettings spiSettings = RADIOLIB_DEFAULT_SPI_SETTINGS);
+
39 
+
40  // implementations of pure virtual RadioLibHal methods
+
41  void pinMode(uint32_t pin, uint32_t mode) override;
+
42  void digitalWrite(uint32_t pin, uint32_t value) override;
+
43  uint32_t digitalRead(uint32_t pin) override;
+
44  void attachInterrupt(uint32_t interruptNum, void (*interruptCb)(void), uint32_t mode) override;
+
45  void detachInterrupt(uint32_t interruptNum) override;
+
46  void delay(unsigned long ms) override;
+
47  void delayMicroseconds(unsigned long us) override;
+
48  unsigned long millis() override;
+
49  unsigned long micros() override;
+
50  long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override;
+
51  void spiBegin() override;
+
52  void spiBeginTransaction() override;
+
53  uint8_t spiTransfer(uint8_t b) override;
+
54  void spiEndTransaction() override;
+
55  void spiEnd() override;
+
56 
+
57  // implementations of virtual RadioLibHal methods
+
58  void init() override;
+
59  void term() override;
+
60  void tone(uint32_t pin, unsigned int frequency, unsigned long duration = 0) override;
+
61  void noTone(uint32_t pin) override;
+
62  void yield() override;
+
63  uint32_t pinToInterrupt(uint32_t pin) override;
+
64 
+
65 #if !defined(RADIOLIB_GODMODE)
+
66  private:
+
67 #endif
+
68  SPIClass* _spi = NULL;
+
69  SPISettings _spiSettings = RADIOLIB_DEFAULT_SPI_SETTINGS;
+
70  bool _initInterface = false;
+
71 
+
72  #if defined(RADIOLIB_MBED_TONE_OVERRIDE)
+
73  mbed::PwmOut *pwmPin = NULL;
+
74  #endif
+
75 
+
76  #if defined(ESP32)
+
77  int32_t _prev = -1;
+
78  #endif
+
79 };
80 
81 #endif
-
RadioLibHal
Definition: Hal.h:11
+
82 
+
83 #endif
+
RadioLibHal
Definition: Hal.h:12
RadioLibHal::digitalRead
virtual uint32_t digitalRead(uint32_t pin)=0
Digital read method. Must be implemented by the platform-specific hardware abstraction!
RadioLibHal::spiTransfer
virtual uint8_t spiTransfer(uint8_t b)=0
Method to transfer one byte over SPI.
RadioLibHal::yield
virtual void yield()
Yield method, called from long loops in multi-threaded environment (to prevent blocking other threads...
Definition: Hal.cpp:29
diff --git a/_external_radio_8h_source.html b/_external_radio_8h_source.html index ed4337ce..1099f58f 100644 --- a/_external_radio_8h_source.html +++ b/_external_radio_8h_source.html @@ -113,7 +113,7 @@ $(document).ready(function(){initNavTree('_external_radio_8h_source.html',''); i
ExternalRadio
Definition: ExternalRadio.h:12
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:29
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:14
-
RadioLibHal
Definition: Hal.h:11
+
RadioLibHal
Definition: Hal.h:12
diff --git a/_hal_8h_source.html b/_hal_8h_source.html index d697fbee..80a0302f 100644 --- a/_hal_8h_source.html +++ b/_hal_8h_source.html @@ -92,94 +92,94 @@ $(document).ready(function(){initNavTree('_hal_8h_source.html',''); initResizabl
4 #include <stdint.h>
5 #include <stddef.h>
6 
-
11 class RadioLibHal {
-
12  public:
-
13 
-
14  // values for pin modes, levels and change directions
-
15  // these tell RadioLib how are different logic states represented on a given platform
-
16 
-
20  const uint32_t GpioModeInput;
-
21 
-
25  const uint32_t GpioModeOutput;
-
26 
-
30  const uint32_t GpioLevelLow;
-
31 
-
35  const uint32_t GpioLevelHigh;
-
36 
-
40  const uint32_t GpioInterruptRising;
-
41 
-
45  const uint32_t GpioInterruptFalling;
-
46 
-
56  RadioLibHal(const uint32_t input, const uint32_t output, const uint32_t low, const uint32_t high, const uint32_t rising, const uint32_t falling);
-
57 
-
58  // pure virtual methods - these must be implemented by the hardware abstraction for RadioLib to function
-
59 
-
66  virtual void pinMode(uint32_t pin, uint32_t mode) = 0;
-
67 
-
74  virtual void digitalWrite(uint32_t pin, uint32_t value) = 0;
-
75 
-
82  virtual uint32_t digitalRead(uint32_t pin) = 0;
-
83 
-
91  virtual void attachInterrupt(uint32_t interruptNum, void (*interruptCb)(void), uint32_t mode) = 0;
-
92 
-
98  virtual void detachInterrupt(uint32_t interruptNum) = 0;
-
99 
-
105  virtual void delay(unsigned long ms) = 0;
-
106 
-
112  virtual void delayMicroseconds(unsigned long us) = 0;
-
113 
-
119  virtual unsigned long millis() = 0;
-
120 
-
126  virtual unsigned long micros() = 0;
-
127 
-
136  virtual long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) = 0;
-
137 
-
141  virtual void spiBegin() = 0;
-
142 
-
146  virtual void spiBeginTransaction() = 0;
-
147 
-
153  virtual uint8_t spiTransfer(uint8_t b) = 0;
-
154 
-
158  virtual void spiEndTransaction() = 0;
-
159 
-
163  virtual void spiEnd() = 0;
-
164 
-
165  // virtual methods - these may or may not exists on a given platform
-
166  // they exist in this implementation, but do nothing
+
12 class RadioLibHal {
+
13  public:
+
14 
+
15  // values for pin modes, levels and change directions
+
16  // these tell RadioLib how are different logic states represented on a given platform
+
17 
+
21  const uint32_t GpioModeInput;
+
22 
+
26  const uint32_t GpioModeOutput;
+
27 
+
31  const uint32_t GpioLevelLow;
+
32 
+
36  const uint32_t GpioLevelHigh;
+
37 
+
41  const uint32_t GpioInterruptRising;
+
42 
+
46  const uint32_t GpioInterruptFalling;
+
47 
+
63  RadioLibHal(const uint32_t input, const uint32_t output, const uint32_t low, const uint32_t high, const uint32_t rising, const uint32_t falling);
+
64 
+
65  // pure virtual methods - these must be implemented by the hardware abstraction for RadioLib to function
+
66 
+
75  virtual void pinMode(uint32_t pin, uint32_t mode) = 0;
+
76 
+
85  virtual void digitalWrite(uint32_t pin, uint32_t value) = 0;
+
86 
+
95  virtual uint32_t digitalRead(uint32_t pin) = 0;
+
96 
+
107  virtual void attachInterrupt(uint32_t interruptNum, void (*interruptCb)(void), uint32_t mode) = 0;
+
108 
+
115  virtual void detachInterrupt(uint32_t interruptNum) = 0;
+
116 
+
123  virtual void delay(unsigned long ms) = 0;
+
124 
+
131  virtual void delayMicroseconds(unsigned long us) = 0;
+
132 
+
139  virtual unsigned long millis() = 0;
+
140 
+
147  virtual unsigned long micros() = 0;
+
148 
+
161  virtual long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) = 0;
+
162 
+
166  virtual void spiBegin() = 0;
167 
-
173  virtual void init();
-
174 
-
180  virtual void term();
+
171  virtual void spiBeginTransaction() = 0;
+
172 
+
180  virtual uint8_t spiTransfer(uint8_t b) = 0;
181 
-
188  virtual void tone(uint32_t pin, unsigned int frequency, unsigned long duration = 0);
-
189 
-
194  virtual void noTone(uint32_t pin);
-
195 
-
199  virtual void yield();
-
200 
-
206  virtual uint32_t pinToInterrupt(uint32_t pin);
-
207 };
+
185  virtual void spiEndTransaction() = 0;
+
186 
+
190  virtual void spiEnd() = 0;
+
191 
+
192  // virtual methods - these may or may not exists on a given platform
+
193  // they exist in this implementation, but do nothing
+
194 
+
200  virtual void init();
+
201 
+
207  virtual void term();
208 
-
209 #endif
-
RadioLibHal
Definition: Hal.h:11
-
RadioLibHal::GpioInterruptFalling
const uint32_t GpioInterruptFalling
Value to be used as the "falling" GPIO level change direction.
Definition: Hal.h:45
+
218  virtual void tone(uint32_t pin, unsigned int frequency, unsigned long duration = 0);
+
219 
+
225  virtual void noTone(uint32_t pin);
+
226 
+
230  virtual void yield();
+
231 
+
239  virtual uint32_t pinToInterrupt(uint32_t pin);
+
240 };
+
241 
+
242 #endif
+
RadioLibHal
Definition: Hal.h:12
+
RadioLibHal::GpioInterruptFalling
const uint32_t GpioInterruptFalling
Value to be used as the "falling" GPIO level change direction.
Definition: Hal.h:46
RadioLibHal::digitalRead
virtual uint32_t digitalRead(uint32_t pin)=0
Digital read method. Must be implemented by the platform-specific hardware abstraction!
RadioLibHal::spiTransfer
virtual uint8_t spiTransfer(uint8_t b)=0
Method to transfer one byte over SPI.
-
RadioLibHal::GpioModeOutput
const uint32_t GpioModeOutput
Value to be used as the "output" GPIO direction.
Definition: Hal.h:25
+
RadioLibHal::GpioModeOutput
const uint32_t GpioModeOutput
Value to be used as the "output" GPIO direction.
Definition: Hal.h:26
RadioLibHal::yield
virtual void yield()
Yield method, called from long loops in multi-threaded environment (to prevent blocking other threads...
Definition: Hal.cpp:29
RadioLibHal::millis
virtual unsigned long millis()=0
Get number of milliseconds since start. Must be implemented by the platform-specific hardware abstrac...
-
RadioLibHal::GpioModeInput
const uint32_t GpioModeInput
Value to be used as the "input" GPIO direction.
Definition: Hal.h:20
+
RadioLibHal::GpioModeInput
const uint32_t GpioModeInput
Value to be used as the "input" GPIO direction.
Definition: Hal.h:21
RadioLibHal::detachInterrupt
virtual void detachInterrupt(uint32_t interruptNum)=0
Method to detach function from an external interrupt. Must be implemented by the platform-specific ha...
RadioLibHal::pinToInterrupt
virtual uint32_t pinToInterrupt(uint32_t pin)
Function to convert from pin number to interrupt number.
Definition: Hal.cpp:33
RadioLibHal::pulseIn
virtual long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout)=0
Measure the length of incoming digital pulse in microseconds. Must be implemented by the platform-spe...
-
RadioLibHal::GpioLevelLow
const uint32_t GpioLevelLow
Value to be used as the "low" GPIO level.
Definition: Hal.h:30
-
RadioLibHal::GpioLevelHigh
const uint32_t GpioLevelHigh
Value to be used as the "high" GPIO level.
Definition: Hal.h:35
+
RadioLibHal::GpioLevelLow
const uint32_t GpioLevelLow
Value to be used as the "low" GPIO level.
Definition: Hal.h:31
+
RadioLibHal::GpioLevelHigh
const uint32_t GpioLevelHigh
Value to be used as the "high" GPIO level.
Definition: Hal.h:36
RadioLibHal::spiEnd
virtual void spiEnd()=0
SPI termination method.
RadioLibHal::init
virtual void init()
Module initialization method. This will be called by all radio modules at the beginning of startup....
Definition: Hal.cpp:11
RadioLibHal::digitalWrite
virtual void digitalWrite(uint32_t pin, uint32_t value)=0
Digital write method. Must be implemented by the platform-specific hardware abstraction!
RadioLibHal::spiEndTransaction
virtual void spiEndTransaction()=0
Method to end SPI transaction.
RadioLibHal::noTone
virtual void noTone(uint32_t pin)
Method to stop producing a tone.
Definition: Hal.cpp:25
-
RadioLibHal::GpioInterruptRising
const uint32_t GpioInterruptRising
Value to be used as the "rising" GPIO level change direction.
Definition: Hal.h:40
+
RadioLibHal::GpioInterruptRising
const uint32_t GpioInterruptRising
Value to be used as the "rising" GPIO level change direction.
Definition: Hal.h:41
RadioLibHal::delay
virtual void delay(unsigned long ms)=0
Blocking wait function. Must be implemented by the platform-specific hardware abstraction!
RadioLibHal::spiBegin
virtual void spiBegin()=0
SPI initialization method.
RadioLibHal::term
virtual void term()
Module termination method. This will be called by all radio modules when the desctructor is called....
Definition: Hal.cpp:15
diff --git a/_module_8h_source.html b/_module_8h_source.html index 04204e18..bc708945 100644 --- a/_module_8h_source.html +++ b/_module_8h_source.html @@ -290,7 +290,7 @@ $(document).ready(function(){initNavTree('_module_8h_source.html',''); initResiz
Module::SPIwriteRegisterBurst
void SPIwriteRegisterBurst(uint16_t reg, uint8_t *data, size_t numBytes)
SPI burst write method.
Definition: Module.cpp:118
Module::SPIparseStatusCb
SPIparseStatusCb_t SPIparseStatusCb
Callback to function that will parse the module-specific status codes to RadioLib status codes....
Definition: Module.h:182
Module::setRfSwitchState
void setRfSwitchState(uint8_t mode)
Set RF switch state.
Definition: Module.cpp:501
-
RadioLibHal
Definition: Hal.h:11
+
RadioLibHal
Definition: Hal.h:12
RADIOLIB_ERR_UNKNOWN
#define RADIOLIB_ERR_UNKNOWN
There was an unexpected, unknown error. If you see this, something went incredibly wrong....
Definition: TypeDef.h:110
Module::RfSwitchMode_t
Definition: Module.h:47
diff --git a/class_radio_lib_hal.html b/class_radio_lib_hal.html index 7e17bd17..26ef4d85 100644 --- a/class_radio_lib_hal.html +++ b/class_radio_lib_hal.html @@ -248,11 +248,11 @@ const uint32_t Default constructor.

Parameters
- - - - - + + + + +
inputValue to be used as the "input" GPIO direction.
outputValue to be used as the "output" GPIO direction.
lowValue to be used as the "low" GPIO level.
highValue to be used as the "high" GPIO level.
risingValue to be used as the "rising" GPIO level change direction.
inputValue to be used as the "input" GPIO direction.
outputValue to be used as the "output" GPIO direction.
lowValue to be used as the "low" GPIO level.
highValue to be used as the "high" GPIO level.
risingValue to be used as the "rising" GPIO level change direction.
fallingValue to be used as the "falling" GPIO level change direction.
@@ -304,8 +304,8 @@ const uint32_t 
Method to attach function to an external interrupt. Must be implemented by the platform-specific hardware abstraction!

Parameters
- - + +
interruptNumInterrupt number to attach to (platform-specific).
interruptCbInterrupt service routine to execute.
interruptNumInterrupt number to attach to (platform-specific).
interruptCbInterrupt service routine to execute.
modeRising/falling mode (platform-specific).
@@ -442,7 +442,7 @@ const uint32_t 
Digital read method. Must be implemented by the platform-specific hardware abstraction!

Parameters
- +
pinPin to be changed (platform-specific).
pinPin to be changed (platform-specific).
@@ -487,7 +487,7 @@ const uint32_t 
Digital write method. Must be implemented by the platform-specific hardware abstraction!

Parameters
- +
pinPin to be changed (platform-specific).
pinPin to be changed (platform-specific).
valueValue to set (platform-specific).
@@ -622,7 +622,7 @@ const uint32_t 
GPIO pin mode (input/output/...) configuration method. Must be implemented by the platform-specific hardware abstraction!

Parameters
- +
pinPin to be changed (platform-specific).
pinPin to be changed (platform-specific).
modeMode to be set (platform-specific).
@@ -657,7 +657,7 @@ const uint32_t 
Function to convert from pin number to interrupt number.

Parameters
- +
pinPin to convert from.
pinPin to convert from.
@@ -708,9 +708,9 @@ const uint32_t 
Measure the length of incoming digital pulse in microseconds. Must be implemented by the platform-specific hardware abstraction!

Parameters
- - - + + +
pinPin to measure on (platform-specific).
statePin level to monitor (platform-specific).
timeoutTimeout in microseconds.
pinPin to measure on (platform-specific).
statePin level to monitor (platform-specific).
timeoutTimeout in microseconds.
@@ -745,7 +745,7 @@ const uint32_t 
Method to transfer one byte over SPI.

Parameters
- +
bByte to send.
bByte to send.
@@ -796,8 +796,8 @@ const uint32_t 
Method to produce a square-wave with 50% duty cycle ("tone") of a given frequency at some pin.

Parameters
- - + +
pinPin to be used as the output.
frequencyFrequency of the square wave.
pinPin to be used as the output.
frequencyFrequency of the square wave.
durationDuration of the tone in ms. When set to 0, the tone will be infinite.