add digital output pinmap support
This commit is contained in:
parent
83ed233dd4
commit
2fd37fe66d
7 changed files with 63 additions and 30 deletions
|
@ -25,7 +25,7 @@ class DigitalInputCard : public ExpansionCard {
|
|||
// Set the debounce time for the specified pin
|
||||
void setDebounceTime(uint8_t pin, uint32_t debounceTime);
|
||||
// Register a callback function to be called when a pin changes
|
||||
void registerCallback(void (*callback)(uint8_t, bool));
|
||||
void registerCallback(std::function<void(uint8_t, bool)> callback);
|
||||
// Unregister the callback function
|
||||
void unregisterCallback();
|
||||
// Load a new pin map
|
||||
|
@ -47,7 +47,7 @@ class DigitalInputCard : public ExpansionCard {
|
|||
uint8_t pinMap[16];
|
||||
// A map of the virtual pin to the physical pin
|
||||
uint8_t virtualPinMap[16];
|
||||
void (*callback)(uint8_t, bool);
|
||||
std::function<void(uint8_t, bool)> callback;
|
||||
void refreshInputBankA();
|
||||
void refreshInputBankB();
|
||||
void handlePinChange(int pin, uint8_t& currentBuffer, uint8_t& previousBuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue