adafruit / TinyLoRa

LoRaWAN Library
69 stars 38 forks source link

Add parameters to change pin assignment in begin function #21

Closed arjanmels closed 5 years ago

arjanmels commented 5 years ago

To allow this library to be used with other pin configurations I added parameters for the SPI pins. By using default parameters, the library is still fully compatible.

arjanmels commented 5 years ago

I did not realize that on original arduino SPI.begin does not take parameters. I guess, that makes it impossible to merge this request without compatibility issue. Any suggestions how to work around this ina compatible way?

ladyada commented 5 years ago

you can make it so we can pass in an &SPI object, then it can be configured however you like https://github.com/adafruit/Adafruit_BME280_Library/blob/master/Adafruit_BME280.cpp#L47

arjanmels commented 5 years ago

I close this pull request and may come back with a different one with the suggested SPI object passing.