|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Classes | |
| struct | Stm32GpioDefs< GPIOx, PIN, PIN_NUM > |
| Static GPIO implementation for the STM32 microcontrollers. More... | |
| struct | GpioOutputPin< Base, SAFE_VALUE, INVERT > |
| Parametric GPIO output class. More... | |
| struct | GpioOutputSafeLow< 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 | LedPin< Defs > |
| Defines a GPIO output pin with high-current drive and low initialization level. More... | |
| struct | GpioInputPin< Base, ACTIVE_HIGH > |
| Parametric GPIO input class. More... | |
| struct | GpioInputPU< Defs > |
| Defines a GPIO input pin with pull-up. More... | |
| struct | GpioInputPD< Defs > |
| Defines a GPIO input pin with pull-down enabled. More... | |
| struct | GpioInputNP< Defs > |
| Defines a GPIO input pin. More... | |
Macros | |
| #define | GPIO_PIN(NAME, BaseClass, PORTNAME, NUM) typedef BaseClass<Stm32GpioDefs<(uint32_t)(GPIO ## PORTNAME ## _BASE), GPIO_PIN_ ## NUM, NUM>> NAME##_Pin |
| Helper macro for defining GPIO pins. | |
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 (both for GPIO and other hardware) on STM32 microcontrollers.
Definition in file Stm32Gpio.hxx.
| #define GPIO_PIN | ( | NAME, | |
| BaseClass, | |||
| PORTNAME, | |||
| NUM | |||
| ) | typedef BaseClass<Stm32GpioDefs<(uint32_t)(GPIO ## PORTNAME ## _BASE), GPIO_PIN_ ## NUM, NUM>> NAME##_Pin |
Helper macro for defining GPIO pins.
| NAME | is the basename of the declaration. For NAME==FOO the macro declares 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. |
| PORTNAME | is a letter defining which port this is (like A, B, C). E.g. for PC8 this is C. |
| NUM | is the pin number, such as 8 for PC8. |
Example: GPIO_PIN(FOO, LedPin, 0, 3); ... FOO_Pin::set(true);
Definition at line 232 of file Stm32Gpio.hxx.