VSF Documented
|
#include "hal/arch/vsf_arch_abstraction.h"
#include "service/vsf_service.h"
#include "utilities/vsf_utilities.h"
#include "hal/arch/__vsf_arch_interface.h"
#include <Windows.h>
Data Structures | |
struct | vsf_arch_swi_ctx_t |
struct | vsf_arch_systimer_ctx_t |
struct | vsf_x86_t |
struct | vsf_arch_background_trace_event_t |
struct | vsf_arch_background_trace_t |
struct | vsf_arch_heap_mcb_t |
Macros | |
#define | __VSF_ARCH_WIN_IMPLEMENT |
#define | VSF_ARCH_CFG_LOW_LANTECY DISABLED |
#define | vsf_arch_yield() Sleep(0) |
#define | vsf_arch_trace_callstack(...) |
#define | vsf_arch_trace_irq(...) |
#define | vsf_arch_trace_systimer(...) |
#define | vsf_arch_trace_status(...) |
#define | vsf_arch_trace_function(...) |
#define | VSF_ARCH_CFG_BACKGROUND_TRACE_NUM 1024 |
#define | __VSF_ARCH_CFG_TRACE ENABLED |
#define | VSF_ARCH_CFG_NO_UNLOCKED_SUSPEND_EN ENABLED |
Typedefs | |
typedef struct vsf_arch_swi_ctx_t | vsf_arch_swi_ctx_t |
typedef struct vsf_arch_systimer_ctx_t | vsf_arch_systimer_ctx_t |
typedef struct vsf_x86_t | vsf_x86_t |
typedef enum vsf_arch_irq_pp_t | vsf_arch_irq_pp_t |
preempt_param | |
typedef enum vsf_arch_trace_event_t | vsf_arch_trace_event_t |
typedef struct vsf_arch_background_trace_event_t | vsf_arch_background_trace_event_t |
typedef struct vsf_arch_background_trace_t | vsf_arch_background_trace_t |
typedef struct vsf_arch_heap_mcb_t | vsf_arch_heap_mcb_t |
#define __VSF_ARCH_WIN_IMPLEMENT |
#define VSF_ARCH_CFG_LOW_LANTECY DISABLED |
#define vsf_arch_yield | ( | ) | Sleep(0) |
#define vsf_arch_trace_callstack | ( | ... | ) |
#define vsf_arch_trace_irq | ( | ... | ) |
#define vsf_arch_trace_systimer | ( | ... | ) |
#define vsf_arch_trace_status | ( | ... | ) |
#define vsf_arch_trace_function | ( | ... | ) |
#define VSF_ARCH_CFG_BACKGROUND_TRACE_NUM 1024 |
#define __VSF_ARCH_CFG_TRACE ENABLED |
#define VSF_ARCH_CFG_NO_UNLOCKED_SUSPEND_EN ENABLED |
typedef struct vsf_arch_swi_ctx_t vsf_arch_swi_ctx_t |
typedef struct vsf_arch_systimer_ctx_t vsf_arch_systimer_ctx_t |
typedef enum vsf_arch_irq_pp_t vsf_arch_irq_pp_t |
preempt_param
typedef enum vsf_arch_trace_event_t vsf_arch_trace_event_t |
typedef struct vsf_arch_background_trace_t vsf_arch_background_trace_t |
typedef struct vsf_arch_heap_mcb_t vsf_arch_heap_mcb_t |
enum vsf_arch_irq_pp_t |
anonymous enum |
void __vsf_arch_trace_lock | ( | void | ) |
void __vsf_arch_trace_unlock | ( | void | ) |
void __vsf_arch_irq_start | ( | vsf_arch_irq_thread_t * | irq_thread | ) |
void __vsf_arch_irq_end | ( | vsf_arch_irq_thread_t * | irq_thread, |
bool | is_terminate | ||
) |
void __vsf_arch_irq_fini | ( | vsf_arch_irq_thread_t * | irq_thread | ) |
void __vsf_arch_irq_init | ( | vsf_arch_irq_thread_t * | irq_thread, |
char * | name, | ||
vsf_arch_irq_entry_t | entry, | ||
vsf_arch_prio_t | priority | ||
) |
vsf_arch_irq_thread_t * __vsf_arch_irq_get_cur | ( | void | ) |
void __vsf_arch_irq_set_background | ( | vsf_arch_irq_thread_t * | irq_thread | ) |
void __vsf_arch_irq_request_init | ( | vsf_arch_irq_request_t * | request | ) |
void __vsf_arch_irq_request_fini | ( | vsf_arch_irq_request_t * | request | ) |
void __vsf_arch_irq_request_pend | ( | vsf_arch_irq_request_t * | request | ) |
void __vsf_arch_irq_request_send | ( | vsf_arch_irq_request_t * | request | ) |
vsf_err_t vsf_arch_swi_init | ( | uint_fast8_t | idx, |
vsf_arch_prio_t | priority, | ||
vsf_swi_handler_t * | handler, | ||
void * | param | ||
) |
initialise a software interrupt !
idx | the index of the software interrupt ! |
void vsf_arch_swi_trigger | ( | uint_fast8_t | idx | ) |
trigger a software interrupt !
idx | the index of the software interrupt |
todo: the code is simplified, we need to verify its reilability
vsf_arch_prio_t vsf_set_base_priority | ( | vsf_arch_prio_t | priority | ) |
bool vsf_arch_low_level_init | ( | void | ) |
none |
true | initialization succeeded. |
false | initialization failed |
vsf_gint_state_t vsf_get_interrupt | ( | void | ) |
vsf_gint_state_t vsf_set_interrupt | ( | vsf_gint_state_t | level | ) |
vsf_gint_state_t vsf_disable_interrupt | ( | void | ) |
vsf_gint_state_t vsf_enable_interrupt | ( | void | ) |
void __vsf_arch_irq_sleep | ( | uint_fast32_t | ms | ) |
void vsf_arch_sleep | ( | uint_fast32_t | mode | ) |
arch sleep, will enable global interrupt for wakeup !
mode | the mode of sleep ! |
void __vsf_systimer_thread | ( | void * | arg | ) |
vsf_err_t vsf_systimer_init | ( | void | ) |
initialise SysTick to generate a system timer !
frequency | the target tick frequency in Hz ! |
void vsf_systimer_set_idle | ( | void | ) |
vsf_systimer_tick_t __vsf_systimer_get | ( | void | ) |
vsf_systimer_tick_t vsf_systimer_get | ( | void | ) |
bool vsf_systimer_set | ( | vsf_systimer_tick_t | due | ) |
bool vsf_systimer_is_due | ( | vsf_systimer_tick_t | due | ) |
vsf_systimer_tick_t vsf_systimer_us_to_tick | ( | uint_fast32_t | time_us | ) |
vsf_systimer_tick_t vsf_systimer_ms_to_tick | ( | uint_fast32_t | time_ms | ) |
vsf_systimer_tick_t vsf_systimer_tick_to_us | ( | vsf_systimer_tick_t | tick | ) |
vsf_systimer_tick_t vsf_systimer_tick_to_ms | ( | vsf_systimer_tick_t | tick | ) |
vsf_err_t vsf_systimer_start | ( | void | ) |
void vsf_systimer_prio_set | ( | vsf_arch_prio_t | priority | ) |
void vsf_arch_shutdown | ( | void | ) |
void vsf_arch_reset | ( | void | ) |
void * vsf_arch_heap_malloc | ( | uint_fast32_t | size, |
uint_fast32_t | alignment | ||
) |
void * vsf_arch_heap_realloc | ( | void * | buffer, |
uint_fast32_t | size | ||
) |
void vsf_arch_heap_free | ( | void * | buffer | ) |
unsigned int vsf_arch_heap_alignment | ( | void | ) |
uint_fast32_t vsf_arch_heap_size | ( | void * | buffer | ) |
void * vsf_arch_alloc_exe | ( | uint_fast32_t | size | ) |
void vsf_arch_free_exe | ( | void * | ptr | ) |
int vsf_arch_argu | ( | char *** | argv | ) |
int WINAPI WinMain | ( | HINSTANCE | hinstance, |
HINSTANCE | hPrevInstance, | ||
LPSTR | lpCmdLine, | ||
int | nCmdShow | ||
) |