VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
hal
driver
driver.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
#if !defined(__VSF_HEADER_ONLY_SHOW_ARCH_INFO__) && !defined(__VSF_HAL_SHOW_VENDOR_INFO__)
23
# include "
utilities/vsf_utilities.h
"
24
#endif
25
31
#ifndef VSF_DRIVER_HEADER
32
33
# if defined(__VSF_APPLET__)
34
// no hw driver for __VSF_APPLET__
35
# elif defined(__STMicro__)
36
# define VSF_DRIVER_HEADER "./ST/driver.h"
37
# elif defined(__NXP__)
38
# define VSF_DRIVER_HEADER "./NXP/driver.h"
39
# elif defined(__MicroChip__)
40
# define VSF_DRIVER_HEADER "./MicroChip/driver.h"
41
# elif defined(__Nuvoton__)
42
# define VSF_DRIVER_HEADER "./Nuvoton/driver.h"
43
# elif defined(__WinnerMicro__)
44
# define VSF_DRIVER_HEADER "./WinnerMicro/driver.h"
45
# elif defined(__CPU_X86__) || defined(__CPU_X64__) || defined(__CPU_WEBASSEMBLY__)
46
# define VSF_DRIVER_HEADER "./x86/driver.h"
47
# elif defined(__SiliconLabs__)
48
# define VSF_DRIVER_HEADER "./SiliconLabs/driver.h"
49
# elif defined(__GigaDevice__)
50
# define VSF_DRIVER_HEADER "./GigaDevice/driver.h"
51
# elif defined(__TI__)
52
# define VSF_DRIVER_HEADER "./TI/driver.h"
53
# elif defined(__ST__)
54
# define VSF_DRIVER_HEADER "./ST/driver.h"
55
# elif defined(__WCH__)
56
# define VSF_DRIVER_HEADER "./WCH/driver.h"
57
# elif defined(__Allwinner__)
58
# define VSF_DRIVER_HEADER "./Allwinner/driver.h"
59
# elif defined(__Espressif__)
60
# define VSF_DRIVER_HEADER "./Espressif/driver.h"
61
# elif defined(__AIC__)
62
# define VSF_DRIVER_HEADER "./AIC/driver.h"
63
# elif defined(__Hercules__)
64
# define VSF_DRIVER_HEADER "./hercules/driver.h"
65
# elif defined(__HPM__)
66
# define VSF_DRIVER_HEADER "./HPM/driver.h"
67
# elif defined(__Geehy__)
68
# define VSF_DRIVER_HEADER "./Geehy/driver.h"
69
# elif defined(__Artery__)
70
# define VSF_DRIVER_HEADER "./Artery/driver.h"
71
# elif defined(__BouffaloLab__)
72
# define VSF_DRIVER_HEADER "./BouffaloLab/driver.h"
73
# elif defined(__Luat__)
74
# define VSF_DRIVER_HEADER "./Luat/driver.h"
75
# elif defined(__RaspberryPi__)
76
# define VSF_DRIVER_HEADER "./RaspberryPi/driver.h"
77
/* example
78
# elif defined(__COMPANY_NAME_A__)
79
# define VSF_DRIVER_HEADER "./company_name_a/driver.h"
80
# elif defined(__COMPANY_NAME_B__)
81
# define VSF_DRIVER_HEADER "./company_name_b/driver.h"
82
*/
83
# elif defined(__ARM__) || defined(__arm__)
84
# define VSF_DRIVER_HEADER "./arm/driver.h"
85
# elif defined(__CPU_GENERIC__)
86
# define VSF_DRIVER_HEADER "./generic/driver.h"
87
91
# elif defined(__UNKOWN_VENDOR__)
92
# define VSF_DRIVER_HEADER "./unknown/driver.h"
93
# else
94
# define VSF_DRIVER_HEADER "./unknown/driver.h"
95
# endif
96
#endif
97
99
#ifdef VSF_DRIVER_HEADER
100
/* include specified device driver header file */
101
# include VSF_DRIVER_HEADER
102
#endif
103
104
#if !defined(__HAL_DRIVER_H__) && !defined(__VSF_HEADER_ONLY_SHOW_ARCH_INFO__) && !defined(__VSF_HAL_SHOW_VENDOR_INFO__)
105
#define __HAL_DRIVER_H__
106
108
#include "./common/common.h"
109
111
#include "
./vsf/driver.h
"
112
113
#ifdef __cplusplus
114
extern
"C"
{
115
#endif
116
117
/*============================ MACROS ========================================*/
118
/*============================ MACROFIED FUNCTIONS ===========================*/
119
/*============================ TYPES =========================================*/
120
/*============================ GLOBAL VARIABLES ==============================*/
121
/*============================ LOCAL VARIABLES ===============================*/
122
/*============================ PROTOTYPES ====================================*/
123
129
extern
bool
vsf_driver_init
(
void
);
130
136
extern
bool
vsf_driver_poll
(
void
);
137
138
#ifdef __cplusplus
139
}
140
#endif
141
142
#endif
143
/* EOF */
vsf_driver_init
bool vsf_driver_init(void)
common hal drivers
Definition
driver.c:104
vsf_driver_poll
bool vsf_driver_poll(void)
driver polling service for f1c100s
Definition
driver.c:165
driver.h
vsf_hal_cfg.h
vsf_utilities.h
Generated by
1.9.8