Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
os_hal_eint.h
1 /*
2  * (C) 2005-2020 MediaTek Inc. All rights reserved.
3  *
4  * Copyright Statement:
5  *
6  * This MT3620 driver software/firmware and related documentation
7  * ("MediaTek Software") are protected under relevant copyright laws.
8  * The information contained herein is confidential and proprietary to
9  * MediaTek Inc. ("MediaTek"). You may only use, reproduce, modify, or
10  * distribute (as applicable) MediaTek Software if you have agreed to and been
11  * bound by this Statement and the applicable license agreement with MediaTek
12  * ("License Agreement") and been granted explicit permission to do so within
13  * the License Agreement ("Permitted User"). If you are not a Permitted User,
14  * please cease any access or use of MediaTek Software immediately.
15  *
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE
18  * PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS
19  * ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
21  * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
22  * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
23  * INCORPORATED IN, OR SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO
24  * LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
25  * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
26  * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
27  * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
28  * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
29  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
30  * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED
31  * HEREUNDER WILL BE ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY
32  * RECEIVER TO MEDIATEK DURING THE PRECEDING TWELVE (12) MONTHS FOR SUCH
33  * MEDIATEK SOFTWARE AT ISSUE.
34  */
35 
36 #ifndef __OS_HAL_EINT_H__
37 #define __OS_HAL_EINT_H__
38 
39 #include "mhal_eint.h"
40 
114 typedef enum {
115  OS_HAL_EINT_DB_TIME_1 = 1,
116  OS_HAL_EINT_DB_TIME_2 = 2,
117  OS_HAL_EINT_DB_TIME_4 = 4,
118  OS_HAL_EINT_DB_TIME_8 = 8,
119  OS_HAL_EINT_DB_TIME_16 = 16,
120  OS_HAL_EINT_DB_TIME_32 = 32,
121  OS_HAL_EINT_DB_TIME_64 = 64,
122  OS_HAL_EINT_DB_TIME_128 = 128,
123  OS_HAL_EINT_DB_TIME_MAX = OS_HAL_EINT_DB_TIME_128
125 
135 #ifdef __cplusplus
136 extern "C" {
137 #endif
138 
153  eint_trigger_mode trigger_mode, void (*handle)(void));
154 
166 
180  os_hal_eint_debounce_time debounce_time);
181 
194  eint_trigger_mode trigger_mode);
195 
206 
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
231 #endif /* __HAL_EINT_H__ */
232 
int mtk_os_hal_eint_set_debounce(eint_number eint_num, os_hal_eint_debounce_time debounce_time)
This function is used to set EINT debounce time and enable it.
int mtk_os_hal_eint_enable_debounce(eint_number eint_num)
This function is used to enable debounce function.
int mtk_os_hal_eint_unregister(eint_number eint_num)
This function is used to unregister EINT.
int mtk_os_hal_eint_set_type(eint_number eint_num, eint_trigger_mode trigger_mode)
This function is used to set EINT trigger type.
os_hal_eint_debounce_time
This enum defines the range of EINT debounce time(unit: ms).
Definition: os_hal_eint.h:114
int mtk_os_hal_eint_register(eint_number eint_num, eint_trigger_mode trigger_mode, void(*handle)(void))
This function is used to register EINT.
int mtk_os_hal_eint_disable_debounce(eint_number eint_num)
This function is used to disable debounce function.
eint_number
This enum defines the range of EINT number .
Definition: mhal_eint.h:133
eint_trigger_mode
This enum defines the EINT trigger mode.
Definition: mhal_eint.h:166