WP85 interrupts

Hi

Can anyone explain how interrupts are handled and the preferred / best method using Legato / WP85?

For example GPIO2 is used on the Mangoh board (net GPIOEXP_INT2) - can we generate Legato events from this IP or do we need to do something in Linux or something else?

I’ve just noticed that Legato 15.10 documentation exists - and that there is a new service
legato.io/legato-docs/15_10/c_gpio.html

Does this answer my question?

Thanks in advance

John

According to the doc it should be exactly what you need.

le_gpio_AddChangeEventHandler:

[quote]Add handler function for EVENT ‘le_gpio_ChangeEvent’

Register a callback function to be called when an input pin changes state.

If the pin is not capable of interrupt-driven operation, then it will be sampled every sampleMs milliseconds. Otherwise, sampleMs will be ignored.[/quote]

Are any latency figures available for this function?

I’m hoping GPIO2 is a real interrupt input

Hi John.

It should do what you need, but there will be some latency as you’re in userspace, so quite a lot has happened before you get called. I think the best thing would be to test and see.

Sorry for the delay in replying.