mirror of
https://github.com/kidoman/embd
synced 2025-01-03 10:31:36 +01:00
samples: defer pin close in gpio sample
This commit is contained in:
parent
1d33c3e3bb
commit
b16be3e0b1
@ -16,6 +16,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
defer led.Close()
|
||||||
|
|
||||||
if err := led.SetDirection(gpio.Out); err != nil {
|
if err := led.SetDirection(gpio.Out); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user