ESP8266 Support WIKI

User Tools

Site Tools


esp8266_gpio_registers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

esp8266_gpio_registers [2014/12/31 02:21]
admin created
esp8266_gpio_registers [2015/03/10 13:29]
denz
Line 51: Line 51:
  
 Now, above i also gave addresses for PIN_0 and PIN_2. As of yet i have no idea what these do. I guess those are for configuring specific pins somehow. Not all bits can be set in, for example, PIN_2. Depending on what the output state is, i can toggle the pin by toggling bit 0 there, but i am unsure if that does hard-drive the pin or if some pull-up/​down stuff is fooling me there. Now, above i also gave addresses for PIN_0 and PIN_2. As of yet i have no idea what these do. I guess those are for configuring specific pins somehow. Not all bits can be set in, for example, PIN_2. Depending on what the output state is, i can toggle the pin by toggling bit 0 there, but i am unsure if that does hard-drive the pin or if some pull-up/​down stuff is fooling me there.
 +
 +  * Isn't that the bit-bending,​ like ARM SOCs sometimes have  --- //[[denz]] 2015/03/10 08:25//
  
 Anyways, the _OUT_SET and _OUT_CLEAR registers are quite useful, so are the _DIR_OUTPUT and _DIR_INPUT registers if one wants to quickly set/clear pins or change their direction, without going through the provided API, which always takes 4 parameters that are handed over to a function in ROM and then subsequently used there. Directly accessing them will reduce that overhead. Anyways, the _OUT_SET and _OUT_CLEAR registers are quite useful, so are the _DIR_OUTPUT and _DIR_INPUT registers if one wants to quickly set/clear pins or change their direction, without going through the provided API, which always takes 4 parameters that are handed over to a function in ROM and then subsequently used there. Directly accessing them will reduce that overhead.
  
 Oh, and of course the PIN_OUT and PIN_DIR registers can also be read back (but not the set/clear and input/​output registers, they will always return 0 on read) Oh, and of course the PIN_OUT and PIN_DIR registers can also be read back (but not the set/clear and input/​output registers, they will always return 0 on read)
esp8266_gpio_registers.txt · Last modified: 2015/03/10 13:29 by denz