VSF Documented
device.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/*============================ INCLUDES ======================================*/
19
20#include "hal/vsf_hal_cfg.h"
21
22/*============================ MACROS ========================================*/
23
24/*\note first define basic info for arch. */
25#if defined(__VSF_HEADER_ONLY_SHOW_ARCH_INFO__)
26
27// __vsf_main_entry is called in reset_handler
28#define VSF_KERNEL_CFG_NON_STANDALONE ENABLED
29
30#ifndef VSF_SYSTIMER_CFG_IMPL_MODE
31# define VSF_SYSTIMER_CFG_IMPL_MODE VSF_SYSTIMER_IMPL_WITH_COMP_TIMER
32#endif
33#define VSF_ARCH_PRI_NUM 7
34// do not use PLICSW
35#define VSF_ARCH_SWI_NUM 0
36
37#define __VSF_ARCH_SYSTIMER_BITS 64
38
39#define VSF_ARCH_SYSTIMER_FREQ __hpm_systimer_get_frequency()
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45extern unsigned int __hpm_systimer_get_frequency(void);
46
47#ifndef __VSF_ARCH_PRIO_DEFINED
48#define __VSF_ARCH_PRIO_DEFINED
49typedef enum vsf_arch_prio_t {
52 VSF_ARCH_PRIO_0 = 1,
53 VSF_ARCH_PRIO_1 = 2,
54 VSF_ARCH_PRIO_2 = 3,
55 VSF_ARCH_PRIO_3 = 4,
56 VSF_ARCH_PRIO_4 = 5,
57 VSF_ARCH_PRIO_5 = 6,
58 VSF_ARCH_PRIO_6 = 7,
59 vsf_arch_prio_0 = 1,
60 vsf_arch_prio_1 = 2,
61 vsf_arch_prio_2 = 3,
62 vsf_arch_prio_3 = 4,
63 vsf_arch_prio_4 = 5,
64 vsf_arch_prio_5 = 6,
65 vsf_arch_prio_6 = 7,
68#endif
69
70#ifdef __cplusplus
71}
72#endif
73
74#else
75
76#ifndef __HAL_DEVICE_HPM_HPM6750_H__
77#define __HAL_DEVICE_HPM_HPM6750_H__
78
79/*============================ INCLUDES ======================================*/
80
81// TODO: include header from vendor here
82
83/*\note this is should be the only place where __common.h is included.*/
84#include "../common/__common.h"
85
86/*============================ MACROS ========================================*/
87/*============================ MACROFIED FUNCTIONS ===========================*/
88/*============================ TYPES =========================================*/
89/*============================ GLOBAL VARIABLES ==============================*/
90/*============================ LOCAL VARIABLES ===============================*/
91/*============================ PROTOTYPES ====================================*/
92
93#endif // __HAL_DEVICE_HPM_HPM6750_H__
94#endif // __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
95/* EOF */
unsigned int __hpm_systimer_get_frequency(void)
Definition driver.c:87
vsf_arch_prio_t
Definition cortex_a_generic.h:88
@ VSF_ARCH_PRIO_INVALID
Definition cortex_a_generic.h:92
@ vsf_arch_prio_invalid
Definition cortex_a_generic.h:93
@ vsf_arch_prio_highest
Definition cortex_m_generic.h:167