adding freeRtos API from different project

This commit is contained in:
2024-11-16 15:50:59 +01:00
parent 49b3b46ffe
commit deccb3186c
14 changed files with 1061 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#include "esp_log.h"
#include "esp_timer.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "sdkconfig.h"
#include <stdio.h>
constexpr int StackSize = 1024;
#include <unity.h>
class TimeTest {
private:
bool running{};
TickType_t _begin;
public:
TimeTest() {
start();
}
void start() {
_begin = xTaskGetTickCount();
running = true;
}
TickType_t getRunTime() {
return xTaskGetTickCount() - _begin;
}
};