osThreadFlagsSet() function
Set the specified Thread Flags of a thread.
Arguments
thread_id
thread ID obtained by osThreadNew or osThreadGetId.
flags
specifies the flags of the thread that shall be set.
Return value
thread flags after setting or error code if highest bit set.