Switched to cmsis_v1
This commit is contained in:
parent
d54d0a8992
commit
c187a62bfd
13 changed files with 2844 additions and 3524 deletions
|
@ -31,7 +31,6 @@
|
|||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
typedef StaticTask_t osStaticThreadDef_t;
|
||||
/* USER CODE BEGIN PTD */
|
||||
|
||||
/* USER CODE END PTD */
|
||||
|
@ -50,18 +49,9 @@ typedef StaticTask_t osStaticThreadDef_t;
|
|||
/* USER CODE BEGIN Variables */
|
||||
|
||||
/* USER CODE END Variables */
|
||||
/* Definitions for AppTask */
|
||||
osThreadId_t AppTaskHandle;
|
||||
osThreadId AppTaskHandle;
|
||||
uint32_t defaultTaskBuffer[ 64 ];
|
||||
osStaticThreadDef_t defaultTaskControlBlock;
|
||||
const osThreadAttr_t AppTask_attributes = {
|
||||
.name = "AppTask",
|
||||
.stack_mem = &defaultTaskBuffer[0],
|
||||
.stack_size = sizeof(defaultTaskBuffer),
|
||||
.cb_mem = &defaultTaskControlBlock,
|
||||
.cb_size = sizeof(defaultTaskControlBlock),
|
||||
.priority = (osPriority_t) osPriorityNormal,
|
||||
};
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* USER CODE BEGIN FunctionPrototypes */
|
||||
|
@ -69,10 +59,42 @@ const osThreadAttr_t AppTask_attributes = {
|
|||
|
||||
/* USER CODE END FunctionPrototypes */
|
||||
|
||||
void App(void *argument);
|
||||
void App(void const * argument);
|
||||
|
||||
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
|
||||
|
||||
/* GetIdleTaskMemory prototype (linked to static allocation support) */
|
||||
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
|
||||
|
||||
/* GetTimerTaskMemory prototype (linked to static allocation support) */
|
||||
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize );
|
||||
|
||||
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
|
||||
static StaticTask_t xIdleTaskTCBBuffer;
|
||||
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
|
||||
|
||||
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
|
||||
{
|
||||
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
|
||||
*ppxIdleTaskStackBuffer = &xIdleStack[0];
|
||||
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
||||
/* place for user code */
|
||||
}
|
||||
/* USER CODE END GET_IDLE_TASK_MEMORY */
|
||||
|
||||
/* USER CODE BEGIN GET_TIMER_TASK_MEMORY */
|
||||
static StaticTask_t xTimerTaskTCBBuffer;
|
||||
static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH];
|
||||
|
||||
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize )
|
||||
{
|
||||
*ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer;
|
||||
*ppxTimerTaskStackBuffer = &xTimerStack[0];
|
||||
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
|
||||
/* place for user code */
|
||||
}
|
||||
/* USER CODE END GET_TIMER_TASK_MEMORY */
|
||||
|
||||
/**
|
||||
* @brief FreeRTOS initialization
|
||||
* @param None
|
||||
|
@ -100,8 +122,9 @@ void MX_FREERTOS_Init(void) {
|
|||
/* USER CODE END RTOS_QUEUES */
|
||||
|
||||
/* Create the thread(s) */
|
||||
/* creation of AppTask */
|
||||
AppTaskHandle = osThreadNew(App, NULL, &AppTask_attributes);
|
||||
/* definition and creation of AppTask */
|
||||
osThreadStaticDef(AppTask, App, osPriorityNormal, 0, 64, defaultTaskBuffer, &defaultTaskControlBlock);
|
||||
AppTaskHandle = osThreadCreate(osThread(AppTask), NULL);
|
||||
|
||||
/* USER CODE BEGIN RTOS_THREADS */
|
||||
/* add threads, ... */
|
||||
|
@ -116,7 +139,7 @@ void MX_FREERTOS_Init(void) {
|
|||
* @retval None
|
||||
*/
|
||||
/* USER CODE END Header_App */
|
||||
__weak void App(void *argument)
|
||||
__weak void App(void const * argument)
|
||||
{
|
||||
/* USER CODE BEGIN App */
|
||||
/* Infinite loop */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue