8051-ELL库  beta 1.1.6
8051-ELL library API Document Center
ELL_CORE.h
浏览该文件的文档.
1 /*-----------------------------------------------------------------------
2 | FILE DESCRIPTION |
3 -----------------------------------------------------------------------*/
4 /*-----------------------------------------------------------------------
5  - File name : STC8x_CORE.h
6  - Author : Quark Team
7  - Update date : 2020.12.20
8  - Copyright : Gevico Electronic studio
9  - Module comments: Header file of MCU core.
10 -----------------------------------------------------------------------*/
11 /*------------------------------------------------------------------------
12 | COPYRIGHT NOTICE |
13 ------------------------------------------------------------------------*/
14 /*
15  * Copyright (C) 2021, zeweni (17870070675@163.com)
16 
17  * This file is part of 8051 ELL low-layer libraries.
18 
19  * 8051 ELL low-layer libraries is free software: you can redistribute
20  * it and/or modify it under the terms of the Apache-2.0 License.
21 
22  * 8051 ELL low-layer libraries is distributed in the hope that it will
23  * be useful,but WITHOUT ANY WARRANTY; without even the implied warranty
24  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * Apache-2.0 License License for more details.
26 
27  * You should have received a copy of the Apache-2.0 License.8051 ELL
28  * low-layer libraries. If not, see <http://www.apache.org/licenses/>.
29 **/
30 /*-----------------------------------------------------------------------
31 | INCLUDES |
32 -----------------------------------------------------------------------*/
33 #ifndef __STC8x_CORE_H_
34 #define __STC8x_CORE_H_
35 
36 /*--------------------------------------------------------
37 | @Description: STC8Hx Data type |
38 --------------------------------------------------------*/
39 
40 #include "ELL_TYPE.h"
41 
42 /*-----------------------------------------------------------------------
43 | DATA |
44 -----------------------------------------------------------------------*/
45 
54 typedef enum
55 {
58 
59 /*--------------------------------------------------------
60 | @Description: Function self checking |
61 --------------------------------------------------------*/
70 typedef enum
71 {
72  FSC_FAIL= 1, /* Function self checking failed */
73  FSC_SUCCESS = !FSC_FAIL /* Function self checking successfed */
75 
76 
77 /*--------------------------------------------------------
78 | @Description: Peripheral IO define |
79 --------------------------------------------------------*/
80 
81 typedef enum
82 {
83  SW_Port1 = 0x00 ,
84  SW_Port2 = 0x01 ,
85  SW_Port3 = 0x02 ,
86  SW_Port4 = 0x03
88 
89 /*--------------------------------------------------------
90 | @Description: Interrupt priority |
91 --------------------------------------------------------*/
92 
93 typedef enum
94 {
95  NVIC_PR0 = 0x00, //Lowest priority |
96  NVIC_PR1 = 0x01, //Lower priority |
97  NVIC_PR2 = 0x02, //Higher priority |
98  NVIC_PR3 = 0x03 //Highest priority V
100 
101 
102 #endif
103 /*-----------------------------------------------------------------------
104 | END OF FLIE (C) COPYRIGHT Gevico Electronics |
105 -----------------------------------------------------------------------*/
NVICPri_Type
Definition: ELL_CORE.h:99
@ NVIC_PR2
Definition: ELL_CORE.h:102
@ NVIC_PR0
Definition: ELL_CORE.h:100
@ NVIC_PR1
Definition: ELL_CORE.h:101
@ NVIC_PR3
Definition: ELL_CORE.h:103
@ ENABLE
Definition: ELL_CORE.h:52
@ DISABLE
Definition: ELL_CORE.h:51
FSCSTATE
Definition: ELL_CORE.h:65
@ FSC_FAIL
Definition: ELL_CORE.h:66
@ FSC_SUCCESS
Definition: ELL_CORE.h:67
GPIOSWPort_Type
Definition: ELL_CORE.h:81
@ SW_Port4
Definition: ELL_CORE.h:85
@ SW_Port3
Definition: ELL_CORE.h:84
@ SW_Port2
Definition: ELL_CORE.h:83
@ SW_Port1
Definition: ELL_CORE.h:82
FUNSTATE
Definition: ELL_CORE.h:55