Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Commit

Permalink
LowPowerTicker - Add ::attach(...) method + call callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed May 10, 2022
1 parent d5506b0 commit 26a01e9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/tests/UNITTESTS/doubles/drivers/LowPowerTicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,23 @@ namespace mbed {
class LowPowerTicker {

public:
LowPowerTicker()
{
}
LowPowerTicker() = default;

virtual ~LowPowerTicker() = default;

virtual ~LowPowerTicker()
void attach(Callback<void()> func, std::chrono::microseconds t)
{
func();
}

void attach_us(Callback<void()> func, us_timestamp_t t)
{

func();
}

void detach()
{

// nothing to do
}
};

Expand Down

0 comments on commit 26a01e9

Please sign in to comment.