This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
Classes | Macros | Typedefs | Variables
Def.hpp File Reference
#include "Channel.hpp"
#include "Frequency.hpp"
#include <Helpers/Array.hpp>
#include <Settings/NamespaceSettings.hpp>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for Def.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EncoderSwitchPinList
 A struct for the pins of a rotary (quadrature) encoder with a switch. More...
 
struct  EncoderPinList
 A struct for the pins of a rotary (quadrature) encoder without a switch. More...
 
struct  NormalUpdatable
 
struct  Potentiometer
 
struct  MotorFader
 
struct  Display
 
struct  PixelLocation
 A simple struct representing a pixel with integer coordinates. More...
 

Macros

#define UNUSED_PARAM   __attribute__((unused))
 

Typedefs

using analog_t = uint16_t
 The type returned from analogRead and similar functions. More...
 
using pin_t = uint16_t
 The type for Arduino pins (and ExtendedIOElement pins). More...
 
using MappingFunction = analog_t(*)(analog_t)
 A function pointer to a mapping function to map analog values. More...
 
template<class T , size_t nb_rows, size_t nb_cols>
using Array2D = Array< Array< T, nb_cols >, nb_rows >
 An easy alias for two-dimensional Arrays. More...
 
template<uint8_t nb_rows, uint8_t nb_cols>
using AddressMatrix = Array2D< uint8_t, nb_rows, nb_cols >
 
template<size_t N>
using PinList = Array< pin_t, N >
 An easy alias for arrays of pins. More...
 
using setting_t = uint8_t
 The type used for Selectors. More...
 

Variables

constexpr pin_t NO_PIN = 1 << (8 * sizeof(pin_t) - 1)
 A special pin number that indicates an unused or invalid pin. More...
 
constexpr setting_t NO_SETTING = 1 << (8 * sizeof(setting_t) - 1)
 A special setting that indicates an unused or invalid setting. More...
 

Macro Definition Documentation

◆ UNUSED_PARAM

#define UNUSED_PARAM   __attribute__((unused))

Definition at line 79 of file Def.hpp.

Typedef Documentation

◆ analog_t

using analog_t = uint16_t

The type returned from analogRead and similar functions.

Definition at line 15 of file Def.hpp.

◆ pin_t

using pin_t = uint16_t

The type for Arduino pins (and ExtendedIOElement pins).

Definition at line 17 of file Def.hpp.

◆ MappingFunction

A function pointer to a mapping function to map analog values.

See also
MIDIFilteredAnalog::map()

Definition at line 28 of file Def.hpp.

◆ Array2D

template<class T , size_t nb_rows, size_t nb_cols>
using Array2D = Array<Array<T, nb_cols>, nb_rows>

An easy alias for two-dimensional Arrays.

Definition at line 32 of file Def.hpp.

◆ AddressMatrix

template<uint8_t nb_rows, uint8_t nb_cols>
using AddressMatrix = Array2D<uint8_t, nb_rows, nb_cols>
Todo:
This should be an array of type MIDICNChannelAddress.

Definition at line 36 of file Def.hpp.

◆ PinList

template<size_t N>
using PinList = Array<pin_t, N>

An easy alias for arrays of pins.

Definition at line 40 of file Def.hpp.

◆ setting_t

using setting_t = uint8_t

The type used for Selectors.

Definition at line 63 of file Def.hpp.

Variable Documentation

◆ NO_PIN

constexpr pin_t NO_PIN = 1 << (8 * sizeof(pin_t) - 1)
constexpr

A special pin number that indicates an unused or invalid pin.

Definition at line 24 of file Def.hpp.

◆ NO_SETTING

constexpr setting_t NO_SETTING = 1 << (8 * sizeof(setting_t) - 1)
constexpr

A special setting that indicates an unused or invalid setting.

Definition at line 65 of file Def.hpp.