
本帖最后由 weasternize 于 2017-1-10 16:39 编辑 比如: d1 =osTimerNew ((os_timer_func_t)&Timer1_Callback, osTimerOnce, &exec1); 第一个参数的回调函数地址需要强制类型转换吗?如果有类型转换也应该是封装在osTimerNew里边才对 id = osTimerCreate ((os_timer_func_t)&Timer_Callback, osTimerPeriodic, NULL); 这个 osTimerCreate错用成1.x版的函数名了 void StartApplication (void) { semaphore = osSemaphoreNew(osSemaphore(semaphore), 1); tid_thread1 = osThreadCreate(thread1, NULL, NULL); tid_thread2 = osThreadCreate(thread2, NULL, NULL); } 这个osSemaphoreNew用的2.0的函数名,参数osSemaphore(semaphore)用的却是1.x的宏引用形式 osThreadCreate用的1.x的函数名,参数(thread2, NULL, NULL)却又是2.0的形式 此类错误还很多,感觉文档做的太马虎了,如此联想,代码会不会也有类似的问题,细思极恐。。。 |
ARM官网的文档还是老版本,5.0的文档在MDK的安装目录下