// // Created by xemon on 23.11.22. // #include "CmsisRtosThreadUtils.h" void InitThreadAtr( osThreadAttr_t *attr, const char *name, ///< name of the thread void *cb_mem, ///< memory for control block uint32_t cb_size, ///< size of provided memory for control block void *stack_mem, ///< memory for stack uint32_t stack_size, ///< size of stack osPriority_t priority ///< initial thread priority (default: osPriorityNormal) ) { attr->name = name; attr->cb_mem = cb_mem; attr->cb_size = cb_size; attr->stack_mem = stack_mem; attr->stack_size = stack_size; attr->priority = priority; attr->tz_module = 0; attr->reserved = 0; } void InitQueueAtr( osMessageQueueAttr_t *attr, const char *name, ///< name of the thread void *cb_mem, ///< memory for control block uint32_t cb_size, ///< size of provided memory for control block void *mem, ///< memory for data uint32_t mem_size ///< size of mem ) { attr->name = name; attr->cb_mem = cb_mem; attr->cb_size = cb_size; attr->mq_mem = mem; attr->mq_size = mem_size; }