feat: publish FreeRTOS C FC07 card
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#ifndef TASK01_ISR_SEMAPHORE_H
|
||||
#define TASK01_ISR_SEMAPHORE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
#include "task01_isr_semaphore_model.h"
|
||||
|
||||
#define FC07_IRQ_NUMBER 5U
|
||||
#define FC07_IRQ_MASK ( 1UL << FC07_IRQ_NUMBER )
|
||||
#define FC07_TASK_STACK_WORDS 256U
|
||||
#define FC07_WAITER_PRIORITY 3U
|
||||
#define FC07_STIMULUS_PRIORITY 2U
|
||||
#define FC07_VERIFIER_PRIORITY 1U
|
||||
#define FC07_EVENT_CAPACITY 10U
|
||||
#define FC07_TIMEOUT_TICKS 20U
|
||||
|
||||
typedef struct IsrExperiment
|
||||
{
|
||||
SemaphoreHandle_t semaphore;
|
||||
TaskHandle_t waiter;
|
||||
TaskHandle_t stimulus;
|
||||
TaskHandle_t verifier;
|
||||
uintptr_t waiter_sp;
|
||||
uintptr_t stimulus_sp;
|
||||
uintptr_t isr_sp;
|
||||
uint32_t mcause;
|
||||
uint32_t irq_source_after_clear;
|
||||
BaseType_t higher_priority_task_woken;
|
||||
uint32_t waiter_ran;
|
||||
uint32_t stimulus_after;
|
||||
uint32_t pass;
|
||||
uint32_t digest;
|
||||
} IsrExperiment;
|
||||
|
||||
extern IsrExperiment g_fc07;
|
||||
extern IsrEvidence g_fc07_events[ FC07_EVENT_CAPACITY ];
|
||||
extern volatile uint32_t g_fc07_event_count;
|
||||
extern volatile uint32_t g_fc07_last_checkpoint;
|
||||
extern volatile uint32_t g_fc07_pass;
|
||||
|
||||
void fc07_checkpoint_committed( uint32_t point, const void * subject );
|
||||
void freertos_risc_v_application_interrupt_handler( void );
|
||||
void fc07_waiter_entry( void * context );
|
||||
void fc07_stimulus_entry( void * context );
|
||||
void fc07_verifier_entry( void * context );
|
||||
#endif
|
||||
Reference in New Issue
Block a user