1 /** 2 * \file 3 * 4 * \brief External IRQ related functionality declaration. 5 * 6 * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries. 7 * 8 * \asf_license_start 9 * 10 * \page License 11 * 12 * Subject to your compliance with these terms, you may use Microchip 13 * software and any derivatives exclusively with Microchip products. 14 * It is your responsibility to comply with third party license terms applicable 15 * to your use of third party software (including open source software) that 16 * may accompany Microchip software. 17 * 18 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, 19 * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, 20 * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, 21 * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE 22 * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL 23 * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE 24 * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE 25 * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT 26 * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY 27 * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, 28 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. 29 * 30 * \asf_license_stop 31 * 32 */ 33 34 #ifndef _HPL_EXT_IRQ_H_INCLUDED 35 #define _HPL_EXT_IRQ_H_INCLUDED 36 37 /** 38 * \addtogroup HPL EXT IRQ 39 * 40 * \section hpl_ext_irq_rev Revision History 41 * - v1.0.0 Initial Release 42 * 43 *@{ 44 */ 45 46 #include <compiler.h> 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 /** 53 * \name HPL functions 54 */ 55 //@{ 56 /** 57 * \brief Initialize external interrupt module 58 * 59 * This function does low level external interrupt configuration. 60 * 61 * \param[in] cb The pointer to callback function from external interrupt 62 * 63 * \return Initialization status. 64 * \retval -1 External irq module is already initialized 65 * \retval 0 The initialization is completed successfully 66 */ 67 int32_t _ext_irq_init(void (*cb)(const uint32_t pin)); 68 69 /** 70 * \brief Deinitialize external interrupt module 71 * 72 * \return Initialization status. 73 * \retval -1 External irq module is already deinitialized 74 * \retval 0 The de-initialization is completed successfully 75 */ 76 int32_t _ext_irq_deinit(void); 77 78 /** 79 * \brief Enable / disable external irq 80 * 81 * \param[in] pin Pin to enable external irq on 82 * \param[in] enable True to enable, false to disable 83 * 84 * \return Status of external irq enabling / disabling 85 * \retval -1 External irq module can't be enabled / disabled 86 * \retval 0 External irq module is enabled / disabled successfully 87 */ 88 int32_t _ext_irq_enable(const uint32_t pin, const bool enable); 89 //@} 90 91 #ifdef __cplusplus 92 } 93 #endif 94 /**@}*/ 95 #endif /* _HPL_EXT_IRQ_H_INCLUDED */ 96