MIDIButtonMatrix.
More...
#include <MIDI_Outputs/Bankable/Abstract/MIDIButtonMatrix.hpp>
|
| void | begin () override |
| | Initialize this updatable. More...
|
| |
| void | update () override |
| | Update this updatable. More...
|
| |
| void | enable () |
| | Enable this updatable: insert it into the linked list of instances, so it 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 () |
| | Check if this updatable is enabled. More...
|
| |
| bool | getPrevState (uint8_t col, uint8_t row) |
| | Get the state of the button in the given column and row. More...
|
| |
|
| 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) |
| |
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.
◆ MIDIButtonMatrix()
| MIDIButtonMatrix |
( |
const 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 |
◆ enable() [1/4]
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 45 of file Updatable.hpp.
◆ enable() [2/4]
◆ enable() [3/4]
◆ enable() [4/4]
| static void enable |
( |
U(&) |
array[N] | ) |
|
|
inlinestaticinherited |
◆ disable() [1/4]
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 55 of file Updatable.hpp.
◆ disable() [2/4]
◆ disable() [3/4]
◆ disable() [4/4]
| static void disable |
( |
U(&) |
array[N] | ) |
|
|
inlinestaticinherited |
◆ isEnabled()
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 69 of file Updatable.hpp.
◆ beginAll()
◆ updateAll()
| static void updateAll |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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
◆ next
◆ previous
◆ 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: