18#ifndef __VSF_ARCH_ABSTRACTION_H__ 
   19#define __VSF_ARCH_ABSTRACTION_H__ 
   34#define VSF_SYSTIMER_IMPL_NONE                                  0 
   35#define VSF_SYSTIMER_IMPL_REQUEST_RESPONSE                      1 
   36#define VSF_SYSTIMER_IMPL_WITH_NORMAL_TIMER                     2 
   37#define VSF_SYSTIMER_IMPL_WITH_COMP_TIMER                       3 
   38#define VSF_SYSTIMER_IMPL_TICK_MODE                             4 
   43#ifndef VSF_ARCH_ASSERT 
   44#   define VSF_ARCH_ASSERT(...)                 VSF_ASSERT(__VA_ARGS__) 
   79#if !defined(VSF_ARCH_HEADER) 
   82#   define  VSF_ARCH_HEADER     "./rtos/rtos_generic.h" 
   83# elif  defined(__CPU_GENERIC__) 
   84#   if defined(__MACOS__) 
   85#     define  VSF_ARCH_HEADER   "./generic/macos/macos_generic.h" 
   86#   elif defined(__LINUX__) 
   87#     define  VSF_ARCH_HEADER   "./generic/linux/linux_generic.h" 
   89#     error not supported generic arch 
   91# elif  (defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M') || __TARGET_PROFILE_M 
   92#   define VSF_ARCH_HEADER      "./arm/cortex-m/cortex_m_generic.h" 
   93# elif  defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'A' || __TARGET_PROFILE_A 
   94#   define VSF_ARCH_HEADER      "./arm/cortex-a/cortex_a_generic.h" 
   95# elif  defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'R' || __TARGET_PROFILE_R 
   96#   define VSF_ARCH_HEADER      "./arm/cortex-r/cortex_r_generic.h" 
   98# elif  (defined(__CPU_X86__) || defined(__CPU_X64__)) && defined(__WIN__) 
   99#   define  VSF_ARCH_HEADER     "./x86/win/win_generic.h" 
  100# elif  (defined(__CPU_X86__) || defined(__CPU_X64__) || defined(__CPU_WEBASSEMBLY__)) && defined(__LINUX__) 
  101#   define  VSF_ARCH_HEADER     "./generic/linux/linux_generic.h" 
  102# elif  defined(__CPU_MCS51__) 
  103#   define  VSF_ARCH_HEADER     "./mcs51/mcs51_generic.h" 
  104# elif  defined(__CPU_RV__) || defined(__CPU_RISCV__) 
  105#   define  VSF_ARCH_HEADER     "./rv/rv_generic.h" 
  106# elif  defined(__CPU_ARM9__) 
  107#   define  VSF_ARCH_HEADER     "./arm/arm9/arm9_generic.h" 
  109#   warning no supported architecture found, use default arch template! 
  110#   define  VSF_ARCH_HEADER     "./template/template_generic.h" 
  113#include VSF_ARCH_HEADER 
  121#ifndef VSF_ARCH_SWI_NUM 
  122#   define VSF_ARCH_SWI_NUM                 0 
  124#ifndef VSF_DEV_SWI_NUM 
  125#   define VSF_DEV_SWI_NUM                  0 
  129#   error "__BYTE_ORDER MUST be defined in arch" 
  132#define VSF_SWI_NUM                         (VSF_ARCH_SWI_NUM + VSF_DEV_SWI_NUM) 
  134#define ___constant_swab16(__x) ((uint16_t)(                                    \ 
  135    (((uint16_t)(__x) & (uint16_t)0x00FFU) << 8) |                              \ 
  136    (((uint16_t)(__x) & (uint16_t)0xFF00U) >> 8))) 
  138#define ___constant_swab32(__x) ((uint32_t)(                                    \ 
  139    (((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) |                        \ 
  140    (((uint32_t)(__x) & (uint32_t)0x0000ff00UL) <<  8) |                        \ 
  141    (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >>  8) |                        \ 
  142    (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24))) 
  144#define ___constant_swab64(__x) ((uint64_t)(                                    \ 
  145    (((uint64_t)(__x) & (uint64_t)0x00000000000000ffULL) << 56) |               \ 
  146    (((uint64_t)(__x) & (uint64_t)0x000000000000ff00ULL) << 40) |               \ 
  147    (((uint64_t)(__x) & (uint64_t)0x0000000000ff0000ULL) << 24) |               \ 
  148    (((uint64_t)(__x) & (uint64_t)0x00000000ff000000ULL) <<  8) |               \ 
  149    (((uint64_t)(__x) & (uint64_t)0x000000ff00000000ULL) >>  8) |               \ 
  150    (((uint64_t)(__x) & (uint64_t)0x0000ff0000000000ULL) >> 24) |               \ 
  151    (((uint64_t)(__x) & (uint64_t)0x00ff000000000000ULL) >> 40) |               \ 
  152    (((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56))) 
  154#define bswap16                             bswap_16 
  155#define bswap32                             bswap_32 
  156#define bswap64                             bswap_64 
  157#if __BYTE_ORDER == __BIG_ENDIAN 
  162#       define htole16                      bswap_16 
  168#       define le16toh                      bswap_16 
  174#       define htole32                      bswap_32 
  180#       define le32toh                      bswap_32 
  186#       define htole64                      bswap_64 
  192#       define le64toh                      bswap_64 
  195#   define cpu_to_le16                      bswap_16 
  196#   define cpu_to_le32                      bswap_32 
  197#   define cpu_to_le64                      bswap_64 
  198#   define le16_to_cpu                      bswap_16 
  199#   define le32_to_cpu                      bswap_32 
  200#   define le64_to_cpu                      bswap_64 
  208#   define __constant_cpu_to_le16           ___constant_swab16 
  209#   define __constant_le16_to_cpu           ___constant_swab16 
  210#   define __constant_cpu_to_le32           ___constant_swab32 
  211#   define __constant_le32_to_cpu           ___constant_swab32 
  212#   define __constant_cpu_to_le64           ___constant_swab64 
  213#   define __constant_le64_to_cpu           ___constant_swab64 
  214#   define __constant_cpu_to_be16 
  215#   define __constant_be16_to_cpu 
  216#   define __constant_cpu_to_be32 
  217#   define __constant_be32_to_cpu 
  218#   define __constant_cpu_to_be64 
  219#   define __constant_be64_to_cpu 
  222#       define htobe16                      bswap_16 
  228#       define be16toh                      bswap_16 
  234#       define htobe32                      bswap_32 
  240#       define be32toh                      bswap_32 
  246#       define htobe64                      bswap_64 
  252#       define be64toh                      bswap_64 
  264#   define cpu_to_be16                      bswap_16 
  265#   define cpu_to_be32                      bswap_32 
  266#   define cpu_to_be64                      bswap_64 
  267#   define be16_to_cpu                      bswap_16 
  268#   define be32_to_cpu                      bswap_32 
  269#   define be64_to_cpu                      bswap_64 
  271#   define __constant_cpu_to_le16 
  272#   define __constant_le16_to_cpu 
  273#   define __constant_cpu_to_le32 
  274#   define __constant_le32_to_cpu 
  275#   define __constant_cpu_to_le64 
  276#   define __constant_le64_to_cpu 
  277#   define __constant_cpu_to_be16           ___constant_swab16 
  278#   define __constant_be16_to_cpu           ___constant_swab16 
  279#   define __constant_cpu_to_be32           ___constant_swab32 
  280#   define __constant_be32_to_cpu           ___constant_swab32 
  281#   define __constant_cpu_to_be64           ___constant_swab64 
  282#   define __constant_be64_to_cpu           ___constant_swab64 
  285#define DECLARE_ENDIAN_FUNC(__bitlen)                                           \ 
  286extern uint_fast##__bitlen##_t cpu_to_le##__bitlen##p(uint##__bitlen##_t *);    \ 
  287extern uint_fast##__bitlen##_t cpu_to_be##__bitlen##p(uint##__bitlen##_t *);    \ 
  288extern uint_fast##__bitlen##_t le##__bitlen##_to_cpup(uint##__bitlen##_t *);    \ 
  289extern uint_fast##__bitlen##_t be##__bitlen##_to_cpup(uint##__bitlen##_t *);    \ 
  290extern void cpu_to_le##__bitlen##s(uint##__bitlen##_t *);                       \ 
  291extern void cpu_to_be##__bitlen##s(uint##__bitlen##_t *);                       \ 
  292extern void le##__bitlen##_to_cpus(uint##__bitlen##_t *);                       \ 
  293extern void be##__bitlen##_to_cpus(uint##__bitlen##_t *);                       \ 
  294extern uint_fast##__bitlen##_t get_unaligned_cpu##__bitlen(const void *);       \ 
  295extern uint_fast##__bitlen##_t get_unaligned_le##__bitlen(const void *);        \ 
  296extern uint_fast##__bitlen##_t get_unaligned_be##__bitlen(const void *);        \ 
  297extern void put_unaligned_cpu##__bitlen(uint_fast##__bitlen##_t, void *);       \ 
  298extern void put_unaligned_le##__bitlen(uint_fast##__bitlen##_t, void *);        \ 
  299extern void put_unaligned_be##__bitlen(uint_fast##__bitlen##_t, void *); 
  301#define __vsf_protect_region(__region)                                          \ 
  302    for (vsf_protect_t VSF_MACRO_SAFE_NAME(protect_status),                     \ 
  303            VSF_MACRO_SAFE_NAME(local_cnt) = 1;                                 \ 
  304        (((__region) != NULL) && VSF_MACRO_SAFE_NAME(local_cnt)--) ?            \ 
  305            ((VSF_MACRO_SAFE_NAME(protect_status) = (__region)->enter()), true) : false;\ 
  306        (__region)->leave(VSF_MACRO_SAFE_NAME(protect_status))) 
  307#define vsf_protect_region(__region)        __vsf_protect_region(__region) 
  308#define vsf_protect_region_exit(__region)   continue 
  310#define vsf_protect_region_simple(__region, ...)                                \ 
  312            if (__region != NULL) {                                             \ 
  313                vsf_protect_t VSF_MACRO_SAFE_NAME(protect_status) = (__region)->enter();\ 
  315                (__region)->leave(VSF_MACRO_SAFE_NAME(protect_status));         \ 
  325#ifndef __vsf_interrupt_safe 
  326#   if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(__cplusplus) 
  327#       define __vsf_interrupt_safe(__code)                                     \ 
  329            vsf_gint_state_t VSF_MACRO_SAFE_NAME(gint_state) = vsf_disable_interrupt();\ 
  331            vsf_set_interrupt(VSF_MACRO_SAFE_NAME(gint_state));                 \ 
  334#       define __vsf_interrupt_safe(...)                                        \ 
  336            vsf_gint_state_t VSF_MACRO_SAFE_NAME(gint_state) = vsf_disable_interrupt();\ 
  338            vsf_set_interrupt(VSF_MACRO_SAFE_NAME(gint_state));                 \ 
  347#ifndef vsf_interrupt_safe 
  348#   define vsf_interrupt_safe()             vsf_protect_region(&vsf_protect_region_int) 
  356#ifndef vsf_interrupt_safe_simple 
  358#   define vsf_interrupt_safe_simple(...)                                       \ 
  359                vsf_protect_region_simple(&vsf_protect_region_int, __VA_ARGS__) 
  364#define vsf_protect_interrupt()             vsf_disable_interrupt() 
  365#define vsf_unprotect_interrupt(__state)    vsf_set_interrupt(__state) 
  366#define vsf_protect_none()                  (0) 
  367#define vsf_unprotect_none(__state)         VSF_UNUSED_PARAM(__state) 
  369#define vsf_protect_int                     vsf_protect_interrupt 
  370#define vsf_unprotect_int                   vsf_unprotect_interrupt 
  372#define __vsf_protect(__type)               vsf_protect_##__type 
  373#define __vsf_unprotect(__type)             vsf_unprotect_##__type 
  374#define vsf_protect(__type)                 __vsf_protect(__type) 
  375#define vsf_unprotect(__type)               __vsf_unprotect(__type) 
  380#   define vsf_atom64_op(__ptr, ...)                                            \ 
  382            vsf_protect_t VSF_MACRO_SAFE_NAME(orig) = vsf_protect_int();        \ 
  383            int64_t _ = (*(int64_t *)(__ptr));                                  \ 
  384            *(int64_t *)(__ptr) = (__VA_ARGS__);                                \ 
  385            vsf_unprotect_int(VSF_MACRO_SAFE_NAME(orig));                       \ 
  391#   define vsf_atom32_op(__ptr, ...)                                            \ 
  393            vsf_protect_t VSF_MACRO_SAFE_NAME(orig) = vsf_protect_int();        \ 
  394            int32_t _ = (*(int32_t *)(__ptr));                                  \ 
  395            *(int32_t *)(__ptr) = (__VA_ARGS__);                                \ 
  396            vsf_unprotect_int(VSF_MACRO_SAFE_NAME(orig));                       \ 
  402#   define vsf_atom16_op(__ptr, ...)                                            \ 
  404            vsf_protect_t VSF_MACRO_SAFE_NAME(orig) = vsf_protect_int();        \ 
  405            int16_t _ = (*(int16_t *)(__ptr));                                  \ 
  406            *(int16_t *)(__ptr) = (__VA_ARGS__);                                \ 
  407            vsf_unprotect_int(VSF_MACRO_SAFE_NAME(orig));                       \ 
  413#   define vsf_atom8_op(__ptr, ...)                                             \ 
  415            vsf_protect_t VSF_MACRO_SAFE_NAME(orig) = vsf_protect_int();        \ 
  416            int8_t _ = (*(int8_t *)(__ptr));                                    \ 
  417            *(int8_t *)(__ptr) = (__VA_ARGS__);                                 \ 
  418            vsf_unprotect_int(VSF_MACRO_SAFE_NAME(orig));                       \ 
  424#   define vsf_atom_add(__bitlen, __ptr, __value)                               \ 
  425        VSF_MCONNECT(vsf_atom, __bitlen, _op)((__ptr), _ + (__value)) 
  428#   define vsf_atom_dec(__bitlen, __ptr, __value)                               \ 
  429        vsf_atom_add(__bitlen, (__ptr), - (__value)) 
  432#   define vsf_atom_or(__bitlen, __ptr, __value)                                \ 
  433        VSF_MCONNECT(vsf_atom, __bitlen, _op)((__ptr), _ | (__value)) 
  436#   define vsf_atom_and(__bitlen, __ptr, __value)                               \ 
  437        VSF_MCONNECT(vsf_atom, __bitlen, _op)((__ptr), _ & (__value)) 
  440#   define vsf_atom_xor(__bitlen, __ptr, __value)                               \ 
  441        VSF_MCONNECT(vsf_atom, __bitlen, _op)((__ptr), _ ^ (__value)) 
  444#   define vsf_atom_xchg(__bitlen, __ptr, __new_value)                          \ 
  445        VSF_MCONNECT(vsf_atom, __bitlen, _op)((__ptr), (__new_value)) 
  449#define vsf_arch_host_invoke_ctx_t(__name)  VSF_MCONNECT(__name, _ctx_t) 
  450#define declare_vsf_arch_host_invoke(__name)                                    \ 
  451        typedef struct vsf_arch_host_invoke_ctx_t(__name)                       \ 
  452                vsf_arch_host_invoke_ctx_t(__name);                             \ 
  453        typedef struct VSF_MCONNECT(__name, _t) VSF_MCONNECT(__name, _t);       \ 
  454        extern void VSF_MCONNECT(__name, _callback_t)                           \ 
  455                (vsf_arch_host_invoke_ctx_t(__name) *ctx);                      \ 
  456        extern VSF_MCONNECT(__name, _t) VSF_MCONNECT(__name, _instance); 
  457#define dcl_vsf_arch_host_invoke        declare_vsf_arch_host_invoke 
  458#define define_vsf_arch_host_invoke(__name, ...)                                \ 
  459        typedef struct vsf_arch_host_invoke_ctx_t(__name) {                     \ 
  462        } vsf_arch_host_invoke_ctx_t(__name);                                   \ 
  463        typedef struct VSF_MCONNECT(__name, _t) {                               \ 
  464            implement(vsf_arch_irq_thread_t);                                   \ 
  465            vsf_arch_irq_request_t request;                                     \ 
  467            vsf_arch_host_invoke_ctx_t(__name) ctx;                             \ 
  468        } VSF_MCONNECT(__name, _t); 
  469#define def_vsf_arch_host_invoke        define_vsf_arch_host_invoke 
  470#define implement_vsf_arch_host_invoke(__name)                                  \ 
  471        VSF_MCONNECT(__name, _t) VSF_MCONNECT(__name, _instance);               \ 
  472        extern void VSF_MCONNECT(__name, _callback_t)                           \ 
  473                (vsf_arch_host_invoke_ctx_t(__name) *ctx);                      \ 
  474        static void VSF_MCONNECT(__name, _thread)(void *arg)                    \ 
  477            VSF_MCONNECT(__name, _t) *ctx = arg;                                \ 
  478            __vsf_arch_irq_set_background(&ctx->use_as__vsf_arch_irq_thread_t); \ 
  480                __vsf_arch_irq_request_pend(&ctx->request);                     \ 
  481                VSF_MCONNECT(__name, _callback_t)(&ctx->ctx);                   \ 
  483                __vsf_arch_irq_start(&ctx->use_as__vsf_arch_irq_thread_t);      \ 
  484                    caller = ctx->caller;                                       \ 
  485                    if (caller != NULL) {                                       \ 
  486                        ctx->caller = NULL;                                     \ 
  487                        vsf_eda_post_evt(caller, VSF_EVT_USER);                 \ 
  489                __vsf_arch_irq_end(&ctx->use_as__vsf_arch_irq_thread_t, false); \ 
  492        void VSF_MCONNECT(__name, _callback_t)(vsf_arch_host_invoke_ctx_t(__name) *_) 
  493#define imp_vsf_arch_host_invoke        implement_vsf_arch_host_invoke 
  494#define initialize_vsf_arch_host_invoke(__name, __priority)                     \ 
  496            memset(&VSF_MCONNECT(__name, _instance), 0,                         \ 
  497                    sizeof(VSF_MCONNECT(__name, _t)));                          \ 
  498            __vsf_arch_irq_request_init(&VSF_MCONNECT(__name, _instance).request);\ 
  499            __vsf_arch_irq_init(                                                \ 
  500                    &VSF_MCONNECT(__name, _instance).use_as__vsf_arch_irq_thread_t,\ 
  501                    VSF_STR(__name), VSF_MCONNECT(__name, _thread), (__priority));\ 
  503#define init_vsf_arch_host_invoke       initialize_vsf_arch_host_invoke 
  504#define vsf_arch_host_invoke_nb(__name, __eda_ptr, __ctx_ptr)                   \ 
  506            VSF_MCONNECT(__name, _instance).ctx = *(__ctx_ptr);                 \ 
  507            VSF_MCONNECT(__name, _instance).caller = (__eda_ptr);               \ 
  508            __vsf_arch_irq_request_send(&VSF_MCONNECT(__name, _instance).request);\ 
  510#define vsf_arch_host_invoke_get_result_nb(__name, __ctx_ptr)                   \ 
  512            *(__ctx_ptr) = VSF_MCONNECT(__name, _instance).ctx;                 \ 
  514#define vsf_arch_host_invoke_in_thread(__name, __ctx_ptr)                       \ 
  516            vsf_eda_t VSF_MACRO_SAFE_NAME(eda) = vsf_eda_get_cur();             \ 
  517            VSF_ARCH_ASSERT(VSF_MACRO_SAFE_NAME(eda) != NULL);                  \ 
  518            vsf_arch_host_invoke_nb(__name, VSF_MACRO_SAFE_NAME(eda), (__ctx_ptr));\ 
  519            vsf_thread_wfe(VSF_EVT_USER);                                       \ 
  520            vsf_arch_host_invoke_get_result_nb(__name, __ctx_ptr);              \ 
  525#if VSF_ARCH_PROVIDE_HEAP == ENABLED 
  531#   if VSF_ARCH_HEAP_HAS_STATISTICS == ENABLED 
  562#if VSF_APPLET_USE_ARCH == ENABLED 
  570#   ifndef __VSF_APPLET__ 
  575#if     defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_ARCH_LIB__))\ 
  576    && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_APPLET_USE_ARCH == ENABLED 
  578#ifndef VSF_APPLET_ARCH_VPLT 
  579#   define VSF_APPLET_ARCH_VPLT                                                 \ 
  580            ((vsf_arch_vplt_t *)(((vsf_vplt_t *)vsf_vplt((void *)0))->arch_vplt)) 
  583#define VSF_APPLET_ARCH_ENTRY(__NAME)                                           \ 
  584            VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_APPLET_ARCH_VPLT, __NAME) 
  585#define VSF_APPLET_ARCH_IMP(...)                                                \ 
  586            VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_APPLET_ARCH_VPLT, __VA_ARGS__) 
  598    return VSF_APPLET_ARCH_ENTRY(bswap_64)(
value);
 
  636#ifdef VSF_SYSTIMER_CFG_IMPL_MODE 
  643extern uint32_t vsf_systimer_get_freq(
void);
 
vsf_err_t
Definition __type.h:42
uint_fast8_t uintalu_t
Definition type.h:88
vsf_arch_prio_t
Definition cortex_a_generic.h:88
uint64_t vsf_systimer_tick_t
Definition cortex_a_generic.h:73
void vsf_systimer_prio_set(vsf_arch_prio_t priority)
Definition cortex_m_generic.c:244
vsf_systimer_tick_t vsf_systimer_get(void)
Definition linux_generic.c:402
void vsf_systimer_set_idle(void)
Definition linux_generic.c:398
vsf_systimer_tick_t vsf_systimer_tick_to_us(vsf_systimer_tick_t tick)
Definition linux_generic.c:445
bool vsf_systimer_is_due(vsf_systimer_tick_t due)
Definition linux_generic.c:430
vsf_systimer_tick_t vsf_systimer_ms_to_tick(uint_fast32_t time_ms)
Definition linux_generic.c:440
vsf_systimer_tick_t vsf_systimer_us_to_tick(uint_fast32_t time_us)
Definition linux_generic.c:435
vsf_systimer_tick_t vsf_systimer_tick_to_ms(vsf_systimer_tick_t tick)
Definition linux_generic.c:450
vsf_err_t vsf_systimer_start(void)
Definition linux_generic.c:390
bool vsf_systimer_set(vsf_systimer_tick_t due)
Definition linux_generic.c:409
uint32_t uintptr_t
Definition stdint.h:38
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned uint32_t
Definition stdint.h:9
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned short uint_fast16_t
Definition stdint.h:25
unsigned long long uint_fast64_t
Definition stdint.h:29
char int_fast8_t
Definition stdint.h:22
Definition vsf_arch_abstraction.h:532
uint32_t used_size
Definition vsf_arch_abstraction.h:534
uint32_t all_size
Definition vsf_arch_abstraction.h:533
Definition vsf_arch_abstraction.h:60
vsf_arch_text_region_t * next
Definition vsf_arch_abstraction.h:61
uintptr_t size
Definition vsf_arch_abstraction.h:63
uintptr_t start
Definition vsf_arch_abstraction.h:62
Definition vsf_arch_abstraction.h:563
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(bswap_64)
vsf_vplt_info_t info
Definition vsf_arch_abstraction.h:564
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(bswap_16)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(bswap_32)
Definition vsf_arch_abstraction.h:54
void(* leave)(vsf_protect_t orig)
Definition vsf_arch_abstraction.h:56
vsf_protect_t(* enter)(void)
Definition vsf_arch_abstraction.h:55
uint_fast32_t bswap_32(uint_fast32_t)
Definition cortex_a_generic.c:160
vsf_err_t vsf_swi_init(uint_fast8_t idx, vsf_arch_prio_t priority, vsf_swi_handler_t *handler, void *param)
Definition vsf_arch_abstraction.c:511
const vsf_protect_region_t vsf_protect_region_int
Definition vsf_arch_abstraction.c:191
uint_fast8_t vsf_clz32(uint_fast32_t)
Definition vsf_arch_abstraction.c:343
bool vsf_irq_is_pending(int irqn)
Definition cortex_m_generic.c:142
uintalu_t vsf_protect_t
Definition vsf_arch_abstraction.h:53
int_fast8_t vsf_ffs32(uint_fast32_t)
Definition vsf_arch_abstraction.c:412
const vsf_protect_region_t vsf_protect_region_none
Definition vsf_arch_abstraction.c:196
void vsf_arch_shutdown(void)
Definition cortex_m_generic.c:461
void vsf_arch_heap_free(void *buffer)
Definition linux_generic.c:566
unsigned int vsf_arch_heap_alignment(void)
Definition linux_generic.c:572
void vsf_arch_reset(void)
Definition cortex_m_generic.c:455
#define DECLARE_ENDIAN_FUNC(__bitlen)
Definition vsf_arch_abstraction.h:285
void * vsf_arch_heap_malloc(uint_fast32_t size, uint_fast32_t alignment)
Definition linux_generic.c:518
void vsf_irq_pend(int irqn)
Definition cortex_m_generic.c:130
uint32_t vsf_irq_get_priority(int irqn)
Definition cortex_m_generic.c:154
vsf_gint_state_t vsf_disable_interrupt(void)
Definition arm9_generic.c:176
vsf_irq_handler_t vsf_swi_handler_t
Definition vsf_arch_abstraction.h:51
vsf_arch_prio_t vsf_get_base_priority(void)
Definition cortex_m_generic.c:321
void vsf_irq_unpend(int irqn)
Definition cortex_m_generic.c:136
vsf_gint_state_t vsf_get_interrupt(void)
Definition arm9_generic.c:164
void vsf_irq_enable(int irqn)
Definition cortex_m_generic.c:112
void * vsf_arch_heap_realloc(void *buffer, uint_fast32_t size)
Definition linux_generic.c:541
bool vsf_irq_is_enabled(int irqn)
Definition cortex_m_generic.c:124
void vsf_swi_trigger(uint_fast8_t idx)
Definition vsf_arch_abstraction.c:469
void vsf_irq_handler_t(void *p)
Definition vsf_arch_abstraction.h:50
void vsf_arch_heap_statistics(vsf_arch_heap_statistics_t *statistics)
Definition common.c:108
void vsf_arch_sleep(uint_fast32_t mode)
Definition cortex_m_generic.c:439
__VSF_VPLT_DECORATOR__ vsf_arch_vplt_t vsf_arch_vplt
Definition vsf_arch_abstraction.c:1100
void vsf_arch_swi_trigger(uint_fast8_t idx)
trigger a software interrupt !
Definition cortex_m_generic.c:301
uint_fast16_t bswap_16(uint_fast16_t)
Definition cortex_a_generic.c:155
void vsf_irq_set_priority(int irqn, uint32_t priority)
Definition cortex_m_generic.c:148
vsf_gint_state_t vsf_enable_interrupt(void)
Definition arm9_generic.c:181
uint_fast32_t vsf_arch_heap_size(void *buffer)
Definition linux_generic.c:577
vsf_arch_prio_t vsf_set_base_priority(vsf_arch_prio_t priority)
Definition cortex_m_generic.c:326
int_fast8_t vsf_msb32(uint_fast32_t)
Definition vsf_arch_abstraction.c:378
void vsf_irq_disable(int irqn)
Definition cortex_m_generic.c:118
int vsf_get_interrupt_id(void)
Definition cortex_m_generic.c:429
vsf_gint_state_t vsf_set_interrupt(vsf_gint_state_t level)
Definition arm9_generic.c:169
int_fast8_t vsf_ffz32(uint_fast32_t)
Definition vsf_arch_abstraction.c:447
vk_av_control_value_t value
Definition vsf_audio.h:171
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165
uint_fast32_t alignment
Definition vsf_heap.h:147
uint32_t size
Definition vsf_memfs.h:50