VSF Documented
io.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#ifndef __HAL_DRIVER_NUVOTON_M480_IO_H__
19#define __HAL_DRIVER_NUVOTON_M480_IO_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/vsf_hal_cfg.h"
24#include "../../__device.h"
25
26#if VSF_HAL_USE_IO == ENABLED
27
28/*============================ MACROS ========================================*/
29
30#define VSF_IO_REIMPLEMENT_FEATURE ENABLED
31
32/*============================ MACROFIED FUNCTIONS ===========================*/
33/*============================ TYPES =========================================*/
34
36typedef enum vsf_io_mode_t {
43
48
50
51
53/*
54 VSF_IO_INVERT_INPUT = (1<<6), //!< invert the input pin level
55
56
57 VSF_IO_FILTER_BYPASS = (0<<11), //!< filter is bypassed
58 VSF_IO_FILTER_2CLK = (1<<11), //!< levels should keep 2 clks
59 VSF_IO_FILTER_4CLK = (2<<11), //!< levels should keep 4 clks
60 VSF_IO_FILTER_8CLK = (3<<11), //!< levels should keep 8 clks
61
62 VSF_IO_FILTER_CLK_SRC0 = (0<<13), //!< select clock src 0 for filter
63 VSF_IO_FILTER_CLK_SRC1 = (1<<13), //!< select clock src 1 for filter
64 VSF_IO_FILTER_CLK_SRC2 = (2<<13), //!< select clock src 2 for filter
65 VSF_IO_FILTER_CLK_SRC3 = (3<<13), //!< select clock src 3 for filter
66 VSF_IO_FILTER_CLK_SRC4 = (4<<13), //!< select clock src 4 for filter
67 VSF_IO_FILTER_CLK_SRC5 = (5<<13), //!< select clock src 5 for filter
68 VSF_IO_FILTER_CLK_SRC6 = (6<<13), //!< select clock src 6 for filter
69 VSF_IO_FILTER_CLK_SRC7 = (7<<13), //!< select clock src 7 for filter
70
71
72 VSF_IO_HIGH_DRV = (1<<9), //!< enable high drive strength
73 VSF_IO_HIGH_DRIVE = (1<<9), //!< enable high drive strength
74 VSF_IO_HIGH_DRIVE_STRENGTH = (1<<9), //!< enable high drive strength
75*/
77
78/*============================ GLOBAL VARIABLES ==============================*/
79/*============================ LOCAL VARIABLES ===============================*/
80/*============================ INCLUDES ======================================*/
81
82#define VSF_GPIO_CFG_DEC_PREFIX vsf_hw
83#define VSF_GPIO_CFG_DEC_UPCASE_PREFIX VSF_HW
84#include "hal/driver/common/io/io_template.h"
85
86/*============================ PROTOTYPES ====================================*/
87
88#endif /* VSF_HAL_USE_IO == ENABLED */
89#endif /* __HAL_DRIVER_NUVOTON_M480_IO_H__ */
90/* EOF */
vsf_io_mode_t
Definition io.h:44
@ IO_BIDIRECTION
Definition io.h:49
@ IO_INPUT_PU
Definition io.h:39
@ IO_OUTPUT_OPEN_DRAIN
Definition io.h:47
@ VSF_IO_DISABLE_INPUT
disable input
Definition io.h:52
@ IO_OUTPUT_PUSHPULL
Definition io.h:45
@ IO_INPUT_PULLUP
Definition io.h:40
@ IO_INPUT_PULLDOWN
Definition io.h:42
@ IO_ANALOG_INPUT
Definition io.h:37
@ IO_OUTPUT_PP
Definition io.h:44
@ IO_INPUT_PD
Definition io.h:41
@ IO_INPUT_FLOAT
Definition io.h:38
@ IO_OUTPUT_OD
Definition io.h:46