move SPI init into main

This commit is contained in:
geeksville
2020-04-30 17:56:30 -07:00
parent e9ca7792eb
commit 48c045a253
4 changed files with 20 additions and 9 deletions

View File

@@ -14,9 +14,6 @@ RF95Interface::RF95Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOL
/// \return true if initialisation succeeded.
bool RF95Interface::init()
{
// FIXME, move this to main
SPI.begin();
applyModemConfig();
if (power > 20) // This chip has lower power limits than some
power = 20;
@@ -46,6 +43,11 @@ bool RF95Interface::init()
return res == ERR_NONE;
}
void INTERRUPT_ATTR RF95Interface::disableInterrupt()
{
lora->clearDio0Action();
}
bool RF95Interface::reconfigure()
{
applyModemConfig();