feat: add lab-rv32i-freertos-mutex card
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef K11_HOST_FREERTOS_H
|
||||
#define K11_HOST_FREERTOS_H
|
||||
#include <stdint.h>
|
||||
typedef int32_t BaseType_t;
|
||||
typedef uint32_t UBaseType_t;
|
||||
typedef uint32_t TickType_t;
|
||||
typedef void * TaskHandle_t;
|
||||
struct MockSemaphore
|
||||
{
|
||||
BaseType_t locked;
|
||||
TaskHandle_t owner;
|
||||
};
|
||||
typedef struct MockSemaphore * SemaphoreHandle_t;
|
||||
typedef struct MockSemaphore StaticSemaphore_t;
|
||||
#define pdFALSE ( ( BaseType_t ) 0 )
|
||||
#define pdTRUE ( ( BaseType_t ) 1 )
|
||||
#define pdFAIL ( ( BaseType_t ) 0 )
|
||||
#define pdPASS ( ( BaseType_t ) 1 )
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef K11_HOST_SEMPHR_H
|
||||
#define K11_HOST_SEMPHR_H
|
||||
#include "FreeRTOS.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SemaphoreHandle_t xSemaphoreCreateMutexStatic( StaticSemaphore_t * );
|
||||
BaseType_t xSemaphoreTake( SemaphoreHandle_t, TickType_t );
|
||||
BaseType_t xSemaphoreGive( SemaphoreHandle_t );
|
||||
TaskHandle_t xSemaphoreGetMutexHolder( SemaphoreHandle_t );
|
||||
void vSemaphoreDelete( SemaphoreHandle_t );
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef K11_HOST_TASK_H
|
||||
#define K11_HOST_TASK_H
|
||||
#include "FreeRTOS.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
TaskHandle_t xTaskGetCurrentTaskHandle( void );
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user