[Module] Fixed interface termination
This commit is contained in:
parent
4459432998
commit
1a75ff837e
1 changed files with 11 additions and 2 deletions
|
@ -73,8 +73,17 @@ void Module::init(uint8_t interface) {
|
|||
}
|
||||
|
||||
void Module::term() {
|
||||
// stop SPI
|
||||
// stop hardware interface
|
||||
switch(interface) {
|
||||
case RADIOLIB_USE_SPI:
|
||||
_spi->end();
|
||||
break;
|
||||
case RADIOLIB_USE_UART:
|
||||
ModuleSerial->end(baudrate, SERIAL_8N1, _rx, _tx);
|
||||
break;
|
||||
case RADIOLIB_USE_I2C:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Module::ATemptyBuffer() {
|
||||
|
|
Loading…
Add table
Reference in a new issue