Direct GPIO port register manipulation
Posted: Thu Apr 07, 2016 7:52 am
Hi everyone, i'm new here,
i got my ESP8266 yesterday and i already started playing with it on Arduino IDE.
After testing some wifi examples, i went through hardware benchmarking,
i'm now able to set and clear a single GPIO with these instructions, (example on GPIO2):
that i found in the "core_esp8266_wiring_digital.c" file.
Now i need to manipulate multiple GPIOs at the same time,
(read or write the entire port in only one instruction).
I tryed GPOP, ex:
but obviously it gives me "'GPOP' was not declared in this scope".
Anyone know the proper register name?
Thank you
i got my ESP8266 yesterday and i already started playing with it on Arduino IDE.
After testing some wifi examples, i went through hardware benchmarking,
i'm now able to set and clear a single GPIO with these instructions, (example on GPIO2):
Code: Select all
GPOS = 1<<2;
GPOC = 1<<2;
that i found in the "core_esp8266_wiring_digital.c" file.
Now i need to manipulate multiple GPIOs at the same time,
(read or write the entire port in only one instruction).
I tryed GPOP, ex:
Code: Select all
GPOP = GPOP | 0x00000004;
GPOP = GPOP & 0xFFFFFFFB;
but obviously it gives me "'GPOP' was not declared in this scope".
Anyone know the proper register name?
Thank you