8014| 5
|
关于FreeRTOS的Semaphore的使用 |
1金钱
最佳答案1.osSemaphoreRelease本身就可以在中断中调用。
2.要么用 CMSIS-RTOS v2的API,要么用freertos本身的API去创建。v2创建Semaphores的API是[mw_shl_code=c,true]osSemaphoreId_t osSemaphoreNew(uint32_t max_count, uint32_t initial_count,
const osSemaphoreAttr_t *attr)[/mw_shl_code]第二个参数为0即可解决你的问题。
不过要用v2的API,你需要更新一些头文件。
| ||
| ||
| ||
| ||
| ||
| ||
学无止境
|
||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-6-16 08:50
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网