Set voltage level to multiple pins in one write

Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Set voltage level to multiple pins in one write

Postby Deouss » Tue Mar 05, 2019 1:25 pm

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


Deouss
Posts: 425
Joined: Tue Mar 20, 2018 11:36 am

Re: Set voltage level to multiple pins in one write

Postby Deouss » Tue Mar 05, 2019 2:19 pm

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

Who is online

Users browsing this forum: No registered users and 92 guests