frank-zago / ch341-i2c-spi-gpio

WinChipHead CH341 linux driver for I2C, SPI and GPIO mode
GNU General Public License v2.0
69 stars 30 forks source link

IRQ? #30

Closed mjsir911 closed 6 months ago

mjsir911 commented 6 months ago

Hi!

I don't really know much about hardware interrupts, but I'm comparing this project to: https://github.com/UncleGrumpy/spi-ch341-usb.git

with the above fork, this works:

$ gpioinfo
gpiochip31 - 3 lines:
    line   0:    "dio_irq"       unused   input  active-high 
    line   1:   "dio_busy"       unused   input  active-high 
    line   2:  "dio_reset"       unused   input  active-high 
$ gpiomon /dev/gpiochip31 0
^C
$ gpiomon /dev/gpiochip31 1
^C
$ gpiomon /dev/gpiochip31 2
^C

With your version, I can't watch any of the pins:

$ gpiomon /dev/gpiochip32 10
gpiomon: error waiting for events: Invalid argument
mjsir911 commented 6 months ago

Something to note is that I can't get any reads working with the unclegrumpy fork

mjsir911 commented 6 months ago

This works and is the only valid configuration:

gpiomon --rising-edge /dev/gpiochip12 10