You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
874 B
36 lines
874 B
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "platform/porting.h"
|
|
|
|
#pragma GCC diagnostic push
|
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
|
#pragma GCC diagnostic ignored "-Wreturn-type"
|
|
|
|
static char* args_task_3= "task 3";
|
|
|
|
void task3(void* ptr)
|
|
{
|
|
static uint32_t wakeup = 0;
|
|
char* args = (char*)ptr;
|
|
wakeup = osSchedulerGetSysT();
|
|
DEBUG_MSG("This is %s\n\r", args);
|
|
osTaskDelayUntil(wakeup, MS_2_TICKS(3000));
|
|
}
|
|
|
|
int
|
|
main(int argc, char* argv[])
|
|
{
|
|
initClock();
|
|
initAliveLED();
|
|
usart2Init();
|
|
RCC_ClocksTypeDef RCC_Clocks;
|
|
RCC_GetClocksFreq (&RCC_Clocks);
|
|
osPrintf("System Core Clock: %d\n\r", SystemCoreClock);
|
|
osPrintf("HCLK: %d\n\r", RCC_Clocks.HCLK_Frequency);
|
|
osTaskCreate(*task3, "Task 3", args_task_3, 10, NULL);
|
|
while (1);
|
|
// Infinite loop, never return.
|
|
}
|
|
|
|
#pragma GCC diagnostic pop
|
|
|