Blocking sub_gpio_write()

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
eps2inf
Posts: 1
Joined: Mon Nov 30, 2009 6:56 pm

Blocking sub_gpio_write()

Post by eps2inf »

At what point does "sub_gpio_write()" return?

1) Will it block until the GPIO lines actually transition to the desired state? Or,
2) Will it return somewhere between the issuance of the sub_gpio_write() command and the actual transition of the GPIO lines?

It appears as if the sub_gpio_write() blocks on a poll() instruction at line #1563 within libusb's handle_events() function (libusb-1.0.2). If item #2 is true, what would be the duration for the GPIO lines to transistion after the issuance of the sub_gpio_write() function?

Many thanks for a fine product, your time, and assistance towards helping me understand. Best regards.

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: Blocking sub_gpio_write()

Post by xol »

eps2inf wrote:At what point does "sub_gpio_write()" return?
It returns after GPIO transition. GPIO transition takes about 100ns while USB frame is 1ms.

Post Reply