VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
Examples
File List
Globals
source
hal
driver
common
exti
gpio_to_exti.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_EXTI_GPIO_TO_EXTI_H__
19
#define __HAL_DRIVER_EXTI_GPIO_TO_EXTI_H__
20
21
/*============================ INCLUDES ======================================*/
22
23
#include "
hal/vsf_hal_cfg.h
"
24
25
#if VSF_HAL_USE_EXTI == ENABLED && VSF_HAL_USE_GPIO == ENABLED
26
27
#include "
hal/driver/common/gpio/exti_gpio.h
"
28
#include "
hal/driver/common/template/vsf_template_exti.h
"
29
30
/*============================ MACROS ========================================*/
31
32
// gpio_to_exti requires the underlying GPIO driver to provide a real
33
// (non-default) vsf_gpio_get_pin_configuration implementation, so that the
34
// EXTI glue layer can do read-modify-write on a pin's mode bits without
35
// destroying its other configuration.
36
#if VSF_GPIO_CFG_REIMPLEMENT_API_GET_PIN_CONFIGURATION != ENABLED
37
# error "gpio_to_exti requires the underlying GPIO driver to implement vsf_gpio_get_pin_configuration (define VSF_GPIO_CFG_REIMPLEMENT_API_GET_PIN_CONFIGURATION = ENABLED)."
38
#endif
39
40
// Note: VSF_GPIO_EXTI_MODE_MASK (the OR of all VSF_GPIO_EXTI_MODE_* values)
41
// is automatically generated as an enum member by vsf_template_gpio.h, so we
42
// rely on it being available without a preprocessor check here.
43
44
/*============================ MACROFIED FUNCTIONS ===========================*/
45
/*============================ TYPES =========================================*/
46
47
// Per-channel (== per-pin) user EXTI handler slot.
48
// A vendor struct using gpio_to_exti.inc is expected to contain an array
49
// of these, one entry per pin (size == VSF_GPIO_CFG_PIN_COUNT).
50
typedef
struct
vsf_gpio_to_exti_channel_irq_t
{
51
vsf_exti_isr_handler_t
*
handler_fn
;
52
void
*
target_ptr
;
53
}
vsf_gpio_to_exti_channel_irq_t
;
54
55
/*============================ PROTOTYPES ====================================*/
56
/*============================ IMPLEMENTATION ================================*/
57
58
#endif
/* VSF_HAL_USE_EXTI && VSF_HAL_USE_GPIO */
59
#endif
/* __HAL_DRIVER_EXTI_GPIO_TO_EXTI_H__ */
60
/* EOF */
exti_gpio.h
vsf_gpio_to_exti_channel_irq_t
Definition
gpio_to_exti.h:50
vsf_gpio_to_exti_channel_irq_t::handler_fn
vsf_exti_isr_handler_t * handler_fn
Definition
gpio_to_exti.h:51
vsf_gpio_to_exti_channel_irq_t::target_ptr
void * target_ptr
Definition
gpio_to_exti.h:52
vsf_hal_cfg.h
vsf_template_exti.h
vsf_exti_isr_handler_t
void vsf_exti_isr_handler_t(void *target_ptr, vsf_exti_t *exti_ptr, vsf_exti_channel_mask_t channel_mask)
External interrupt callback function for exti.
Definition
vsf_template_exti.h:322
Generated from commit:
vsfteam/vsf@7b892b9