VSF Documented
template_generic.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __TEMPLATE_GENERIC_H__
19#define __TEMPLATE_GENERIC_H__
20
21/*============================ INCLUDES ======================================*/
22#include "hal/vsf_hal_cfg.h"
23
24#define __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
25#include "hal/driver/driver.h"
26#undef __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31/*============================ MACROS ========================================*/
32
33#ifndef __BYTE_ORDER
34# define __BYTE_ORDER __LITTLE_ENDIAN
35#endif
36
37#ifndef VSF_ARCH_PRI_NUM
38# define VSF_ARCH_PRI_NUM 0
39#endif
40
41// software interrupt provided by arch
42#define VSF_ARCH_SWI_NUM 0
43
44// template arch supports no systimer
45//#ifndef VSF_SYSTIMER_CFG_IMPL_MODE
46//# define VSF_SYSTIMER_CFG_IMPL_MODE VSF_SYSTIMER_IMPL_WITH_NORMAL_TIMER
47//#endif
48//#define __VSF_ARCH_SYSTIMER_BITS 0
49
50/*============================ MACROFIED FUNCTIONS ===========================*/
51/*============================ TYPES =========================================*/
52
53#if VSF_SYSTIMER_CFG_IMPL_MODE != VSF_SYSTIMER_IMPL_NONE
55#endif
56
57#if VSF_ARCH_PRI_NUM > 0
58
59#define __VSF_ARCH_PRI(__N, __BIT) \
60 VSF_ARCH_PRIO_##__N = __N, \
61 vsf_arch_prio_##__N = __N,
62
63enum vsf_arch_prio_t {
64 // avoid vsf_arch_prio_t to be optimized to 8bit
69
71};
73#endif
74
75/*============================ GLOBAL VARIABLES ==============================*/
76/*============================ LOCAL VARIABLES ===============================*/
77/*============================ PROTOTYPES ====================================*/
78
79// implement vsf_arch_set_stack to use vsf_thread_t
80static VSF_CAL_ALWAYS_INLINE void vsf_arch_set_stack(uint32_t stack, uint32_t stack_size)
81{
82 VSF_HAL_ASSERT(false);
83}
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
90/* EOF */
91
vsf_arch_prio_t
Definition cortex_a_generic.h:85
@ __VSF_ARCH_PRIO_LEAST_MAX
Definition cortex_a_generic.h:87
@ __VSF_ARCH_PRIO_LEAST_MIN
Definition cortex_a_generic.h:88
@ VSF_ARCH_PRIO_INVALID
Definition cortex_a_generic.h:89
@ vsf_arch_prio_invalid
Definition cortex_a_generic.h:90
#define __VSF_ARCH_PRI(__N, __BIT)
Definition cortex_a_generic.h:79
uint64_t vsf_systimer_tick_t
Definition cortex_a_generic.h:70
unsigned uint32_t
Definition stdint.h:9
unsigned long long uint64_t
Definition stdint.h:11
#define INT16_MAX
Definition stdint.h:50
#define INT16_MIN
Definition stdint.h:45
#define VSF_ARCH_PRI_NUM
Definition template_generic.h:38
#define VSF_HAL_ASSERT(__CON)
all hal modules use this configuration file
Definition vsf_hal_cfg.h:36
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51
Generated from commit: vsfteam/vsf@85be636