VSF Documented
|
#include "hal/arch/vsf_arch_abstraction.h"
#include "hal/arch/__vsf_arch_interface.h"
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <time.h>
#include <pthread.h>
#include <setjmp.h>
#include <sys/mman.h>
#include "hal/arch/common/arch_without_thread_suspend/vsf_arch_without_thread_suspend_template.inc"
Data Structures | |
struct | vsf_arch_systimer_ctx_t |
struct | vsf_arch_t |
struct | vsf_arch_heap_mcb_t |
Macros | |
#define | __VSF_ARCH_LINUX_IMPLEMENT |
#define | VSF_ARCH_CFG_THREAD_NUM 32 |
#define | VSF_ARCH_CFG_IRQ_REQUEST_NUM (VSF_ARCH_CFG_THREAD_NUM + 32) |
#define | VSF_ARCH_CFG_TRACE_FUNC printf |
#define | VSF_ARCH_CFG_IRQ_TRACE_EN DISABLED |
#define | VSF_ARCH_CFG_REQUEST_TRACE_EN DISABLED |
#define | __VSF_ARCH_LINUX_CFG_SYSTIMER_SIGNAL ENABLED |
#define | vsf_arch_irq_trace(...) VSF_ARCH_CFG_TRACE_FUNC(__VA_ARGS__) |
#define | vsf_arch_request_trace(__request, __event) |
#define | __vsf_arch_crit_init(__crit) pthread_mutex_init(&(__crit), NULL) |
#define | __vsf_arch_crit_enter(__crit) pthread_mutex_lock(&(__crit)) |
#define | __vsf_arch_crit_leave(__crit) pthread_mutex_unlock(&(__crit)) |
#define | __VSF_ARCH_WITHOUT_THREAD_SUSPEND_TEMPLATE__ |
Typedefs | |
typedef pthread_mutex_t | vsf_arch_crit_t |
typedef struct vsf_arch_systimer_ctx_t | vsf_arch_systimer_ctx_t |
typedef struct vsf_arch_t | vsf_arch_t |
typedef struct vsf_arch_heap_mcb_t | vsf_arch_heap_mcb_t |
Variables | |
vsf_arch_thread_t | |
vsf_arch_irq_request_priv_t | |
#define __VSF_ARCH_LINUX_IMPLEMENT |
#define VSF_ARCH_CFG_THREAD_NUM 32 |
#define VSF_ARCH_CFG_IRQ_REQUEST_NUM (VSF_ARCH_CFG_THREAD_NUM + 32) |
#define VSF_ARCH_CFG_TRACE_FUNC printf |
#define VSF_ARCH_CFG_IRQ_TRACE_EN DISABLED |
#define VSF_ARCH_CFG_REQUEST_TRACE_EN DISABLED |
#define __VSF_ARCH_LINUX_CFG_SYSTIMER_SIGNAL ENABLED |
#define vsf_arch_irq_trace | ( | ... | ) | VSF_ARCH_CFG_TRACE_FUNC(__VA_ARGS__) |
#define vsf_arch_request_trace | ( | __request, | |
__event | |||
) |
#define __vsf_arch_crit_init | ( | __crit | ) | pthread_mutex_init(&(__crit), NULL) |
#define __vsf_arch_crit_enter | ( | __crit | ) | pthread_mutex_lock(&(__crit)) |
#define __vsf_arch_crit_leave | ( | __crit | ) | pthread_mutex_unlock(&(__crit)) |
#define __VSF_ARCH_WITHOUT_THREAD_SUSPEND_TEMPLATE__ |
typedef pthread_mutex_t vsf_arch_crit_t |
typedef struct vsf_arch_systimer_ctx_t vsf_arch_systimer_ctx_t |
typedef struct vsf_arch_t vsf_arch_t |
typedef struct vsf_arch_heap_mcb_t vsf_arch_heap_mcb_t |
dcl_vsf_bitmap | ( | vsf_arch_thread_bitmap | , |
VSF_ARCH_CFG_THREAD_NUM | |||
) |
dcl_vsf_bitmap | ( | vsf_arch_irq_request_bitmap | , |
VSF_ARCH_CFG_IRQ_REQUEST_NUM | |||
) |
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 | ) |
void __vsf_arch_irq_exit | ( | vsf_arch_irq_thread_t * | irq_thread | ) |
vsf_err_t __vsf_arch_irq_restart | ( | vsf_arch_irq_thread_t * | irq_thread, |
vsf_arch_irq_request_t * | request_pending | ||
) |
void __vsf_arch_irq_sleep | ( | uint32_t | ms | ) |
vsf_err_t vsf_systimer_init | ( | void | ) |
initialise SysTick to generate a system timer !
frequency | the target tick frequency in Hz ! |
vsf_err_t vsf_systimer_start | ( | void | ) |
void vsf_systimer_set_idle | ( | 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 | ) |
void vsf_systimer_prio_set | ( | vsf_arch_prio_t | priority | ) |
bool vsf_arch_low_level_init | ( | void | ) |
none |
true | initialization succeeded. |
false | initialization failed |
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 | ) |
void vsf_arch_shutdown | ( | void | ) |
void vsf_arch_reset | ( | void | ) |
vsf_arch_thread_t |
vsf_arch_irq_request_priv_t |