-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make hardware delay subsitute global
- Loading branch information
1 parent
e6378ce
commit adc41ad
Showing
3 changed files
with
16 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
// Not my favorite way to check this, but if we don't have access | ||
// to vTaskDelay during host compilation so just dummy the function | ||
template <typename T> | ||
requires std::is_integral_v<T> | ||
static void vtask_hardware_delay(T ticks) { | ||
#ifndef INC_TASK_H | ||
std::ignore = ticks; | ||
#else | ||
vTaskDelay(ticks); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters