|
Open Model Railroad Network (OpenMRN)
|
#include "os/Gpio.hxx"#include "driverlib/gpio.h"#include "driverlib/pin_map.h"#include "driverlib/sysctl.h"#include "inc/hw_types.h"#include "inc/hw_memmap.h"#include "inc/hw_gpio.h"#include "driverlib/rom_map.h"Go to the source code of this file.
Classes | |
| class | TivaGpio< GPIO_BASE, GPIO_PIN > |
| Generic GPIO class implementation. More... | |
| struct | GpioShared< Defs > |
| Shared class that defines static functions used by both GpioInputPin, GpioOutputPin and GpioHwPin. 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 | GpioOutputOD< Defs, SAFE_VALUE > |
| Defines a GPIO output pin with high-current drive and a defined initialization 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... | |
| struct | GpioInputOutputPin< Defs > |
| Common class for GPIO input pins. More... | |
| struct | GpioADCPin< Defs > |
| GPIO Input pin in ADC configuration (analog). More... | |
| struct | GpioUSBAPin< Defs > |
| GPIO Input pin for USB. More... | |
| struct | GpioHwPin< Defs > |
| GPIO pin in a hardware configuration (via pinmux: UART, I2C, CAN, etc). More... | |
Macros | |
| #define | DECL_PIN(NAME, PORT, NUM) |
| Helper macro for declaring a pin. | |
| #define | DECL_HWPIN(NAME, PORT, NUM, CONFIG, Type) |
| Helper macro for declaring a GPIO pin wiht a specific hardware config (not GPIO but a different hardware muxed onto the same pin). | |
| #define | GPIO_PIN(NAME, BaseClass, PORT, NUM) |
| Helper macro for defining GPIO pins on the Tiva microcontrollers. | |
| #define | GPIO_HWPIN(NAME, BaseClass, PORT, NUM, CONFIG, TYPE) |
| Helper macro for defining GPIO pins with a specific hardware config on the Tiva microcontrollers. | |
Typedefs | |
| template<class Defs > | |
| using | GpioOutputODSafeLow = GpioOutputOD< Defs, false > |
| Defines a GPIO open-drain output pin with low initialization level. | |
| template<class Defs > | |
| using | GpioOutputODSafeHigh = GpioOutputOD< Defs, true > |
| Defines a GPIO open-drain output pin with high (==not pulled low) initialization level. | |
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 Tiva MCUs.
Definition in file TivaGPIO.hxx.
| #define DECL_HWPIN | ( | NAME, | |
| PORT, | |||
| NUM, | |||
| CONFIG, | |||
| Type | |||
| ) |
Helper macro for declaring a GPIO pin wiht a specific hardware config (not GPIO but a different hardware muxed onto the same pin).
Definition at line 60 of file TivaGPIO.hxx.
| #define DECL_PIN | ( | NAME, | |
| PORT, | |||
| NUM | |||
| ) |
Helper macro for declaring a pin.
Definition at line 51 of file TivaGPIO.hxx.
| #define GPIO_HWPIN | ( | NAME, | |
| BaseClass, | |||
| PORT, | |||
| NUM, | |||
| CONFIG, | |||
| TYPE | |||
| ) |
Helper macro for defining GPIO pins with a specific hardware config on the Tiva microcontrollers.
| 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. |
| PORT | is the letter (e.g. D) |
| NUM | is the pin number, such as 3 |
| CONFIG | is the suffix of the symbol that defines the pinmux for the hardware, e.g. U7TX. |
| TYPE | is a suffix for a TivaWare GPIOPinType function such as UART for GPIOPinTypeUART() to set the pin to the hardware configuration. |
Definition at line 552 of file TivaGPIO.hxx.
| #define GPIO_PIN | ( | NAME, | |
| BaseClass, | |||
| PORT, | |||
| NUM | |||
| ) |
Helper macro for defining GPIO pins on the Tiva microcontrollers.
| 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. |
| PORT | is the letter (e.g. D) |
| NUM | is the pin number, such as 3 |
Example: GPIO_PIN(FOO, LedPin, D, 3); ... FOO_Pin::set(true);
Definition at line 329 of file TivaGPIO.hxx.
| using GpioOutputODSafeHigh = GpioOutputOD<Defs, true> |
Defines a GPIO open-drain output pin with high (==not pulled low) initialization level.
Do not use this class directly. Use GPIO_PIN instead.
Definition at line 290 of file TivaGPIO.hxx.
| using GpioOutputODSafeLow = GpioOutputOD<Defs, false> |
Defines a GPIO open-drain output pin with low initialization level.
Do not use this class directly. Use GPIO_PIN instead.
Definition at line 283 of file TivaGPIO.hxx.