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

Class collecting a bunch of GPIO pins and allowing them to be initialized in one go. More...

#include <GpioInitializer.hxx>

Static Public Member Functions

static void hw_init ()
 Calls the hw_init() function for all declared pins.
 
static void hw_set_to_safe ()
 Calls the hw_set_to_safe() function for all declared pins.
 
static void set (bool value)
 Calls the set() function for all declared pins.
 

Detailed Description

template<typename... Args>
struct GpioInitializer< Args >

Class collecting a bunch of GPIO pins and allowing them to be initialized in one go.

Usage:

in hardware.hxx:

GPIO_PIN(FOO, ...) GPIO_PIN(BAR, ...)

typedef GpioInitializer<FOO_Pin, BAR_Pin> GpioInit;

in HwInit.cxx call all GPIO pins:

void hw_preinit() { GpioInit::hw_init(); }

Definition at line 99 of file GpioInitializer.hxx.

Member Function Documentation

◆ hw_init()

template<typename... Args>
static void GpioInitializer< Args >::hw_init ( )
inlinestatic

Calls the hw_init() function for all declared pins.

Definition at line 103 of file GpioInitializer.hxx.

◆ hw_set_to_safe()

template<typename... Args>
static void GpioInitializer< Args >::hw_set_to_safe ( )
inlinestatic

Calls the hw_set_to_safe() function for all declared pins.

Definition at line 108 of file GpioInitializer.hxx.

◆ set()

template<typename... Args>
static void GpioInitializer< Args >::set ( bool  value)
inlinestatic

Calls the set() function for all declared pins.

Definition at line 113 of file GpioInitializer.hxx.


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