/********************************************************************* * @fn osal_start_timerEx * * @brief * * This function is called to start a timer to expire in n mSecs. * When the timer expires, the calling task will get the specified event. * * @param uint8 taskID - task id to set timer for * @param uint16 event_id - event to be notified with * @param UNINT16 timeout_value - in milliseconds. * * @return SUCCESS, or NO_TIMER_AVAIL. */uint8 osal_start_timerEx( uint8 taskID, uint16 event_id, uint16 timeout_value )[ halIntState_t intState; osalTimerRec_t *newTimer; 1.HAL_ENTER_CRITICAL_SECTION( intState ); // Hold off interrupts. // Add timer 2.newTimer = osalAddTimer( taskID, event_id, timeout_value ); 3.HAL_EXIT_CRITICAL_SECTION( intState ); // Re-enable interrupts. return ( (newTimer != NULL) ? SUCCESS : NO_TIMER_AVAIL );]
你是找这个函数吗
/********************************************************************* * @fn osal_start_timerEx * * @brief * * This function is called to start a timer to expire in n mSecs. * When the timer expires, the calling task will get the specified event. * * @param uint8 taskID - task id to set timer for * @param uint16 event_id - event to be notified with * @param UNINT16 timeout_value - in milliseconds. * * @return SUCCESS, or NO_TIMER_AVAIL. */uint8 osal_start_timerEx( uint8 taskID, uint16 event_id, uint16 timeout_value )[ halIntState_t intState; osalTimerRec_t *newTimer; 1.HAL_ENTER_CRITICAL_SECTION( intState ); // Hold off interrupts. // Add timer 2.newTimer = osalAddTimer( taskID, event_id, timeout_value ); 3.HAL_EXIT_CRITICAL_SECTION( intState ); // Re-enable interrupts. return ( (newTimer != NULL) ? SUCCESS : NO_TIMER_AVAIL );]
你是找这个函数吗
举报