1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 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 * Description: RISCV31 Core interrupt handler header file 15 * 16 * Create: 2021-07-24 17 */ 18 #ifndef RISCV31_INTERRUPT_HANDLER_H 19 #define RISCV31_INTERRUPT_HANDLER_H 20 21 #include <stdint.h> 22 23 #ifdef __cplusplus 24 #if __cplusplus 25 extern "C" { 26 #endif /* __cplusplus */ 27 #endif /* __cplusplus */ 28 29 /** 30 * @brief Interrupt0 handler function. 31 */ 32 void interrupt0_handler(void); 33 34 /** 35 * @brief Interrupt1 handler function. 36 */ 37 void interrupt1_handler(void); 38 39 /** 40 * @brief Interrupt2 handler function. 41 */ 42 void interrupt2_handler(void); 43 44 /** 45 * @brief Interrupt3 handler function. 46 */ 47 void interrupt3_handler(void); 48 49 /** 50 * @brief Interrupt4 handler function. 51 */ 52 void interrupt4_handler(void); 53 54 /** 55 * @brief Interrupt5 handler function. 56 */ 57 void interrupt5_handler(void); 58 59 /** 60 * @brief Local interrupt handler function. 61 */ 62 void local_interrupt_handler(void); 63 64 /** 65 * @brief Init local interrupt priority. 66 */ 67 void local_interrupt_priority_init(void); 68 69 /** 70 * @brief Get interrupt number. 71 * @return Interrupt number. 72 */ 73 uint32_t interrupt_number_get(void); 74 75 /** 76 * @brief Get interrupt count. 77 * @return Interrupt count. 78 */ 79 uint32_t interrupt_count_get(void); 80 #ifdef __cplusplus 81 #if __cplusplus 82 } 83 #endif /* __cplusplus */ 84 #endif /* __cplusplus */ 85 86 #endif