VSF Documented
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#if defined(__VSF_HEADER_ONLY_SHOW_ARCH_INFO__) || defined(__VSF_HAL_SHOW_VENDOR_INFO__)
21
22# include "../__device.h"
23
24#else
25
26#ifndef __VSF_HAL_DRIVER_${VENDOR}_${DEVICE}_H__
27#define __VSF_HAL_DRIVER_${VENDOR}_${DEVICE}_H__
28
29/*============================ INCLUDES ======================================*/
30
31# include "hal/vsf_hal_cfg.h"
32# include "./device.h"
33
34// for common hal structure/enum/etc, include before user driver headers below.
36
37// For SWI
39
40/*\note It's up to developer to decide the actual path of the driver headers. */
41
42# if VSF_HAL_USE_ADC == ENABLED
43# include "../common/adc/adc.h"
44# endif
45# if VSF_HAL_USE_FLASH == ENABLED
46# include "../common/flash/flash.h"
47# endif
48# if VSF_HAL_USE_GPIO == ENABLED
49# include "../common/gpio/gpio.h"
50# endif
51# if VSF_HAL_USE_I2C == ENABLED
52# include "../common/i2c/i2c.h"
53# endif
54# if VSF_HAL_USE_PWM == ENABLED
55# include "../common/pwm/pwm.h"
56# endif
57# if VSF_HAL_USE_RTC == ENABLED
58# include "../common/rtc/rtc.h"
59# endif
60# if VSF_HAL_USE_SPI == ENABLED
61# include "../common/spi/spi.h"
62# endif
63# if VSF_HAL_USE_TIMER == ENABLED
64# include "../common/timer/timer.h"
65# endif
66# if VSF_HAL_USE_TRNG == ENABLED
67# include "../common/trng/trng.h"
68# endif
69# if VSF_HAL_USE_USART == ENABLED
70# include "../common/uart/uart.h"
71# endif
72# if VSF_HAL_USE_USB == ENABLED
73# include "../common/usb/usb.h"
74# endif
75# if VSF_HAL_USE_SDIO == ENABLED
76# include "../common/sdio/sdio.h"
77# endif
78# if VSF_HAL_USE_I2S == ENABLED
79# include "../common/i2s/i2s.h"
80# endif
81# if VSF_HAL_USE_WDT == ENABLED
82# include "../common/wdt/wdt.h"
83# endif
84# if VSF_HAL_USE_ETH == ENABLED
85# include "../common/mac/mac.h"
86# endif
87
88/*============================ MACROS ========================================*/
89/*============================ MACROFIED FUNCTIONS ===========================*/
90/*============================ TYPES =========================================*/
91/*============================ GLOBAL VARIABLES ==============================*/
92/*============================ LOCAL VARIABLES ===============================*/
93/*============================ PROTOTYPES ====================================*/
94
95
96
97/*============================ INCLUDES ======================================*/
98
99#if VSF_HAL_USE_GPIO == ENABLED
101
102# define VSF_GPIO_CFG_DEC_PREFIX vsf_hw
103# define VSF_GPIO_CFG_DEC_UPCASE_PREFIX VSF_HW
105#endif
106
107#if VSF_HAL_USE_ADC == ENABLED
109
110# define VSF_ADC_CFG_DEC_PREFIX vsf_hw
111# define VSF_ADC_CFG_DEC_UPCASE_PREFIX VSF_HW
113#endif
114
115#if VSF_HAL_USE_FLASH == ENABLED
117
118# define VSF_FLASH_CFG_DEC_PREFIX vsf_hw
119# define VSF_FLASH_CFG_DEC_UPCASE_PREFIX VSF_HW
121#endif
122
123#if VSF_HAL_USE_I2C == ENABLED
125
126# define VSF_I2C_CFG_DEC_PREFIX vsf_hw
127# define VSF_I2C_CFG_DEC_UPCASE_PREFIX VSF_HW
129#endif
130
131#if VSF_HAL_USE_PWM == ENABLED
133
134# define VSF_PWM_CFG_DEC_PREFIX vsf_hw
135# define VSF_PWM_CFG_DEC_UPCASE_PREFIX VSF_HW
137#endif
138
139#if VSF_HAL_USE_RTC == ENABLED
141
142# define VSF_RTC_CFG_DEC_PREFIX vsf_hw
143# define VSF_RTC_CFG_DEC_UPCASE_PREFIX VSF_HW
145#endif
146
147#if VSF_HAL_USE_SPI == ENABLED
149
150# define VSF_SPI_CFG_DEC_PREFIX vsf_hw
151# define VSF_SPI_CFG_DEC_UPCASE_PREFIX VSF_HW
153#endif
154
155#if VSF_HAL_USE_TIMER == ENABLED
157
158# define VSF_TIMER_CFG_DEC_PREFIX vsf_hw
159# define VSF_TIMER_CFG_DEC_UPCASE_PREFIX VSF_HW
161#endif
162
163#if VSF_HAL_USE_RNG == ENABLED
165
166# define VSF_RNG_CFG_DEC_PREFIX vsf_hw
167# define VSF_RNG_CFG_DEC_UPCASE_PREFIX VSF_HW
169#endif
170
171#if VSF_HAL_USE_USART == ENABLED
173
174# define VSF_USART_CFG_DEC_PREFIX vsf_hw
175# define VSF_USART_CFG_DEC_UPCASE_PREFIX VSF_HW
177#endif
178
179#if VSF_HAL_USE_WDT == ENABLED
181
182# define VSF_WDT_CFG_DEC_PREFIX vsf_hw
183# define VSF_WDT_CFG_DEC_UPCASE_PREFIX VSF_HW
185#endif
186
187#endif // __VSF_HAL_DRIVER_${VENDOR}_${DEVICE}_H__
188#endif // !__VSF_HEADER_ONLY_SHOW_ARCH_INFO__ && !__VSF_HAL_SHOW_VENDOR_INFO__
189/* EOF */
Generated from commit: vsfteam/vsf@e0b5993