Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Skptak committed Oct 13, 2023
1 parent f4e34ae commit c873de9
Showing 1 changed file with 38 additions and 40 deletions.
78 changes: 38 additions & 40 deletions cmake_example/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,66 +42,64 @@
#include <stdio.h>

static StaticTask_t exampleTaskTCB;
static StackType_t exampleTaskStack[configMINIMAL_STACK_SIZE];
static StackType_t exampleTaskStack[ configMINIMAL_STACK_SIZE ];

static StaticTask_t xTimerTaskTCB;
static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH];
static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ];

static StaticTask_t xIdleTaskTCB;
static StackType_t uxIdleTaskStack[configMINIMAL_STACK_SIZE];
static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];

void exampleTask(void *parameters)
void exampleTask( void * parameters )
{
for (;;)
{
/* Example Task Code */
vTaskDelay(100); /* delay 100 ticks */
}
for( ; ; )
{
/* Example Task Code */
vTaskDelay( 100 ); /* delay 100 ticks */
}
}

int main(void)
int main( void )
{
printf("Example FreeRTOS Project\n");
printf( "Example FreeRTOS Project\n" );

xTaskCreateStatic(exampleTask,
"example",
configMINIMAL_STACK_SIZE,
NULL,
configMAX_PRIORITIES - 1,
exampleTaskStack,
&exampleTaskTCB);
xTaskCreateStatic( exampleTask,
"example",
configMINIMAL_STACK_SIZE,
NULL,
configMAX_PRIORITIES - 1,
exampleTaskStack,
&exampleTaskTCB );

vTaskStartScheduler();
vTaskStartScheduler();

/* should never get here. */
for (;;)
{
}
/* should never get here. */
for( ; ; )
{
}

return 0;
return 0;
}

void vApplicationStackOverflowHook(TaskHandle_t xTask,
char *pcTaskName)
void vApplicationStackOverflowHook( TaskHandle_t xTask,
char * pcTaskName )
{
}

void vApplicationGetTimerTaskMemory(StaticTask_t **ppxTimerTaskTCBBuffer,
StackType_t **ppxTimerTaskStackBuffer,
uint32_t *pulTimerTaskStackSize)
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize )
{

*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}

void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer,
StackType_t **ppxIdleTaskStackBuffer,
uint32_t *pulIdleTaskStackSize)
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize )
{

*ppxIdleTaskTCBBuffer = &xIdleTaskTCB;
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
*ppxIdleTaskTCBBuffer = &xIdleTaskTCB;
*ppxIdleTaskStackBuffer = uxIdleTaskStack;
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
}

0 comments on commit c873de9

Please sign in to comment.