Hello,
I am looking at the CMSIS, I have a question about using osThreadDef macro to define var:
osThreadDef(name, osPriorityNormal, 1, 0);
Why not define as below directly? what's the benefits?
osThreadDef_t os_thread_def_name = {name, osPriorityNormal, 1, 0};
Thanks.
What happens if the internal structure gets changed, and the implementation changes the definition of the macro?
It is quite common to use macros for data declarations just for information hiding - allowing a library to be modified without breaking users code.