1 /* 2 * Copyright (c) 2022 Talkweb Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef _HAL_EXTI_H_ 17 #define _HAL_EXTI_H_ 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #include "stm32f4xx_ll_exti.h" 24 25 #if defined(USE_FULL_LL_DRIVER) 26 27 #if defined (EXTI) 28 29 typedef void (*HAL_GPIO_PIN_EXIT_HANDLER)(uint16_t pin); 30 31 typedef struct { 32 LL_EXTI_InitTypeDef initType; 33 HAL_GPIO_PIN_EXIT_HANDLER Exithandler; 34 uint32_t PinReg; 35 GPIO_TypeDef* Gpiox; 36 } LL_EXTI_InitConfig; 37 38 typedef struct { 39 uint16_t pin; 40 uint16_t localPin; 41 uint32_t exitLine; 42 uint8_t setup; 43 uint8_t group; 44 uint8_t trigger; 45 GPIO_TypeDef* gpiox; 46 uint32_t pinReg; 47 HAL_GPIO_PIN_EXIT_HANDLER handler; 48 } Pin_ST; 49 50 typedef struct { 51 uint32_t trigger; 52 } HAL_GPIO_EXIT_CFG_T; 53 54 uint32_t LL_SETUP_EXTI(LL_EXTI_InitConfig* cfg, uint16_t pin, uint16_t local, uint8_t group); 55 56 #endif /* EXTI */ 57 58 #endif /* USE_FULL_LL_DRIVER */ 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif /* _NIOBE407_LL_EXTI_H_ */