Set voltage level to multiple pins in one write
Posted: Tue Mar 05, 2019 1:25 pm
by Deouss
Let's say I want to set 8 different pins high and instead calling gpio_set_level 8 times - there would be low level instruction with masked bits for those specific pins setting them altogether. Is there such register or control function on Esp?
Thanks
Re: Set voltage level to multiple pins in one write
Posted: Tue Mar 05, 2019 1:44 pm
by WiFive
Re: Set voltage level to multiple pins in one write
Posted: Tue Mar 05, 2019 2:19 pm
by Deouss
So to summarize:
GPIO_OUT_W1TS_REG - write 1 to set
GPIO_OUT_W1TC_REG - write 1 to clear
GPIO_IN_REG - read current input levels
GPIO_OUT_REG - read current output levels
32 bits -> GPIO(0-31)
REG_WRITE(GPIO_OUT_W1TS_REG, 0x00010001); - will set GPIO0 and GPIO16
Correct me if I am wrong