Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
ArduinoStaticGpio< PIN_NUM > Class Template Reference

Defines a GPIO output pin. More...

#include <ArduinoGpio.hxx>

Static Public Member Functions

static void set_output ()
 Sets pin to output.
 
static void set_input ()
 Sets pin to input.
 
static void set_pullup_on ()
 Turns on pullup.
 
static void set_pullup_off ()
 Turns off pullup.
 
static void set_on ()
 Sets output to HIGH.
 
static void set_off ()
 Sets output to LOW.
 
static bool get ()
 
static void set (bool value)
 Set output pin level.
 
static void toggle ()
 Toggles output pin value.
 
static bool is_output ()
 
static constexpr const Gpioinstance ()
 

Detailed Description

template<int PIN_NUM>
class ArduinoStaticGpio< PIN_NUM >

Defines a GPIO output pin.

Writes to this structure will change the output level of the pin. Reads will return the pin's current level.

The pin is set to output at initialization time, with the level defined by ‘SAFE_VALUE’.

Do not use this class directly. Use GPIO_PIN instead.

Definition at line 55 of file ArduinoGpio.hxx.

Member Function Documentation

◆ get()

template<int PIN_NUM>
static bool ArduinoStaticGpio< PIN_NUM >::get ( )
inlinestatic
Returns
input pin level.

Definition at line 95 of file ArduinoGpio.hxx.

◆ instance()

template<int PIN_NUM>
static constexpr const Gpio * ArduinoStaticGpio< PIN_NUM >::instance ( )
inlinestaticconstexpr
Returns
an os-indepentent Gpio abstraction instance for use in libraries.

Definition at line 141 of file ArduinoGpio.hxx.

◆ is_output()

template<int PIN_NUM>
static bool ArduinoStaticGpio< PIN_NUM >::is_output ( )
inlinestatic
Returns
true if pin is configured as an output pin.

Definition at line 120 of file ArduinoGpio.hxx.

◆ set()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set ( bool  value)
inlinestatic

Set output pin level.

Parameters
valueis the level to set to.

Definition at line 101 of file ArduinoGpio.hxx.

◆ set_input()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set_input ( )
inlinestatic

Sets pin to input.

Definition at line 65 of file ArduinoGpio.hxx.

◆ set_off()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set_off ( )
inlinestatic

Sets output to LOW.

Definition at line 89 of file ArduinoGpio.hxx.

◆ set_on()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set_on ( )
inlinestatic

Sets output to HIGH.

Definition at line 83 of file ArduinoGpio.hxx.

◆ set_output()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set_output ( )
inlinestatic

Sets pin to output.

Definition at line 59 of file ArduinoGpio.hxx.

◆ set_pullup_off()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set_pullup_off ( )
inlinestatic

Turns off pullup.

Definition at line 77 of file ArduinoGpio.hxx.

◆ set_pullup_on()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::set_pullup_on ( )
inlinestatic

Turns on pullup.

Definition at line 71 of file ArduinoGpio.hxx.

◆ toggle()

template<int PIN_NUM>
static void ArduinoStaticGpio< PIN_NUM >::toggle ( )
inlinestatic

Toggles output pin value.

Definition at line 114 of file ArduinoGpio.hxx.


The documentation for this class was generated from the following file: