先看相关API接口的定义
/** * @brief Create and Initialize a timer. * * @param[in] func function pointer to callback function. * @param[in] type @ref osTimerOnce for one-shot or @ref osTimerPeriodic for periodic behavior. * @param[in] argument argument to the timer callback function. * @param[in] attr timer attributes; NULL: default values. * * @return timer ID for reference by other functions or NULL in case of error. */ osTimerId_t osTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr); /** * @brief Get name of a timer. * * @param[in] timer_id timer ID obtained by @ref osTimerNew. * * @return name as null-terminated string. */ //const char *osTimerGetName (osTimerId_t timer_id); /** * @brief Start or restart a timer. * * @param[in] timer_id timer ID obtained by @ref osTimerNew. * @param[in] ticks @ref CMSIS_RTOS_TimeOu