1
0
mirror of https://github.com/sandeepmistry/arduino-LoRa.git synced 2025-09-04 14:42:10 +03:00

Add support for Arduino MKR WAN 1300 boards (#105)

* Add support for Arduino MKR WAN 1300 board
* Add new LoRa.setSPI(...) API to use radio with a different SPI interface
* Disable LoRa.onReceive(...) and LoRa.receive() on Arduino MKR WAN 1300
* Add errors on sketches not compatible with the Arduino MKR WAN 1300
This commit is contained in:
Sandeep Mistry
2018-05-07 13:02:06 -04:00
committed by GitHub
parent a2636d10a9
commit 039b138d80
7 changed files with 82 additions and 14 deletions

13
API.md
View File

@@ -38,6 +38,17 @@ To save further pins one could connect the reset pin of the MCU with reset pin o
* `reset` - set to `-1` to omit this pin
### Set SPI interface
Override the default SPI interface used by the library. **Must** be called before `LoRa.begin()`.
```arduino
LoRa.setSPI(spi);
```
* `spi` - new SPI interface to use, defaults to `SPI`
This call is optional and only needs to be used if you need to change the default SPI interface used, in the case your Arduino (or compatible) board has more than one SPI interface present.
### Set SPI Frequency
Override the default SPI frequency of 10 MHz used by the library. **Must** be called before `LoRa.begin()`.
@@ -122,6 +133,8 @@ Returns the packet size in bytes or `0` if no packet was received.
### Continuous receive mode
**WARNING**: Not supported on the Arduino MKR WAN 1300 board!
#### Register callback
Register a callback function for when a packet is received.