Accessing gpio 25-39 (as input) from wake stub

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Accessing gpio 25-39 (as input) from wake stub

Postby loboris » Mon Mar 12, 2018 2:11 pm

In one of my projects I'm using wake stub to check the state of some pins and take some action.

Everythig works fine (as expected) for all the gpios up to 25.
Checking the gpios 25-39 with GPIO_INPUT_GET(gpio) always returns 0.
This is acctualy expected, as those gpios have input disabled after reset.

My question is: how I can enable the input on gpio 25-39 from wake stub ? There is no function in rom for that (or I can't find one).
Setting the gpio direction and enabling as input only from the main application does not help.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Accessing gpio 25-39 (as input) from wake stub

Postby WiFive » Mon Mar 12, 2018 7:51 pm

PIN_INPUT_ENABLE?

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Accessing gpio 25-39 (as input) from wake stub

Postby loboris » Tue Mar 13, 2018 10:33 am

WiFive wrote:PIN_INPUT_ENABLE?
Thank you, I've somehow overlooked it.
It works.

Who is online

Users browsing this forum: No registered users and 104 guests