This is an old version of the documentation. View the latest version
here
.
Control Surface
1.0.0
MIDI Control Surface library for Arduino
src
Hardware
ExtendedInputOutput
StaticSizeExtendedIOElement.hpp
Go to the documentation of this file.
1
/* ✔ */
2
3
#pragma once
4
5
#include "
ExtendedIOElement.hpp
"
6
#include <
Helpers/ArrayHelpers.hpp
>
7
8
BEGIN_CS_NAMESPACE
9
15
template
<u
int
16_t N>
16
class
StaticSizeExtendedIOElement
:
public
ExtendedIOElement
{
17
protected
:
18
StaticSizeExtendedIOElement
() :
ExtendedIOElement
{N} {}
19
20
public
:
24
Array<pin_t, N>
pins
()
const
{
25
return
generateIncrementalArray<pin_t, N>(
getStart
());
26
}
27
28
static
constexpr uint16_t
length
() {
return
N; }
29
};
30
31
END_CS_NAMESPACE
ExtendedIOElement.hpp
StaticSizeExtendedIOElement::StaticSizeExtendedIOElement
StaticSizeExtendedIOElement()
Definition:
StaticSizeExtendedIOElement.hpp:18
StaticSizeExtendedIOElement
A class for ExtendedIOElements with a fixed size.
Definition:
StaticSizeExtendedIOElement.hpp:16
Array< pin_t, N >
ExtendedIOElement::getStart
pin_t getStart() const
Get the smallest global extended IO pin number that belongs to this extended IO element.
Definition:
ExtendedIOElement.cpp:47
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition:
NamespaceSettings.hpp:9
ArrayHelpers.hpp
StaticSizeExtendedIOElement::length
static constexpr uint16_t length()
Definition:
StaticSizeExtendedIOElement.hpp:28
ExtendedIOElement
An abstract base class for Extended Input/Output elements.
Definition:
ExtendedIOElement.hpp:59
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition:
NamespaceSettings.hpp:10
StaticSizeExtendedIOElement::pins
Array< pin_t, N > pins() const
Get an array containing all pins of the element.
Definition:
StaticSizeExtendedIOElement.hpp:24
Generated by
1.8.16