#define osThreadDef( name,
priority,
instances,
stacksz
)
解释:Define the attributes of a thread functions that can be created by the function osThreadCreate using osThread. The argument instances defines the number of times that osThreadCreate can be called for the same osThreadDef.
参数:name name of the thread function.
priority initial priority of the thread function.
instances number of possible thread instances.
stacksz stack size (in bytes) requirements for the thread function.
osThreadId osThreadCreate( const osThreadDef_t *thread_def,
void *argument
)
解释:Start a thread function by adding it to the Active Threads list and set it to state READY. The thread function receives the argument pointer as function argument when the function is started. When the priority of the created thread function is higher than the current RUNNING thread, the created thread function starts instantly and becomes the new RUNNING thread.
参数:[in] thread_def thread definition referenced with osThread.
[in] argument pointer that is passed to the thread function as start argument.