Only stopping hardware interface on automated initialization (#143)
This commit is contained in:
parent
4198551e55
commit
50cc06021b
1 changed files with 5 additions and 1 deletions
|
@ -103,7 +103,11 @@ void Module::init(uint8_t interface) {
|
|||
}
|
||||
|
||||
void Module::term() {
|
||||
// stop hardware interfaces
|
||||
// stop hardware interfaces (if they were initialized by the library)
|
||||
if(!_initInterface) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(_spi != nullptr) {
|
||||
_spi->end();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue