WP8548 GPIO34..37 sysfs/Legato


I have designed a custom PCB housing a WP8548 / WP7603, and stupidly missed the caviat on GPIO34 thru 37 stating only accessible via sysfs/Legato. I have searched high 'n low to find out how I actually do that now that I have connected external inputs to these pins.

This might well be a no-brainer for a experienced linux programmer, but alas I am not…

Could somebody give me a code example that reads the state of these pins within an API please ?

Thank you in advance.



For those that have hit this before, here is what I did to solve the issue…

I noticed on the Mangoh forum a post not entirely relating to my issue :-

forum.mangoh.io/t/controlling-wp … roblem/984

I had already for each GPIO I needed applied :-


In the AT Command console.

then within the main console I executed from /sys/class/gpio folder :-

echo <GPIO#> > export

where <GPIO#> is the GPIO number.

Once I applied the above, I can now use the GPIO’s within my API.

I also tested this re-configure is non-volatile.