VSF Documented
exti_gpio.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_GPIO_EXTI_H__
19#define __HAL_DRIVER_GPIO_EXTI_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/vsf_hal_cfg.h"
24
25#if VSF_HAL_USE_GPIO == ENABLED
26
27#if defined(__VSF_HAL_USE_GPIO_EXTI_CLASS_IMPLEMENT)
28# undef __VSF_HAL_USE_GPIO_EXTI_CLASS_IMPLEMENT
29# define __VSF_CLASS_IMPLEMENT__
30#endif
31
32#include "utilities/ooc_class.h"
33
34/*============================ GLOBAL VARIABLES ==============================*/
35/*============================ MACROS ========================================*/
36
37#ifndef VSF_EXTI_GPIO_CFG_MULTI_CLASS
38# define VSF_EXTI_GPIO_CFG_MULTI_CLASS VSF_GPIO_CFG_MULTI_CLASS
39#endif
40
41
42#define __describe_exti_gpio(__name, __gpio, __pin_count, ...) \
43 static vsf_exti_gpio_irq_t VSF_MCONNECT(__name, _irqs)[__pin_count]; \
44 vsf_exti_gpio_t __name = { \
45 .gpio = (vsf_gpio_t *)&__gpio, \
46 .prio = vsf_arch_prio_invalid, \
47 .exti_irq = VSF_MCONNECT(__name, _irqs), \
48 __VA_ARGS__ \
49 };
50
51#define describe_exti_gpio(__name, __gpio, ...) \
52 __describe_exti_gpio(__name, __gpio, __VA_ARGS__)
53
54
55/*============================ MACROFIED FUNCTIONS ===========================*/
56/*============================ TYPES =========================================*/
57
58typedef struct vsf_exti_gpio_irq_t {
62
63typedef struct vsf_exti_gpio_t {
68
69/*============================ INCLUDES ======================================*/
70
71#define VSF_GPIO_CFG_DEC_PREFIX vsf_exti
72#define VSF_GPIO_CFG_DEC_UPCASE_PREFIX vsf_exti
73#define VSF_GPIO_CFG_DEC_EXTERN_OP ENABLED
75
76/*============================ PROTOTYPES ====================================*/
77
79 vsf_exti_gpio_t *hw_exti_gpio_ptr, vsf_gpio_pin_mask_t pin_mask,
80 vsf_gpio_exti_irq_cfg_t *irq_cfg_ptr);
81
82/*============================ IMPLEMENTATION ================================*/
83
84#endif
85
86#endif
87/* EOF */
vsf_err_t
Definition __type.h:42
vsf_arch_prio_t
Definition cortex_a_generic.h:88
vsf_err_t vsf_exti_gpio_exti_irq_pin_config(vsf_exti_gpio_t *hw_exti_gpio_ptr, vsf_gpio_pin_mask_t pin_mask, vsf_gpio_exti_irq_cfg_t *irq_cfg_ptr)
Definition exti_gpio.c:70
Definition exti_gpio.h:58
void * target_ptr
Definition exti_gpio.h:60
vsf_gpio_exti_isr_handler_t * handler_fn
Definition exti_gpio.h:59
Definition exti_gpio.h:63
vsf_gpio_t * gpio
Definition exti_gpio.h:64
vsf_exti_gpio_irq_t * exti_irq
Definition exti_gpio.h:66
vsf_arch_prio_t prio
Definition exti_gpio.h:65
Definition vsf_template_gpio.h:588
Definition vsf_template_gpio.h:720
void vsf_gpio_exti_isr_handler_t(void *target_ptr, vsf_gpio_t *gpio_ptr, vsf_gpio_pin_mask_t pin_mask)
External interrupt callback function for gpio.
Definition vsf_template_gpio.h:583
#define vsf_gpio_pin_mask_t
Definition vsf_template_gpio.h:279
Generated from commit: vsfteam/vsf@e0b5993