diff --git a/libtock_hal_8h_source.html b/libtock_hal_8h_source.html index 2b6f8a46..0794d3e2 100644 --- a/libtock_hal_8h_source.html +++ b/libtock_hal_8h_source.html @@ -242,96 +242,97 @@ $(document).ready(function(){initNavTree('libtock_hal_8h_source.html',''); initR
154 
155  gpio_funcs[interruptNum - 1] = NULL;
156  libtock_lora_phy_gpio_disable_interrupt(interruptNum);
-
157  }
-
158 
-
159  void delay(unsigned long ms) override {
-
160 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
-
161  libtocksync_alarm_delay_ms(ms);
-
162 #else
-
163  libtocksync_alarm_delay_ms(ms * 1000 / (1000 + RADIOLIB_CLOCK_DRIFT_MS));
-
164 #endif
-
165  }
-
166 
-
167  void delayMicroseconds(unsigned long us) override {
-
168 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
-
169  libtocksync_alarm_delay_ms(us / 1000);
-
170 #else
-
171  libtocksync_alarm_delay_ms((us * 1000 / (1000 + RADIOLIB_CLOCK_DRIFT_MS)) / 1000);
-
172 #endif
-
173  }
-
174 
-
175  unsigned long millis() override {
-
176  uint32_t now;
-
177  unsigned long ms;
-
178 
-
179  if (frequency == 0) {
-
180  alarm_internal_frequency(&frequency);
-
181  }
-
182 
-
183  alarm_internal_read(&now);
-
184 
-
185  ms = now / (frequency / 1000);
-
186 
-
187 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
-
188  return ms;
-
189 #else
-
190  return ms * 1000 / (1000 + RADIOLIB_CLOCK_DRIFT_MS);
-
191 #endif
-
192  }
-
193 
-
194  unsigned long micros() override {
-
195  return millis() / 1000;
-
196  }
-
197 
-
198  long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override {
-
199  return 0;
-
200  }
-
201 
-
202  void spiBegin() {
-
203  }
-
204 
-
205  void spiBeginTransaction() {
-
206  }
-
207 
-
208  void spiTransfer(uint8_t* out, size_t len, uint8_t* in) {
-
209  libtocksync_lora_phy_read_write(out, in, len);
-
210  }
-
211 
-
212  void spiEndTransaction() {
-
213  }
-
214 
-
215  void spiEnd() {
-
216  }
-
217 
-
218  void yield() {
-
219  ::yield_no_wait();
-
220  }
-
221 
-
222  private:
-
223 };
-
224 
-
225 #endif
+
157  libtock_lora_phy_gpio_enable_input(interruptNum, libtock_pull_down);
+
158  }
+
159 
+
160  void delay(unsigned long ms) override {
+
161 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
+
162  libtocksync_alarm_delay_ms(ms);
+
163 #else
+
164  libtocksync_alarm_delay_ms(ms * 1000 / (1000 + RADIOLIB_CLOCK_DRIFT_MS));
+
165 #endif
+
166  }
+
167 
+
168  void delayMicroseconds(unsigned long us) override {
+
169 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
+
170  libtocksync_alarm_delay_ms(us / 1000);
+
171 #else
+
172  libtocksync_alarm_delay_ms((us * 1000 / (1000 + RADIOLIB_CLOCK_DRIFT_MS)) / 1000);
+
173 #endif
+
174  }
+
175 
+
176  unsigned long millis() override {
+
177  uint32_t now;
+
178  unsigned long ms;
+
179 
+
180  if (frequency == 0) {
+
181  alarm_internal_frequency(&frequency);
+
182  }
+
183 
+
184  alarm_internal_read(&now);
+
185 
+
186  ms = now / (frequency / 1000);
+
187 
+
188 #if !defined(RADIOLIB_CLOCK_DRIFT_MS)
+
189  return ms;
+
190 #else
+
191  return ms * 1000 / (1000 + RADIOLIB_CLOCK_DRIFT_MS);
+
192 #endif
+
193  }
+
194 
+
195  unsigned long micros() override {
+
196  return millis() / 1000;
+
197  }
+
198 
+
199  long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override {
+
200  return 0;
+
201  }
+
202 
+
203  void spiBegin() {
+
204  }
+
205 
+
206  void spiBeginTransaction() {
+
207  }
+
208 
+
209  void spiTransfer(uint8_t* out, size_t len, uint8_t* in) {
+
210  libtocksync_lora_phy_read_write(out, in, len);
+
211  }
+
212 
+
213  void spiEndTransaction() {
+
214  }
+
215 
+
216  void spiEnd() {
+
217  }
+
218 
+
219  void yield() {
+
220  ::yield_no_wait();
+
221  }
+
222 
+
223  private:
+
224 };
+
225 
+
226 #endif
RadioLibHal
Hardware abstraction library base interface.
Definition: Hal.h:13
RadioLibHal::RadioLibHal
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)
Default constructor.
Definition: Hal.cpp:3
TockHal
Definition: libtockHal.h:86
-
TockHal::spiBegin
void spiBegin()
SPI initialization method.
Definition: libtockHal.h:202
-
TockHal::spiEnd
void spiEnd()
SPI termination method.
Definition: libtockHal.h:215
-
TockHal::millis
unsigned long millis() override
Get number of milliseconds since start. Must be implemented by the platform-specific hardware abstrac...
Definition: libtockHal.h:175
+
TockHal::spiBegin
void spiBegin()
SPI initialization method.
Definition: libtockHal.h:203
+
TockHal::spiEnd
void spiEnd()
SPI termination method.
Definition: libtockHal.h:216
+
TockHal::millis
unsigned long millis() override
Get number of milliseconds since start. Must be implemented by the platform-specific hardware abstrac...
Definition: libtockHal.h:176
TockHal::digitalRead
uint32_t digitalRead(uint32_t pin) override
Digital read method. Must be implemented by the platform-specific hardware abstraction!
Definition: libtockHal.h:125
-
TockHal::micros
unsigned long micros() override
Get number of microseconds since start. Must be implemented by the platform-specific hardware abstrac...
Definition: libtockHal.h:194
-
TockHal::pulseIn
long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override
Measure the length of incoming digital pulse in microseconds. Must be implemented by the platform-spe...
Definition: libtockHal.h:198
+
TockHal::micros
unsigned long micros() override
Get number of microseconds since start. Must be implemented by the platform-specific hardware abstrac...
Definition: libtockHal.h:195
+
TockHal::pulseIn
long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override
Measure the length of incoming digital pulse in microseconds. Must be implemented by the platform-spe...
Definition: libtockHal.h:199
TockHal::term
void term() override
Module termination method. This will be called by all radio modules when the destructor is called....
Definition: libtockHal.h:96
-
TockHal::spiTransfer
void spiTransfer(uint8_t *out, size_t len, uint8_t *in)
Method to transfer buffer over SPI.
Definition: libtockHal.h:208
+
TockHal::spiTransfer
void spiTransfer(uint8_t *out, size_t len, uint8_t *in)
Method to transfer buffer over SPI.
Definition: libtockHal.h:209
TockHal::attachInterrupt
void attachInterrupt(uint32_t interruptNum, gpioIrqFn interruptCb, uint32_t mode) override
Method to attach function to an external interrupt. Must be implemented by the platform-specific hard...
Definition: libtockHal.h:137
-
TockHal::yield
void yield()
Yield method, called from long loops in multi-threaded environment (to prevent blocking other threads...
Definition: libtockHal.h:218
-
TockHal::spiBeginTransaction
void spiBeginTransaction()
Method to start SPI transaction.
Definition: libtockHal.h:205
-
TockHal::delay
void delay(unsigned long ms) override
Blocking wait function. Must be implemented by the platform-specific hardware abstraction!
Definition: libtockHal.h:159
+
TockHal::yield
void yield()
Yield method, called from long loops in multi-threaded environment (to prevent blocking other threads...
Definition: libtockHal.h:219
+
TockHal::spiBeginTransaction
void spiBeginTransaction()
Method to start SPI transaction.
Definition: libtockHal.h:206
+
TockHal::delay
void delay(unsigned long ms) override
Blocking wait function. Must be implemented by the platform-specific hardware abstraction!
Definition: libtockHal.h:160
TockHal::digitalWrite
void digitalWrite(uint32_t pin, uint32_t value) override
Digital write method. Must be implemented by the platform-specific hardware abstraction!
Definition: libtockHal.h:113
TockHal::init
void init() override
Module initialization method. This will be called by all radio modules at the beginning of startup....
Definition: libtockHal.h:93
TockHal::detachInterrupt
void detachInterrupt(uint32_t interruptNum) override
Method to detach function from an external interrupt. Must be implemented by the platform-specific ha...
Definition: libtockHal.h:150
-
TockHal::delayMicroseconds
void delayMicroseconds(unsigned long us) override
Blocking microsecond wait function. Must be implemented by the platform-specific hardware abstraction...
Definition: libtockHal.h:167
+
TockHal::delayMicroseconds
void delayMicroseconds(unsigned long us) override
Blocking microsecond wait function. Must be implemented by the platform-specific hardware abstraction...
Definition: libtockHal.h:168
TockHal::pinMode
void pinMode(uint32_t pin, uint32_t mode) override
GPIO pin mode (input/output/...) configuration method. Must be implemented by the platform-specific h...
Definition: libtockHal.h:101
-
TockHal::spiEndTransaction
void spiEndTransaction()
Method to end SPI transaction.
Definition: libtockHal.h:212
+
TockHal::spiEndTransaction
void spiEndTransaction()
Method to end SPI transaction.
Definition: libtockHal.h:213