So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Holzwurm
#93812 Hello,
I am a ESP Newbi and want to make some tests with a Wemos D1 mini. It works with Arduino IDE and the
Arduino instructions without problem. I found informations about the direct bit manipulation and see
GPOS = (1 << D6); and GPOC = (1 << D6); to set a bit high or low. Where I can get some more informations. With what command can I read the Bit-Status?
Many thanks for every answer
Hans
User avatar
By btidey
#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.