diff --git a/src/Module.cpp b/src/Module.cpp index 67ac9ac8..eed3e298 100644 --- a/src/Module.cpp +++ b/src/Module.cpp @@ -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(); }