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#ifndef VSF_ARCH_SWI_NUM
28# define VSF_ARCH_SWI_NUM 4
29#endif
30
31#ifndef VSF_ARCH_RTOS_CFG_STACK_DEPTH
32# define VSF_ARCH_RTOS_CFG_STACK_DEPTH 4096
33#endif
34
35#define VSF_ARCH_FREERTOS_CFG_IS_IN_ISR xPortInIsrContext
36
37// software interrupt provided by a dedicated device
38#define VSF_DEV_SWI_NUM 0
39
40#ifndef __RTOS__
41# define __RTOS__
42#endif
43#ifndef __FREERTOS__
44# define __FREERTOS__
45#endif
46
47// alu types, should be defined in target-specified compiler header
48// but xtensa uses generic compiler header, so define alu types here
49typedef unsigned int uintalu_t;
50typedef int intalu_t;
51
52// SET_STACK will fail to pass stack check
53//#include "xt_instr_macros.h"
54//#define VSF_ARCH_RTOS_CFG_SET_STACK(__STACK) SET_STACK(__STACK)
55
56// 16-byte align, necessary if > 8
57#define VSF_ARCH_STACK_ALIGN_BIT 4
58
59#else
60
61#ifndef __HAL_DEVICE_ESPRESSIF_ESP32_H__
62#define __HAL_DEVICE_ESPRESSIF_ESP32_H__
63
64/*============================ INCLUDES ======================================*/
65
66#include "soc/periph_defs.h"
67
68/*============================ MACROS ========================================*/
69/*============================ MACROFIED FUNCTIONS ===========================*/
70/*============================ TYPES =========================================*/
71/*============================ GLOBAL VARIABLES ==============================*/
72/*============================ LOCAL VARIABLES ===============================*/
73/*============================ PROTOTYPES ====================================*/
74
75#endif // __HAL_DEVICE_ESPRESSIF_ESP32_H__
76#endif // __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
77/* EOF */
int_fast8_t intalu_t
Definition type.h:89
uint_fast8_t uintalu_t
Definition type.h:88