Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
GpioHwPin< Defs > Struct Template Reference

GPIO pin in a hardware configuration (via pinmux: UART, I2C, CAN, etc). More...

#include <TivaGPIO.hxx>

Inheritance diagram for GpioHwPin< Defs >:
GpioShared< Defs >

Static Public Member Functions

static void hw_init ()
 Implements hw_init functionality for this pin only.
 
static void hw_set_to_safe ()
 Implements hw_set_to_safe functionality for this pin only.
 
static void set_hw ()
 Switches the GPIO pin to the hardware peripheral.
 
static void set_output ()
 Switches the GPIO pin to an output pin.
 
static void set_input (uint32_t drive_type=GPIO_PIN_TYPE_STD)
 Switches the GPIO pin to an input pin.
 
- Static Public Member Functions inherited from GpioShared< Defs >
static void unlock ()
 Used to unlock special consideration pins such as JTAG or NMI pins.
 
static void lock ()
 Used to lock special consideration pins such as JTAG or NMI pins.
 
static void set (bool value)
 Sets the output pin to a specified value;.
 
static bool get ()
 
static void toggle ()
 Changes the value of an output pin.
 
static constexpr uint32_t ptr_address ()
 
static constexpr const Gpioinstance ()
 

Detailed Description

template<class Defs>
struct GpioHwPin< Defs >

GPIO pin in a hardware configuration (via pinmux: UART, I2C, CAN, etc).

The pin can be switched to hardware, input and output mode. In input.output mode the pin can be read and written using the usual set() and get() functions.

Do not use this class directly. Use GPIO_HWPIN instead.

Definition at line 479 of file TivaGPIO.hxx.

Member Function Documentation

◆ hw_init()

template<class Defs >
static void GpioHwPin< Defs >::hw_init ( )
inlinestatic

Implements hw_init functionality for this pin only.

Definition at line 488 of file TivaGPIO.hxx.

◆ hw_set_to_safe()

template<class Defs >
static void GpioHwPin< Defs >::hw_set_to_safe ( )
inlinestatic

Implements hw_set_to_safe functionality for this pin only.

Todo:
(balazs.racz): we need to somehow specify what to do to be safe. Options are drive low, drive high, input std, input wpu, input wpd.

Definition at line 496 of file TivaGPIO.hxx.

◆ set_hw()

template<class Defs >
static void GpioHwPin< Defs >::set_hw ( )
inlinestatic

Switches the GPIO pin to the hardware peripheral.

Definition at line 505 of file TivaGPIO.hxx.

◆ set_input()

template<class Defs >
static void GpioHwPin< Defs >::set_input ( uint32_t  drive_type = GPIO_PIN_TYPE_STD)
inlinestatic

Switches the GPIO pin to an input pin.

Use the get() command to retrieve the value.

Parameters
drive_typespecifies whether there should be a weak pullup (GPIO_PIN_TYPE_STD_WPU), pull-down (GPIO_PIN_TYPE_STD_WPD) or standard pin (default, GPIO_PIN_TYPE_STD)

Definition at line 525 of file TivaGPIO.hxx.

◆ set_output()

template<class Defs >
static void GpioHwPin< Defs >::set_output ( )
inlinestatic

Switches the GPIO pin to an output pin.

Use the set() command to define the value.

Definition at line 512 of file TivaGPIO.hxx.


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