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 __LITTLE_ENDIAN
34# define __LITTLE_ENDIAN 1
35#endif
36#ifndef __BYTE_ORDER
37# define __BYTE_ORDER __LITTLE_ENDIAN
38#endif
39
40#ifndef VSF_ARCH_PRI_NUM
41# define VSF_ARCH_PRI_NUM 0
42#endif
43
44// software interrupt provided by arch
45#define VSF_ARCH_SWI_NUM 0
46
47// template arch supports no systimer
48//#ifndef VSF_SYSTIMER_CFG_IMPL_MODE
49//# define VSF_SYSTIMER_CFG_IMPL_MODE VSF_SYSTIMER_IMPL_WITH_NORMAL_TIMER
50//#endif
51//#define __VSF_ARCH_SYSTIMER_BITS 0
52
53/*============================ MACROFIED FUNCTIONS ===========================*/
54/*============================ TYPES =========================================*/
55
56#if VSF_SYSTIMER_CFG_IMPL_MODE != VSF_SYSTIMER_IMPL_NONE
58#endif
59
60#if VSF_ARCH_PRI_NUM > 0
61
62#define __VSF_ARCH_PRI(__N, __BIT) \
63 VSF_ARCH_PRIO_##__N = __N, \
64 vsf_arch_prio_##__N = __N,
65
66enum vsf_arch_prio_t {
67 // avoid vsf_arch_prio_t to be optimized to 8bit
72
74};
76#endif
77
78/*============================ GLOBAL VARIABLES ==============================*/
79/*============================ LOCAL VARIABLES ===============================*/
80/*============================ PROTOTYPES ====================================*/
81
82// implement vsf_arch_set_stack to use vsf_thread_t
83static VSF_CAL_ALWAYS_INLINE void vsf_arch_set_stack(uint32_t stack)
84{
85 VSF_HAL_ASSERT(false);
86}
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif
93/* EOF */
94
vsf_arch_prio_t
Definition cortex_a_generic.h:88
@ __VSF_ARCH_PRIO_LEAST_MAX
Definition cortex_a_generic.h:90
@ __VSF_ARCH_PRIO_LEAST_MIN
Definition cortex_a_generic.h:91
@ VSF_ARCH_PRIO_INVALID
Definition cortex_a_generic.h:92
@ vsf_arch_prio_invalid
Definition cortex_a_generic.h:93
#define __VSF_ARCH_PRI(__N, __BIT)
Definition cortex_a_generic.h:82
uint64_t vsf_systimer_tick_t
Definition cortex_a_generic.h:73
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:41
#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