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__)
27# define VSF_ARCH_PRI_NUM 16
28# define VSF_ARCH_PRI_BIT 4
29
30// software interrupt provided by a dedicated device
31#ifndef VSF_DEV_SWI_NUM
32# define VSF_DEV_SWI_NUM 4
33#endif
34#if VSF_DEV_SWI_NUM > VSF_ARCH_PRI_NUM
35# warning too many VSF_DEV_SWI_NUM, max is VSF_ARCH_PRI_NUM
36# undef VSF_DEV_SWI_NUM
37# define VSF_DEV_SWI_NUM VSF_ARCH_PRI_NUM
38#endif
39
40#elif defined(__VSF_HAL_SHOW_VENDOR_INFO__)
41
42#define __VSF_HEADER_ONLY_SHOW_VENDOR_INFO__
43#include "../common/vendor/Inc/stm32h7xx.h"
44
45#else
46
47#ifndef __HAL_DEVICE_ST_STM32H743XI_H__
48#define __HAL_DEVICE_ST_STM32H743XI_H__
49
50// software interrupt provided by a dedicated device
51#define __VSF_DEF_SWI_LIST_DEF(__N, __PARAM) \
52 VSF_MCONNECT(SWI, __N, _IRQn),
53#define VSF_DEV_SWI_LIST VSF_MREPEAT(VSF_DEV_SWI_NUM, __VSF_DEF_SWI_LIST_DEF, NULL)
54
55/*============================ INCLUDES ======================================*/
56
57/*\note this is should be the only place where common.h is included.*/
58#include "../common/common.h"
59
60/*============================ MACROS ========================================*/
61
62// SWI
63
64#define SWI0_IRQn 42
65#define SWI1_IRQn 66
66#define SWI2_IRQn 67
67#define SWI3_IRQn 147
68
69/*============================ MACROFIED FUNCTIONS ===========================*/
70/*============================ TYPES =========================================*/
71/*============================ GLOBAL VARIABLES ==============================*/
72/*============================ LOCAL VARIABLES ===============================*/
73/*============================ PROTOTYPES ====================================*/
74
75#endif // __HAL_DEVICE_ST_STM32H743XI_H__
76#endif // __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
77/* EOF */