Skip to content

Struct daisy::Pin

ClassList > daisy > Pin

representation of hardware port/pin combination

  • #include <daisy_core.h>

Public Attributes

Type Name
uint8_t pin
GPIOPort port

Public Functions

Type Name
constexpr bool IsValid () const
checks validity of a Pin __
constexpr Pin (const GPIOPort pt, const uint8_t pn)
Constructor creates a valid pin.
constexpr Pin ()
Basic Constructor creates an invalid Pin object.
constexpr bool operator!= (const Pin & rhs) const
comparison operator for checking inequality between Pin objects
constexpr bool operator== (const Pin & rhs) const
comparison operator for checking equality between Pin objects

Public Attributes Documentation

variable pin

uint8_t daisy::Pin::pin;

variable port

GPIOPort daisy::Pin::port;

Public Functions Documentation

function IsValid

checks validity of a Pin __

inline constexpr  bool daisy::Pin::IsValid () const

Return value:

  • returns true if the port is a valid hardware pin, otherwise false.

function Pin [½]

Constructor creates a valid pin.

inline constexpr daisy::Pin::Pin (
    const  GPIOPort pt,
    const  uint8_t pn
) 

Parameters:

  • pt GPIOPort between PA, and PK corresponding to STM32 Port.
  • pn pin number in range of 0-15

function Pin [2/2]

Basic Constructor creates an invalid Pin object.

inline constexpr daisy::Pin::Pin () 


function operator!=

comparison operator for checking inequality between Pin objects

inline constexpr  bool daisy::Pin::operator!= (
    const  Pin & rhs
) const


function operator==

comparison operator for checking equality between Pin objects

inline constexpr  bool daisy::Pin::operator== (
    const  Pin & rhs
) const



The documentation for this class was generated from the following file external-docs/libDaisy/src/daisy_core.h