VSF Documented
device.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#include "hal/vsf_hal_cfg.h"
20
21/*============================ MACROS ========================================*/
22
23#ifdef __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
24
25/*\note first define basic info for arch. */
26#define VSF_ARCH_PRI_NUM 16
27#define VSF_ARCH_PRI_BIT 4
28
29// software interrupt provided by a dedicated device
30#define VSF_DEV_SWI_NUM 0
31
32#else
33
34#ifndef __HAL_DEVICE_GIGADEVICE_GD32VF103C8_H__
35#define __HAL_DEVICE_GIGADEVICE_GD32VF103C8_H__
36
37/*============================ INCLUDES ======================================*/
38
39/*\note this is should be the only place where __common.h is included.*/
40//#include "../common/__common.h"
41
42#include "./Vendor/gd32vf103.h"
43
44/*============================ MACROS ========================================*/
45
46#define USB_OTG_COUNT 1
47#define USB_OTG0_IRQHandler USBFS_IRQHandler
48// required by dwcotg, define the max ep number of dwcotg
49#define USB_DWCOTG_MAX_EP_NUM 4
50
51#define USB_OTG0_CONFIG \
52 .ep_num = 8, \
53 .irq = USBFS_IRQn, \
54 .reg = 0x50000000, \
55 .buffer_word_size = 0x500 >> 2, \
56 .speed = USB_SPEED_FULL, \
57 .dma_en = false, \
58 .ulpi_en = false, \
59 .utmi_en = false, \
60 .vbus_en = false,
61
62/*============================ MACROFIED FUNCTIONS ===========================*/
63/*============================ TYPES =========================================*/
64/*============================ GLOBAL VARIABLES ==============================*/
65/*============================ LOCAL VARIABLES ===============================*/
66/*============================ PROTOTYPES ====================================*/
67
68
69#endif // __HAL_DEVICE_GIGADEVICE_GD32VF103C8_H__
70#endif // __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
71/* EOF */