Enable Wiegand data internal pull-ups
continuous-integration/drone/push Build is failing Details
continuous-integration/drone Build was killed Details

Back Door shield needs it as it does not have external pull-ups
This commit is contained in:
Arti Zirk 2023-08-11 22:09:22 +03:00
parent 92469f11b2
commit 647a90c0f2
1 changed files with 2 additions and 2 deletions

View File

@ -113,14 +113,14 @@ func WiegandSetup(a int, b int, bitTimeout time.Duration, solenoid int) *Wiegand
}
wa, err := gpiod.RequestLine("gpiochip0", a, gpiod.AsInput,
gpiod.WithFallingEdge, gpiod.WithEventHandler(wiegand.wiegandAEvent))
gpiod.WithFallingEdge, gpiod.LineBiasPullUp, gpiod.WithEventHandler(wiegand.wiegandAEvent))
if err != nil {
panic(err)
}
wiegand.aLine = wa
wb, err := gpiod.RequestLine("gpiochip0", b, gpiod.AsInput,
gpiod.WithFallingEdge, gpiod.WithEventHandler(wiegand.wiegandBEvent))
gpiod.WithFallingEdge, gpiod.LineBiasPullUp, gpiod.WithEventHandler(wiegand.wiegandBEvent))
if err != nil {
panic(err)
}