vSemaphoreCreateBinary compilation error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

vSemaphoreCreateBinary compilation error

1,329 次查看
mandarpadwal
Contributor I

We are using freeRTOS & using vSemaphoreCreateBinary

getting error at build as "semphr.h:121:2: error: expected identifier or '(' before '{' token"

please help to resolve this

标记 (1)
0 项奖励
回复
1 回复

1,032 次查看
converse
Senior Contributor V

According to the FrreRTOS docs, you should not be using vSemaphoreCreateBinary. It says.

NOTE: The vSemaphoreCreateBinary() macro remains in the source code to ensure backward compatibility, but it should not be used in new designs. Use the xSemaphoreCreateBinary() function instead.

Also, in many cases, it is faster and more memory efficient to use a direct to task notification in place of a binary semaphore.

See

FreeRTOS is a truely free and small footprint RTOS for microcontrollers. This page describes the vSe... 

0 项奖励
回复