yang.li | e8fc87b | 2022-01-11 11:03:24 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | */ |
Xiaohu.Huang | f3d0a0c | 2021-10-15 11:13:17 +0800 | [diff] [blame] | 6 | |
| 7 | #ifndef INTERRUPT_H |
| 8 | #define INTERRUPT_H |
| 9 | |
xiaohu.huang | 3826210 | 2022-05-06 22:21:48 +0800 | [diff] [blame] | 10 | typedef void (*function_ptr_t)(void); |
Xiaohu.Huang | f3d0a0c | 2021-10-15 11:13:17 +0800 | [diff] [blame] | 11 | |
| 12 | void wfe(void); |
| 13 | |
| 14 | int EnableIrq(uint32_t ulIrq); |
| 15 | |
| 16 | int DisableIrq(uint32_t ulIrq); |
| 17 | |
| 18 | int SetIrqPriority(uint32_t ulIrq, uint32_t ulProi); |
| 19 | |
| 20 | int ClearPendingIrq(uint32_t ulIrq); |
| 21 | |
| 22 | int RegisterIrq(uint32_t int_num, uint32_t int_priority, function_ptr_t handler); |
| 23 | |
| 24 | int UnRegisterIrq(uint32_t ulIrq); |
| 25 | |
| 26 | unsigned long interrupt_status_get(void); |
| 27 | |
| 28 | void interrupt_disable(void); |
| 29 | |
| 30 | void interrupt_enable(void); |
| 31 | |
| 32 | #endif |