VSF Documented
mcs51_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 __MCS51_GENERIC_H__
19#define __MCS51_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
32/*============================ MACROS ========================================*/
33
34#ifndef __LITTLE_ENDIAN
35# define __LITTLE_ENDIAN 1
36#endif
37#ifndef __BYTE_ORDER
38# define __BYTE_ORDER __LITTLE_ENDIAN
39#endif
40
41#define VSF_ARCH_PRI_NUM 2
42#define VSF_ARCH_PRI_BIT 1
43
44// software interrupt provided by arch
45#define VSF_ARCH_SWI_NUM 0
46#ifndef VSF_SYSTIMER_CFG_IMPL_MODE
47# define VSF_SYSTIMER_CFG_IMPL_MODE VSF_SYSTIMER_IMPL_WITH_NORMAL_TIMER
48#endif
49#define __VSF_ARCH_SYSTIMER_BITS 16
50
51/*============================ MACROFIED FUNCTIONS ===========================*/
52
53#define vsf_arch_wakeup()
54
55/*============================ TYPES =========================================*/
56
59
60#define __VSF_ARCH_PRI_INDEX(__N, __UNUSED) \
61 __vsf_arch_prio_index_##__N = (__N),
62
63enum {
65};
66
67#define __VSF_ARCH_PRI(__N, __BIT) \
68 VSF_ARCH_PRIO_##__N = (__N), \
69 vsf_arch_prio_##__N = (__N),
70
76};
78
79/*============================ GLOBAL VARIABLES ==============================*/
80/*============================ LOCAL VARIABLES ===============================*/
81/*============================ PROTOTYPES ====================================*/
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif
88/* EOF */
89
vsf_arch_prio_t
Definition cortex_a_generic.h:88
@ VSF_ARCH_PRIO_INVALID
Definition mcs51_generic.h:72
@ vsf_arch_prio_highest
Definition mcs51_generic.h:75
@ vsf_arch_prio_invalid
Definition mcs51_generic.h:73
int32_t vsf_systimer_tick_signed_t
Definition mcs51_generic.h:58
#define __VSF_ARCH_PRI(__N, __BIT)
Definition mcs51_generic.h:67
#define VSF_ARCH_PRI_BIT
Definition mcs51_generic.h:42
uint32_t vsf_systimer_tick_t
Definition mcs51_generic.h:57
#define __VSF_ARCH_PRI_INDEX(__N, __UNUSED)
Definition mcs51_generic.h:60
#define VSF_ARCH_PRI_NUM
Definition mcs51_generic.h:41
unsigned uint32_t
Definition stdint.h:9
int int32_t
Definition stdint.h:8
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51