unsigned char os_timer_start_periodic (unsigned char os_timer_id, unsigned short notify_event, unsigned short period) { OS_TMR_T *ptimer; if ((os_timer_id >= MAX_TIMER_NUMBER) || (notify_event == 0) || (period == 0)) { return ERROR_TIMER_GENERAL; } CPU_ENTER_CRITICAL(); ptimer = &os_timer[os_timer_id]; ptimer->notify_task_id = os_timer_notify_task_id_table[os_timer_id][1]; ptimer->notify_event = notify_event; ptimer->period = period; ptimer->count = period; ptimer->status = 0x81; /* set the PERIODIC & START bit */ CPU_EXIT_CRITICAL(); return ERROR_NONE; }
时间: 2024-03-31 21:38:08 浏览: 120
alu.rar_Unsigned_alu_alu quartus
Sorry, it seems like you pasted an incomplete code snippet. Could you please provide me with the complete code and context so that I can understand what you're trying to achieve and help you better?
阅读全文