• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
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 #pragma once
16 #include <driver/int_types.h>
17 #if CONFIG_INT_STATIS
18 int_statis_t g_int_statis_num = {0};
19 #else
20 #endif
21 
22 #if CONFIG_INT_STATIS
23 #define INT_STATIS_INC((_x)) (_x)++
24 #else
25 #define INT_STATIS_INC((_x))
26 #endif
27 
28 typedef struct {
29         uint32_t irq_int_statis[IRQ_STATIS_COUNT];
30         uint32_t fiq_int_statis[FIQ_STATIS_COUNT];
31 } int_statis_t;
32 
33 /**
34  * @brief     get every unit int numbers form ICU driver after congifg CONFIG_INT_STATIS
35  *
36  * This API get every unit's int numbers
37  *
38  * @return
39  *    - int_statis_t: an int_statis_t pointer which including all uints' int numbers
40  *    - others: other errors.
41  */
42 int_statis_t * bk_get_int_statis(void);
43 
44 /**
45  * @brief     dunmp all units' int numbers form ICU driver
46  *
47  * This API dunmp all unit's int numbers
48  *
49  * @return
50  *    - BK_OK: succeed
51  *    - others: other errors.
52  */
53 bk_err_t bk_dump_int_statis(int_statis_t *int_statistic);
54 
55 
56 
57