MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / timer_get_reg_base

Function timer_get_reg_base

bsp/loongson/ls1cdev/libraries/ls1c_timer.c:31–55  ·  view source on GitHub ↗

* ��ȡָ����ʱ���ļĴ�������ַ * @timer Ӳ����ʱ�� * @ret ����ַ */

Source from the content-addressed store, hash-verified

29 * @ret ����ַ
30 */
31unsigned int timer_get_reg_base(ls1c_timer_t timer)
32{
33 unsigned int reg_base = 0;
34
35 switch (timer)
36 {
37 case TIMER_PWM0:
38 reg_base = LS1C_REG_BASE_PWM0;
39 break;
40
41 case TIMER_PWM1:
42 reg_base = LS1C_REG_BASE_PWM1;
43 break;
44
45 case TIMER_PWM2:
46 reg_base = LS1C_REG_BASE_PWM2;
47 break;
48
49 case TIMER_PWM3:
50 reg_base = LS1C_REG_BASE_PWM3;
51 break;
52 }
53
54 return reg_base;
55}
56
57
58/*

Callers 8

timer_initFunction · 0.85
timer_is_time_outFunction · 0.85
timer_stopFunction · 0.85
timer_get_time_nsFunction · 0.85
timer_print_regsFunction · 0.85
timer_int_clrFunction · 0.85
timer_cnt_clrFunction · 0.85
timer_int_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected