Control Surface  1.1.1
MIDI Control Surface library for Arduino
StaticSizeExtendedIOElement.hpp
Go to the documentation of this file.
1 /* ✔ */
2 
3 #pragma once
4 
6 AH_DIAGNOSTIC_WERROR() // Enable errors on warnings
7 
8 #include "ExtendedIOElement.hpp"
10 
12 
18 template <uint16_t N>
19 class StaticSizeExtendedIOElement : public ExtendedIOElement { // LCOV_EXCL_LINE
20  protected:
21  StaticSizeExtendedIOElement() : ExtendedIOElement{N} {} // LCOV_EXCL_LINE
22 
23  public:
28  return generateIncrementalArray<pin_t, N>(getStart());
29  }
30 
31  static constexpr uint16_t length() { return N; }
32 };
33 
35 
Warnings.hpp
AH::StaticSizeExtendedIOElement::length
static constexpr uint16_t length()
Definition: StaticSizeExtendedIOElement.hpp:31
AH_DIAGNOSTIC_POP
#define AH_DIAGNOSTIC_POP()
Definition: Warnings.hpp:17
AH::StaticSizeExtendedIOElement::pins
Array< pin_t, N > pins() const
Get an array containing all pins of the element.
Definition: StaticSizeExtendedIOElement.hpp:27
AH::ExtendedIOElement
An abstract base class for Extended Input/Output elements.
Definition: ExtendedIOElement.hpp:62
AH::StaticSizeExtendedIOElement::StaticSizeExtendedIOElement
StaticSizeExtendedIOElement()
Definition: StaticSizeExtendedIOElement.hpp:21
AH::Array< pin_t, N >
ArrayHelpers.hpp
AH::StaticSizeExtendedIOElement
A class for ExtendedIOElements with a fixed size.
Definition: StaticSizeExtendedIOElement.hpp:19
AH_DIAGNOSTIC_WERROR
#define AH_DIAGNOSTIC_WERROR()
Definition: Warnings.hpp:16
BEGIN_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition: AH/Settings/NamespaceSettings.hpp:9
END_AH_NAMESPACE
#define END_AH_NAMESPACE
Definition: AH/Settings/NamespaceSettings.hpp:10