Page 1 of 1

Setting a GPIO pin to high inside the wake stub

Posted: Wed Nov 08, 2017 4:13 am
by mustafacc
Is it possible to set an RTC GPIO pin to high inside the wake stub?

Cheers,
Mustafa

Re: Setting a GPIO pin to high inside the wake stub

Posted: Wed Nov 08, 2017 6:51 am
by mustafacc
Got it:

I can use gpio_output_set from gpio.h library:

to trigger a pin to HIGH, find the pin register, i.e. for IO4 it is BIT4 and:

Code: Select all

gpio_output_set(BIT4, 0, BIT4, 0);
similarly, to trigger the pin to low:

Code: Select all

gpio_output_set(0, BIT4, BIT4, 0);