MIDIButtonMatrix.
More...
#include <MIDI_Outputs/Bankable/Abstract/MIDIButtonMatrix.hpp>
|
void | begin () override |
| Initialize this updatable. More...
|
|
void | update () override |
| Update this updatable. More...
|
|
bool | getPrevState (uint8_t col, uint8_t row) |
| Get the state of the button in the given column and row. More...
|
|
|
Updatable< NormalUpdatable, false > * | next |
|
Updatable< NormalUpdatable, false > * | previous |
|
|
void | onButtonChanged (uint8_t row, uint8_t col, bool state) final override |
| The callback function that is called whenever a button changes state. More...
|
|
void | setPrevState (uint8_t col, uint8_t row, bool state) |
|
|
static void | applyToAll (const LockGuard &, void(Derived::*method)(Args &&...), Args &&... args) |
|
static void | applyToAll (void(Derived::*method)(Args &&...), Args &&... args) |
|
|
void | enable (const LockGuard &lock) |
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
|
|
void | enable () |
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
|
|
void | disable (const LockGuard &lock) |
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
|
|
void | disable () |
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
|
|
bool | isEnabled (const LockGuard &) const |
| Check if this updatable is enabled. More...
|
|
bool | isEnabled () |
| Check if this updatable is enabled. More...
|
|
void | moveDown (const LockGuard &) |
| Move down this element in the list. More...
|
|
void | moveDown () |
| Move down this element in the list. More...
|
|
static void | enable (UpdatableCRTP *element) |
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
|
|
static void | enable (UpdatableCRTP &element) |
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
|
|
static void | enable (U(&array)[N]) |
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
|
|
static void | disable (UpdatableCRTP *element) |
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
|
|
static void | disable (UpdatableCRTP &element) |
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
|
|
static void | disable (U(&array)[N]) |
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
|
|
template<class BankAddress, class Sender, uint8_t nb_rows, uint8_t nb_cols>
class Bankable::MIDIButtonMatrix< BankAddress, Sender, nb_rows, nb_cols >
MIDIButtonMatrix.
- Todo:
- Documentation
- See also
- AH::ButtonMatrix
- Template Parameters
-
BankAddress | The bankable address object containing the addresses of all buttons, as well as a reference to the bank this element belongs to. |
Sender | The MIDI Sender class. |
nb_rows | The number of rows of the button matrix. |
nb_cols | The number of columns of the button matrix. |
Definition at line 29 of file Bankable/Abstract/MIDIButtonMatrix.hpp.
◆ Mutex
◆ LockGuard
◆ MIDIButtonMatrix()
MIDIButtonMatrix |
( |
BankAddress |
bankAddress, |
|
|
const PinList< nb_rows > & |
rowPins, |
|
|
const PinList< nb_cols > & |
colPins, |
|
|
const Sender & |
sender |
|
) |
| |
|
inlineprotected |
Create a new Bankable MIDIButtonMatrix.
- Parameters
-
bankAddress | The bankable MIDI address to send to. |
rowPins | A list of pin numbers connected to the rows of the button matrix.
⚠ These pins will be driven LOW as outputs (Lo-Z). |
colPins | A list of pin numbers connected to the columns of the button matrix.
These pins will be used as inputs (Hi-Z), and the internal pull-up resistor will be enabled. |
sender | The MIDI sender to use. |
Definition at line 50 of file Bankable/Abstract/MIDIButtonMatrix.hpp.
◆ begin()
◆ update()
◆ onButtonChanged()
void onButtonChanged |
( |
uint8_t |
row, |
|
|
uint8_t |
col, |
|
|
bool |
state |
|
) |
| |
|
inlinefinaloverrideprivatevirtual |
◆ beginAll()
◆ updateAll()
static void updateAll |
( |
| ) |
|
|
inlinestaticinherited |
◆ getMutex()
static Mutex& getMutex |
( |
| ) |
|
|
inlinestaticinherited |
◆ applyToAll() [1/2]
static void applyToAll |
( |
const LockGuard & |
, |
|
|
void(Derived::*)(Args &&...) |
method, |
|
|
Args &&... |
args |
|
) |
| |
|
inlinestaticinherited |
◆ applyToAll() [2/2]
static void applyToAll |
( |
void(Derived::*)(Args &&...) |
method, |
|
|
Args &&... |
args |
|
) |
| |
|
inlinestaticinherited |
◆ enable() [1/5]
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 106 of file Updatable.hpp.
◆ enable() [2/5]
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 115 of file Updatable.hpp.
◆ enable() [3/5]
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 144 of file Updatable.hpp.
◆ enable() [4/5]
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 146 of file Updatable.hpp.
◆ enable() [5/5]
static void enable |
( |
U(&) |
array[N] | ) |
|
|
inlinestaticinherited |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 149 of file Updatable.hpp.
◆ disable() [1/5]
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 119 of file Updatable.hpp.
◆ disable() [2/5]
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 128 of file Updatable.hpp.
◆ disable() [3/5]
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 155 of file Updatable.hpp.
◆ disable() [4/5]
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 157 of file Updatable.hpp.
◆ disable() [5/5]
static void disable |
( |
U(&) |
array[N] | ) |
|
|
inlinestaticinherited |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 160 of file Updatable.hpp.
◆ isEnabled() [1/2]
Check if this updatable is enabled.
- Note
- Assumes that the updatable is not added to a different linked list by the user.
Definition at line 136 of file Updatable.hpp.
◆ isEnabled() [2/2]
Check if this updatable is enabled.
- Note
- Assumes that the updatable is not added to a different linked list by the user.
Definition at line 141 of file Updatable.hpp.
◆ moveDown() [1/2]
Move down this element in the list.
Definition at line 166 of file Updatable.hpp.
◆ moveDown() [2/2]
Move down this element in the list.
Definition at line 168 of file Updatable.hpp.
◆ getPrevState()
bool getPrevState |
( |
uint8_t |
col, |
|
|
uint8_t |
row |
|
) |
| |
|
inherited |
Get the state of the button in the given column and row.
- Note
- No bounds checking is performed.
Definition at line 69 of file ButtonMatrix.ipp.
◆ positionToBits()
uint8_t positionToBits |
( |
uint8_t |
col, |
|
|
uint8_t |
row |
|
) |
| |
|
inlinestaticprivateinherited |
◆ bitsToIndex()
uint8_t bitsToIndex |
( |
uint8_t |
bits | ) |
|
|
inlinestaticprivateinherited |
◆ bitsToBitmask()
uint8_t bitsToBitmask |
( |
uint8_t |
bits | ) |
|
|
inlinestaticprivateinherited |
◆ setPrevState()
void setPrevState |
( |
uint8_t |
col, |
|
|
uint8_t |
row, |
|
|
bool |
state |
|
) |
| |
|
privateinherited |
◆ address
◆ activeButtons
uint16_t activeButtons = 0 |
|
private |
◆ sender
◆ updatables
◆ mutex
◆ next
Updatable< NormalUpdatable, false > * next |
|
protectedinherited |
◆ previous
Updatable< NormalUpdatable, false > * previous |
|
protectedinherited |
◆ prevRefresh
unsigned long prevRefresh = 0 |
|
privateinherited |
◆ prevStates
uint8_t prevStates[(nb_cols *nb_rows+7)/8] |
|
privateinherited |
◆ rowPins
const PinList<nb_rows> rowPins |
|
privateinherited |
◆ colPins
const PinList<nb_cols> colPins |
|
privateinherited |
The documentation for this class was generated from the following file: