Speeduino
Loading...
Searching...
No Matches
Public Member Functions | List of all members
trackedOutputPinAdapter_t< TPin > Class Template Reference

An output pin that tracks it's state (HIGH/LOW) More...

#include <trackedOutputPin.h>

Inheritance diagram for trackedOutputPinAdapter_t< TPin >:

Public Member Functions

void setPin (uint8_t pin, uint8_t mode) noexcept
 Set the input pin.
 
bool isPinHigh (void) const noexcept
 Check if the pin is set high.
 
bool isPinLow (void) const noexcept
 Check if the pin is set low.
 
void setPinHigh (void) noexcept
 Set the pin high.
 
void setPinLow (void) noexcept
 Set the pin low.
 

Detailed Description

template<class TPin>
class trackedOutputPinAdapter_t< TPin >

An output pin that tracks it's state (HIGH/LOW)

This is impossible to do across all platforms and boards using digitalRead():

  1. A pin can't be both INPUT and OUTPUT concurrently
  2. Swapping pin modes resets pin state on some platforms

Member Function Documentation

◆ isPinHigh()

template<class TPin >
bool trackedOutputPinAdapter_t< TPin >::isPinHigh ( void  ) const
inlinenoexcept

Check if the pin is set high.

◆ isPinLow()

template<class TPin >
bool trackedOutputPinAdapter_t< TPin >::isPinLow ( void  ) const
inlinenoexcept

Check if the pin is set low.

◆ setPin()

template<class TPin >
void trackedOutputPinAdapter_t< TPin >::setPin ( uint8_t  pin,
uint8_t  mode 
)
inlinenoexcept

Set the input pin.

◆ setPinHigh()

template<class TPin >
void trackedOutputPinAdapter_t< TPin >::setPinHigh ( void  )
inlinenoexcept

Set the pin high.

◆ setPinLow()

template<class TPin >
void trackedOutputPinAdapter_t< TPin >::setPinLow ( void  )
inlinenoexcept

Set the pin low.


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