CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
debug_time_consuming.h
浏览该文件的文档.
1 
10 #ifndef _DEBUG_TIME_CONSUMING_H_
11 #define _DEBUG_TIME_CONSUMING_H_
12 
13 #include "ci_debug_config.h"
14 #include <stdint.h>
15 #include <stdbool.h>
16 
17 #ifdef __cplusplus
18 extern "C"
19 {
20 #endif
21 
22 
23 #if CONFIG_DEBUG_EN
24 #define DEBUG_TIMER_INIT() init_timer0()
25 #define DEBUG_TIMER_START() timer0_start_count()
26 #define DEBUG_TIMER_END(x) timer0_end_count(x)
27 #else
28 #define INIT_DEBUG_TIMER() do{}while(0)
29 #define DEBUG_TIMER_START() do{}while(0)
30 #define DEBUG_TIMER_END(x) do{}while(0)
31 #endif
32 
39 extern void init_timer0(void);
40 extern void timer0_start_count(void);
41 extern void timer0_end_count(uint8_t* flag);
42 extern void timer0_end_count_only_print_time_us(void);
43 
44 void timer0_start_debug_time(bool is);
45 uint32_t timer0_end_debug_time(bool is,uint32_t* old_val);
46 
47 extern void init_timer1(void);
48 extern void timer1_start_count(void);
49 extern void timer1_end_count_only_print_time_us(void);
51 
61 int ci_timer_val( void ); // LT add
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 
68 #endif
69 
用于debug的宏开关
void timer0_end_count_only_print_time_us(void)
停止timer0计时,仅输出单次从start开始的计时
Definition: debug_time_consuming.c:95
void timer0_start_debug_time(bool is)
调试挂起任务,timer0开始计时
Definition: debug_time_consuming.c:58
int ci_timer_val(void)
Get the value of TIMER0
Definition: debug_time_consuming.c:262
uint32_t timer0_end_debug_time(bool is, uint32_t *old_val)
恢复任务,停止timer0计时
Definition: debug_time_consuming.c:114
uint32_t timer1_end_count_only_print_time_us_and_return(void)
停止timer1计时,仅输出单次从start开始的计时,并返回计时时间
Definition: debug_time_consuming.c:199
void timer0_end_count(uint8_t *flag)
停止timer0计时,并计算平均时间
Definition: debug_time_consuming.c:73
void init_timer1(void)
初始化调试timer1
Definition: debug_time_consuming.c:133
void timer1_end_count_only_print_time_us(void)
停止timer1计时,仅输出单次从start开始的计时
Definition: debug_time_consuming.c:182
void timer0_start_count(void)
调试timer0开始计时
Definition: debug_time_consuming.c:47
void init_timer0(void)
初始化调试timer0
Definition: debug_time_consuming.c:30
void timer1_start_count(void)
调试timer1开始计时
Definition: debug_time_consuming.c:150