Re: Direct Pin access (set/clear/direction)
Posted: Mon Oct 06, 2014 10:12 am
mamalala wrote:'Doh. Now i feel stupid
Greetings,
Chris
No problem, just pinch me the next time I write something stupid
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
mamalala wrote:'Doh. Now i feel stupid
Greetings,
Chris
mamalala wrote:Hello all,
There are several registers that allow setting/clearing a pin that is as output, making a pin an input or output, and reading an input pin. First i added these PROVIDE's to the main linker script, eagle.app.v6.ld, to make those registers available:Code: Select allPROVIDE(PIN_OUT = 0x60000300);
PROVIDE(PIN_OUT_SET = 0x60000304);
PROVIDE(PIN_OUT_CLEAR = 0x60000308);
PROVIDE(PIN_DIR = 0x6000030C);
PROVIDE(PIN_DIR_OUTPUT = 0x60000310);
PROVIDE(PIN_DIR_INPUT = 0x60000314);
PROVIDE(PIN_IN = 0x60000318);
PROVIDE(PIN_0 = 0x60000328);
PROVIDE(PIN_2 = 0x60000330);
mcsa wrote:I dont Inderstand how to write in registers. For example in PIN_OUT
WRITE_PERI_REG(PIN_OUT,0x05) set gpio0 and gpio2 high. Right or no?