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
20#include "hal/vsf_hal_cfg.h"
21
22/*============================ MACROS ========================================*/
23
24/*\note first define basic info for arch. */
25#if defined(__VSF_HEADER_ONLY_SHOW_ARCH_INFO__)
26
28# define VSF_ARCH_PRI_NUM 16
29# define VSF_ARCH_PRI_BIT 4
30
31// software interrupt provided by a dedicated device
32#define VSF_DEV_SWI_NUM 1
33
34#else
35
36#ifndef __HAL_DEVICE_NUVOTON_NUC505_H__
37#define __HAL_DEVICE_NUVOTON_NUC505_H__
38
39#define VSF_DEV_SWI_LIST 31
40
41/*============================ INCLUDES ======================================*/
42
43/*\note this is should be the only place where __common.h is included.*/
44#include "./vendor/Include/NUC505Series.h"
45#include "../common/__common.h"
46
47/*============================ MACROS ========================================*/
48
49#define GPIO_COUNT 4
50
51#define PIO_PORTA
52#define PIO_PORTA_PIN_NUM 16
53
54#define PIO_PORTB
55#define PIO_PORTB_PIN_NUM 16
56
57#define PIO_PORTC
58#define PIO_PORTC_PIN_NUM 15
59
60#define PIO_PORTD
61#define PIO_PORTD_PIN_NUM 5
62
63
64#define USB_HC_COUNT 1
65#define USB_HC_OHCI_COUNT 1
66
67#define USB_HC0_TYPE ohci
68#define USB_HC0_IRQHandler USBH_IRQHandler
69#define USB_HC0_CONFIG \
70 .reg = USBH, \
71 .irq = USBH_IRQn,
72
73#define USB_DC_COUNT 0
74#define USB_DC_HS_COUNT 0
75#define USB_DC_FS_COUNT 0
76
77
78#define USB_DC0_TYPE usbd_hs
79#define USB_DC0_IRQHandler USBD_IRQHandler
80#define USB_DC0_EP_NUM 14
81#define USB_DC0_CONFIG \
82 .reg = HSUSBD, \
83 .irq = USBD_IRQn,
84
85
86/*============================ MACROFIED FUNCTIONS ===========================*/
87/*============================ TYPES =========================================*/
88/*============================ GLOBAL VARIABLES ==============================*/
89/*============================ LOCAL VARIABLES ===============================*/
90/*============================ PROTOTYPES ====================================*/
91
92#endif // __HAL_DEVICE_NUVOTON_NUC505_H__
93#endif // __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
94/* EOF */