feat: add lab-rv32i-freertos-sw-timer card
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef HOST_FREERTOS_H
|
||||
#define HOST_FREERTOS_H
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
using BaseType_t = std::int32_t;
|
||||
using UBaseType_t = std::uint32_t;
|
||||
using TickType_t = std::uint32_t;
|
||||
|
||||
struct StaticTimer_t
|
||||
{
|
||||
alignas( std::max_align_t ) unsigned char bytes[ 160 ];
|
||||
};
|
||||
|
||||
#define pdFALSE 0
|
||||
#define pdTRUE 1
|
||||
#define pdFAIL 0
|
||||
#define pdPASS 1
|
||||
#define configASSERT( condition ) assert( condition )
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef HOST_TIMERS_H
|
||||
#define HOST_TIMERS_H
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
struct FakeTimer;
|
||||
using TimerHandle_t = FakeTimer *;
|
||||
using TimerCallbackFunction_t = void ( * )( TimerHandle_t );
|
||||
|
||||
extern "C" TimerHandle_t xTimerCreateStatic( const char *, TickType_t, BaseType_t,
|
||||
void *, TimerCallbackFunction_t,
|
||||
StaticTimer_t * );
|
||||
extern "C" BaseType_t xTimerStart( TimerHandle_t, TickType_t );
|
||||
extern "C" BaseType_t xTimerReset( TimerHandle_t, TickType_t );
|
||||
extern "C" BaseType_t xTimerChangePeriod( TimerHandle_t, TickType_t, TickType_t );
|
||||
extern "C" BaseType_t xTimerStop( TimerHandle_t, TickType_t );
|
||||
extern "C" BaseType_t xTimerIsTimerActive( TimerHandle_t );
|
||||
extern "C" TickType_t xTimerGetPeriod( TimerHandle_t );
|
||||
extern "C" void * pvTimerGetTimerID( TimerHandle_t );
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user