feat: add lab-rv32i-freertos-scheduler-states card

This commit is contained in:
user
2026-07-21 19:14:20 +02:00
commit 71ddd87301
66 changed files with 34187 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
#ifndef FREERTOS_CPP_TICKS_HPP
#define FREERTOS_CPP_TICKS_HPP
extern "C"
{
#include "FreeRTOS.h"
#include "task.h"
}
namespace freertos
{
class Ticks final
{
public:
explicit constexpr Ticks( TickType_t value ) noexcept : value_ { value }
{
}
constexpr TickType_t count() const noexcept
{
return value_;
}
private:
TickType_t value_;
};
class TickPoint final
{
public:
explicit constexpr TickPoint( TickType_t value ) noexcept : value_ { value }
{
}
static TickPoint now() noexcept
{
return TickPoint { xTaskGetTickCount() };
}
constexpr TickType_t count() const noexcept
{
return value_;
}
friend constexpr Ticks operator-( TickPoint later,
TickPoint earlier ) noexcept
{
return Ticks { static_cast< TickType_t >( later.value_ -
earlier.value_ ) };
}
private:
TickType_t value_;
};
} // namespace freertos
#endif