mirror of https://github.com/kidoman/embd
Close unregistred digitalpins
This commit is contained in:
parent
bfcd1345fe
commit
1a49faafdd
|
@ -7,6 +7,7 @@ package generic
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -233,7 +234,7 @@ func (p *digitalPin) Close() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := p.drv.Unregister(p.id); err != nil {
|
if err := p.drv.Unregister(p.id); err != nil {
|
||||||
return err
|
log.Println("Driver unregister error:", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
if !p.initialized {
|
if !p.initialized {
|
||||||
|
|
Loading…
Reference in New Issue