Re: Need help with libgpiod gpiod_line_request_both_edges_events()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In my experience the line needs to be free (=not requested) before
calling any of the gpiod_line_request* functions.


Kind regards, Gasper


On 06. 03. 2018 02:05, Timur Tabi wrote:
> I'm trying to test event handling with a loopback GPIO.  I have two
> GPIOs, 37 and 38.  On my board, they are wired together.  I set 37 to
> output and 38 to input.  If I write 1 to 37, I read a 1 from 38.  Same
> thing with 0.
>
> So I'm trying to test GPIO interrupts now.  I have this code:
>
>         ret = gpiod_line_request_both_edges_events(input, NULL);
>
> This function immediately returns with -1.  While debugging it, it
> appears that the code in core.c is expecting the GPIO to be configured
> as output.  Is that correct?  If so, that doesn't make any sense.  I'm
> trying to receive an event when a GPIO transitions from 0 to 1 (or 1
> to 0) on input.
>
> I missing be missing something fundamental.
>

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux