Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
Lpc17xx40xxGPIO.hxx File Reference
#include "chip.h"
#include "core_cm3.h"
#include "gpio_17xx_40xx.h"
#include "iocon_17xx_40xx.h"
#include "os/Gpio.hxx"
#include "GpioWrapper.hxx"

Go to the source code of this file.

Classes

struct  LpcGpioPin< PORT, PIN >
 Static GPIO implementation for the NXP LPC 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...
 
struct  GpioInputRep< Defs >
 GPIO Input pin in repeater configuration (pull the same direction as sensed on the input). More...
 

Macros

#define GPIO_PIN(NAME, BaseClass, PORT, NUM)    typedef BaseClass<LpcGpioPin<PORT, NUM>> NAME##_Pin
 Helper macro for defining GPIO pins.
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

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 LpcOpen MCUs.

Author
Balazs Racz
Date
2 Dec 2014

Definition in file Lpc17xx40xxGPIO.hxx.

Macro Definition Documentation

◆ GPIO_PIN

#define GPIO_PIN (   NAME,
  BaseClass,
  PORT,
  NUM 
)     typedef BaseClass<LpcGpioPin<PORT, NUM>> NAME##_Pin

Helper macro for defining GPIO pins.

Parameters
NAMEis 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.
BaseClassis the initialization structure, such as LedPin, or GpioOutputSafeHigh or GpioOutputSafeLow.
PORTis the number of the port, such as 0
NUMis the pin number, such as 3

Example: GPIO_PIN(FOO, LedPin, 0, 3); ... FOO_Pin::set(true);

Definition at line 222 of file Lpc17xx40xxGPIO.hxx.