Skip to content

Commit

Permalink
remove remains of asynchronous interrupt mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicap committed Dec 12, 2023
1 parent 1922e48 commit aba76f4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions main/espFeatures/digitalFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ namespace detail {

DigitalEdge _mode = DigitalEdge::DISABLE;
bool _isAssigned = false;
bool _synchronous; // TODO: maybe remove asynchronous mode?
std::function<void(bool, std::chrono::time_point<std::chrono::steady_clock>)> _callback;

InterruptConf(int debounceMs = 0) : _debounceTicks(debounceMs / portTICK_PERIOD_MS) {}
Expand All @@ -123,11 +122,9 @@ namespace detail {
return true;
}

void setCallback(std::function<void(bool, std::chrono::time_point<std::chrono::steady_clock>)> callback,
bool synchronous) {
void setCallback(std::function<void(bool, std::chrono::time_point<std::chrono::steady_clock>)> callback) {
_isAssigned = false;
_callback = callback;
_synchronous = synchronous;
_isAssigned = bool(callback);
}
};
Expand Down Expand Up @@ -251,7 +248,7 @@ class Digital {
{
pinMode(mode);
enableInterrupt(interruptMode);
_interruptConf.setCallback(callback, true);
_interruptConf.setCallback(callback);
}

Digital(const Digital&) = delete;
Expand Down

0 comments on commit aba76f4

Please sign in to comment.