periph / host

Go·Hardware·Lean - Host drivers
https://periph.io
Apache License 2.0
57 stars 32 forks source link

ftdi: support edge triggering #5

Open maruel opened 3 years ago

maruel commented 3 years ago

From original issue https://github.com/periph/extra/issues/7

@ldrrp When will edge triggering be supported. How am i supposed to use a button with an ft232h

@ardnew I don't believe interrupt edge detection is something the D2XX driver supports in any mode, inherently because of its vendor class USB protocol.

You can't guarantee delivery or ordering of interrupts if they are encapsulated in USB packets.

The best you could do is polling. Just dispatch a goroutine that constantly reads a pin and compares its previous value.

Also see: