CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
宏定义 | 函数 | 变量
debug_time_consuming.c 文件参考
#include <stdint.h>
#include "debug_time_consuming.h"
#include "ci130x_system.h"
#include "ci130x_timer.h"
#include "ci130x_scu.h"
#include "ci_log.h"
#include "platform_config.h"
#include "FreeRTOS.h"
#include "task.h"
#include <stdbool.h>

宏定义

#define MAX_COUNT   (0xFFFFFFFF)
 
#define TIMER0_ONEUS_COUNT   (get_apb_clk()/1000000)
 
#define TIMER1_ONEUS_COUNT   (get_apb_clk()/1000000)
 
#define TIMER2_ONEUS_COUNT   (get_apb_clk()/1000000)
 
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
 

函数

void init_timer0 (void)
 初始化调试timer0 更多...
 
void timer0_start_count (void)
 调试timer0开始计时 更多...
 
void timer0_start_debug_time (bool is)
 调试挂起任务,timer0开始计时 更多...
 
void timer0_end_count (uint8_t *flag)
 停止timer0计时,并计算平均时间 更多...
 
void timer0_end_count_only_print_time_us (void)
 停止timer0计时,仅输出单次从start开始的计时 更多...
 
uint32_t timer0_end_debug_time (bool is, uint32_t *old_val)
 恢复任务,停止timer0计时 更多...
 
void init_timer1 (void)
 初始化调试timer1 更多...
 
void timer1_start_count (void)
 调试timer1开始计时 更多...
 
void timer1_end_count (uint8_t *flag)
 停止timer1计时,并计算平均时间 更多...
 
void timer1_end_count_only_print_time_us (void)
 停止timer1计时,仅输出单次从start开始的计时 更多...
 
uint32_t timer1_end_count_only_print_time_us_and_return (void)
 停止timer1计时,仅输出单次从start开始的计时,并返回计时时间 更多...
 
void init_timer2 (void)
 初始化调试timer2 更多...
 
void timer2_start_count (void)
 调试timer2开始计时 更多...
 
void timer2_end_count (uint8_t *flag)
 停止timer1计时,并计算平均时间 更多...
 
int ci_timer_val (void)
 Get the value of TIMER0 更多...
 

变量

static uint32_t timer0_cnt = 0
 

详细描述

版本
1.0
日期
2019-11-22

宏定义说明

◆ MAX

#define MAX (   a,
 
)    (((a) > (b)) ? (a) : (b))

◆ MAX_COUNT

#define MAX_COUNT   (0xFFFFFFFF)

◆ TIMER0_ONEUS_COUNT

#define TIMER0_ONEUS_COUNT   (get_apb_clk()/1000000)

◆ TIMER1_ONEUS_COUNT

#define TIMER1_ONEUS_COUNT   (get_apb_clk()/1000000)

◆ TIMER2_ONEUS_COUNT

#define TIMER2_ONEUS_COUNT   (get_apb_clk()/1000000)

函数说明

◆ ci_timer_val()

int ci_timer_val ( void  )

Get the value of TIMER0

注解
1. The type of return value is int, so we can't set the max count of TIMER0 > 0x7FFF_FFFF.
  1. Non-reenterable
返回
The current value of TIMER0

◆ init_timer2()

void init_timer2 ( void  )

初始化调试timer2

◆ timer1_end_count()

void timer1_end_count ( uint8_t *  flag)

停止timer1计时,并计算平均时间

参数
flaglog输出标志

◆ timer2_end_count()

void timer2_end_count ( uint8_t *  flag)

停止timer1计时,并计算平均时间

参数
flaglog输出标志

◆ timer2_start_count()

void timer2_start_count ( void  )

调试timer2开始计时

变量说明

◆ timer0_cnt

uint32_t timer0_cnt = 0
static