-->
Page 6 of 7

Re: Direct Pin access (set/clear/direction)

PostPosted: Mon Feb 23, 2015 8:30 pm
by raz123
Just thought I'd mention for those who land on this thread that the following define is faulty :

nicoverduin wrote:#define GPIO 0
PIN_DIR_OUTPUT = GPIO;


GPIO needs to be either 1, 2, 4, 8, etc.. depending on the GPIO you want to target.
In other words: 1 for GPIO0, 2 for GPIO1, 4 for GPIO2, etc.

Re: Direct Pin access (set/clear/direction)

PostPosted: Mon Feb 23, 2015 11:16 pm
by MK1888
Doesn't it need to be OR'd with the register value?

Re: Direct Pin access (set/clear/direction)

PostPosted: Fri Feb 27, 2015 12:02 pm
by raz123
MK1888 wrote:Doesn't it need to be OR'd with the register value?


From the OP: 'PIN_DIR_OUTPUT [...] changes the direction of the pin to an output [...] only "1" bits written will cause a change.'

Re: Direct Pin access (set/clear/direction)

PostPosted: Sat Nov 21, 2015 2:56 pm
by kriss_fr
Hello,

Can this registers help me for my problem ( http://www.esp8266.com/viewtopic.php?f=32&t=6703 ) ?

Any help will be welcomed :)