Enable Wiegand data internal pull-ups
Back Door shield needs it as it does not have external pull-ups
This commit is contained in:
parent
92469f11b2
commit
647a90c0f2
@ -113,14 +113,14 @@ func WiegandSetup(a int, b int, bitTimeout time.Duration, solenoid int) *Wiegand
|
|||||||
}
|
}
|
||||||
|
|
||||||
wa, err := gpiod.RequestLine("gpiochip0", a, gpiod.AsInput,
|
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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
wiegand.aLine = wa
|
wiegand.aLine = wa
|
||||||
|
|
||||||
wb, err := gpiod.RequestLine("gpiochip0", b, gpiod.AsInput,
|
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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user