mirror of
https://github.com/kidoman/embd
synced 2025-07-04 20:37:46 +02:00
Stop Watching pin when Closing
Closing a pin will automatically check and close any pin that where being watch for interrupt.
This commit is contained in:
parent
e1a90ade4f
commit
5f8a0fced0
2 changed files with 10 additions and 0 deletions
|
@ -276,6 +276,10 @@ func (p *digitalPin) Close() error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := p.StopWatching(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !p.initialized {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue