* �ж�ָ����ʱ���Ƿ�ʱ(ʵ�ֶ�ʱ) * @timer_info ��ʱ�� * @ret TRUE or FALSE */
| 109 | * @ret TRUE or FALSE |
| 110 | */ |
| 111 | BOOL timer_is_time_out(timer_info_t *timer_info) |
| 112 | { |
| 113 | unsigned int timer_reg_base = 0; // �Ĵ�������ַ |
| 114 | unsigned int ctrl; // ���ƼĴ�����ֵ |
| 115 | |
| 116 | // ���� |
| 117 | if (NULL == timer_info) |
| 118 | { |
| 119 | return FALSE; |
| 120 | } |
| 121 | |
| 122 | // ��ȡ���ƼĴ��� |
| 123 | timer_reg_base = timer_get_reg_base(timer_info->timer); |
| 124 | ctrl = reg_read_32((volatile unsigned int *)(timer_reg_base + LS1C_PWM_CTRL)); |
| 125 | |
| 126 | // �ж��ж�״̬λ |
| 127 | if (ctrl & (1 << LS1C_PWM_INT_SR)) |
| 128 | { |
| 129 | return TRUE; |
| 130 | } |
| 131 | else |
| 132 | { |
| 133 | return FALSE; |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | |
| 138 |
nothing calls this directly
no test coverage detected