mirror of
https://github.com/kidoman/embd
synced 2025-07-03 11:57:38 +02:00
samples: defer pin close in gpio sample
This commit is contained in:
parent
1d33c3e3bb
commit
b16be3e0b1
1 changed files with 1 additions and 0 deletions
|
@ -16,6 +16,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer led.Close()
|
||||
|
||||
if err := led.SetDirection(gpio.Out); err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue