return callback handler

This commit is contained in:
Siwat Sirichai 2023-12-31 13:32:38 +07:00
parent 5f6e586945
commit 724f8f42e9
8 changed files with 20 additions and 15 deletions

View file

@ -26,7 +26,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(std::function<void(uint8_t, bool)> callback);
uint8_t registerCallback(std::function<void(uint8_t, bool)> callback);
// Unregister the callback function
void unregisterCallback(uint8_t handler);
// Load a new pin map