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

Function timer_int_clr

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

* ��ʱ���ж��� * @timer_info ��ʱ����Ϣ */

Source from the content-addressed store, hash-verified

207 * @timer_info ��ʱ����Ϣ
208 */
209void timer_int_clr(timer_info_t *timer_info)
210{
211 unsigned int timer_reg_base = 0; // �Ĵ�������ַ
212 unsigned int ctrl ;
213
214 // ����
215 if (NULL == timer_info)
216 {
217 return ;
218 }
219 timer_reg_base = timer_get_reg_base(timer_info->timer); // ��ȡ�Ĵ�������ַ
220 ctrl = reg_read_32((volatile unsigned int *)(timer_reg_base + LS1C_PWM_CTRL));
221 ctrl = ctrl | (1<<LS1C_PWM_INT_SR) ;
222 reg_write_32(ctrl , (volatile unsigned int *)(timer_reg_base + LS1C_PWM_CTRL));
223 ctrl = ctrl & (~(1<<LS1C_PWM_INT_SR)) ;
224 reg_write_32(ctrl , (volatile unsigned int *)(timer_reg_base + LS1C_PWM_CTRL));
225
226 return ;
227}
228/*
229 * ��ʱ��������
230 * @timer_info ��ʱ����Ϣ

Callers

nothing calls this directly

Calls 3

timer_get_reg_baseFunction · 0.85
reg_read_32Function · 0.70
reg_write_32Function · 0.70

Tested by

no test coverage detected