- Fri Mar 18, 2022 11:16 am
#93996
Look for the file esp8266_peri.h which will be in the Arduino esp8266 package under cores\esp8266\
This has all the macro definitions for the direct register operations that are used by the high level Arduino operations like digitalRead. It is useful not only for GPIO but all the other internal registers
Using these can operate significantly faster than the high level routines and are particularly useful when you want to operate on several GPIOs in one operation. Also if you want to have a bi-directional pin swapping from input to output that can be achieved much faster than using pinMode which is quite a complex routine.
The GPO and GPI macros give direct access to the registers that write and read the registers for all GPIO0-15.
GPOP and GPIP give the masked versions that just operate on one bit.