|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Classes | |
| class | Esp8266StaticGpio< PIN_NUM, MUXREG, FUNC_GPIO > |
| Defines a GPIO output pin. More... | |
| struct | GpioOutputPin< Base, SAFE_VALUE, INVERT > |
| Parametric GPIO output class. More... | |
| struct | GpioPullOutPin< Base > |
| Output pin that switches between high and low state by turning on pullup and pulldowns. More... | |
| struct | GpioOutputSafeLow< Defs > |
| Defines a GPIO output pin, initialized to be an output pin with low level. More... | |
| struct | GpioOutputSafeLowInvert< Defs > |
| Defines a GPIO output pin, initialized to be an output pin with low level. More... | |
| struct | GpioOutputSafeHigh< Defs > |
| Defines a GPIO output pin, initialized to be an output pin with high level. More... | |
| struct | GpioOutputSafeHighInvert< Defs > |
| Defines a GPIO output pin, initialized to be an output pin with high level. More... | |
| struct | GpioInputPar< Base, PUEN > |
| Parametric GPIO input class. More... | |
| struct | GpioInputNP< Defs > |
| Defines a GPIO input pin. More... | |
| struct | GpioInputPU< Defs > |
| Defines a GPIO input pin with pull-up. More... | |
Macros | |
| #define | GPIO_PIN(NAME, BaseClass, NUM) |
| Helper macro for defining GPIO pins on the ESP8266 microcontroller. | |
Functions | |
| void | gpio16_output_conf (void) |
| Enable GPIO16 pin output. | |
| void | gpio16_output_set (uint8 value) |
| Set GPIO16 output level. | |
| void | gpio16_input_conf (void) |
| Enable GPIO16 pin intput. | |
| uint8 | gpio16_input_get (void) |
| Sample the value of GPIO16 input. | |
| constexpr uint32_t | gpio_num_to_pinmux_reg (int gpio_pin_num) |
| Constexpr function that takes a GPIO number and converts it to the pinmux register address. | |
Variables | |
| constexpr uint32_t | pinmux_to_gpio_arr [] |
| Static map from gpio number to pinmux register address. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Helper declarations for using GPIO pins on the Esp8266 MCU.
Definition in file Esp8266Gpio.hxx.
| #define GPIO_PIN | ( | NAME, | |
| BaseClass, | |||
| NUM | |||
| ) |
Helper macro for defining GPIO pins on the ESP8266 microcontroller.
| NAME | is the basename of the declaration. For NAME==FOO the macro declared FOO_Pin as a structure on which the read-write functions will be available. |
| BaseClass | is the initialization structure, such as LedPin, or GpioOutputSafeHigh or GpioOutputSafeLow. |
| NUM | is the pin number, such as 3 (range: 0..15; GPIO16 is not supported) |
Example: GPIO_PIN(FOO, GpioOutputSafeLow, 3); ... FOO_Pin::set(true);
Definition at line 375 of file Esp8266Gpio.hxx.
| uint8 gpio16_input_get | ( | void | ) |
Sample the value of GPIO16 input.
| void gpio16_output_set | ( | uint8 | value | ) |
Set GPIO16 output level.
| value | : GPIO16 output level. |
|
constexpr |
Constexpr function that takes a GPIO number and converts it to the pinmux register address.
| gpio_pin_num | the number of the pin (0..15). |
Definition at line 96 of file Esp8266Gpio.hxx.
|
constexpr |
Static map from gpio number to pinmux register address.
Definition at line 72 of file Esp8266Gpio.hxx.