Closed zoobab closed 6 years ago
Hi,
sorry for the late answer, we had holiday season here.
The default configuration is
struct ch341_pin_config ch341_board_config[CH341_GPIO_NUM_PINS] =
{
// pin GPIO mode GPIO name hwirq
{ 15, CH341_PIN_MODE_CS , "cs0" , 0 }, // used as CS0
{ 16, CH341_PIN_MODE_CS , "cs1" , 0 }, // used as CS1
{ 17, CH341_PIN_MODE_CS , "cs2" , 0 }, // used as CS2
{ 19, CH341_PIN_MODE_IN , "gpio4" , 1 }, // used as input with hardware IRQ
{ 21, CH341_PIN_MODE_IN , "gpio5" , 0 } // used as input
};
So, at least in the default configuration pin 21 that corresponds to D6 is called gpio5 and becomes visible in sysfs as an input port. Unfortunatly, this is the only pin that can't be an output.
How does your ch341_board_config
looks like?
Regards Gunar
I could have more usable GPIOs (6 in total) with your other driver i2c-ch341-usb, see here:
More GPIO's could be used with i2c-ch341-usb driver.
Hi,
I have tested your driver on my electrodragon board:
http://www.zoobab.com/ch341-usb-spi-i2c-uart-isp-dongle#toc5
I could manage to see 4 gpios in sysfs with the following pinout on the board:
D4 = GPIO4 D2 = GPIO3 D1 = GPIO2 ??? = GPIO5
Now, I am trying to use them with urjtag, that needs 4 GPIOs to have a JTAG cable, but it complains GPIO5 cannot be set.
Is there a way to have 4 usable GPIOs, or for now the maximum is 3?
Thanks again for your work.