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#include "hal/vsf_hal_cfg.h"
21
22#undef VSF_HAL_DRIVER_HEADER
23
24/* note: MACRO is UPPER-CASE, directory name is not case-sensitive.
25 __SERIES_NAME_A__
26 __DEVICE_NAME_A__
27 __DEVICE_NAME_B__
28 __SERIES_NAME_B__
29 __DEVICE_NAME_C__
30 __SERIES_NAME_C__
31 __DEVICE_NAME_D__
32*/
33
34#if defined(__DEVICE_NAME_A__)
35# define VSF_HAL_DRIVER_HEADER "./__SERIES_NAME_A__/__DEVICE_NAME_A__/driver.h"
36#elif defined(__DEVICE_NAME_B__)
37# define VSF_HAL_DRIVER_HEADER "./__SERIES_NAME_A__/__DEVICE_NAME_B__/driver.h"
38#elif defined(__DEVICE_NAME_C__)
39# define VSF_HAL_DRIVER_HEADER "./__SERIES_NAME_B__/__DEVICE_NAME_C__/driver.h"
40#elif defined(__DEVICE_NAME_D__)
41# define VSF_HAL_DRIVER_HEADER "./__SERIES_NAME_C__/__DEVICE_NAME_D__/driver.h"
42#else
43# error No supported device found.
44#endif
45
46/* include specified driver header file */
47#include VSF_HAL_DRIVER_HEADER
48
49/* below is vendor specified driver part, put vendor-specified code(not vsf specified) here */
50
51#ifndef __VSF_HAL_DRIVER_${VENDOR}_H__
52#define __VSF_HAL_DRIVER_${VENDOR}_H__
53
54/*============================ MACROS ========================================*/
55/*============================ MACROFIED FUNCTIONS ===========================*/
56/*============================ TYPES =========================================*/
57/*============================ GLOBAL VARIABLES ==============================*/
58/*============================ LOCAL VARIABLES ===============================*/
59/*============================ PROTOTYPES ====================================*/
60
61
62#endif
63/* EOF */