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.
33 lines
566 B
33 lines
566 B
/**
|
|
* 添加了Freertos分配了大量RAM
|
|
* 本程序存在两个任内:LED闪烁、串口接收并打印
|
|
*/
|
|
#include "CH58x_common.h"
|
|
#include "stdio.h"
|
|
|
|
#include "mytask.h"
|
|
|
|
void Key_Callback(void *context);
|
|
|
|
int main()
|
|
{
|
|
SetSysClock(CLK_SOURCE_PLL_60MHz);
|
|
|
|
Uart_Init(1, PA_9, PA_8, 115200, DataBit_8, StopBit_1, Parity_None);
|
|
|
|
|
|
printf("MCU Start!\r\n");
|
|
|
|
MyRtos_Init(); // 任务在mytask.c中添加
|
|
|
|
while (1)
|
|
{
|
|
printf("代码不能到达\r\n");
|
|
}
|
|
}
|
|
|
|
void Key_Callback(void *context)
|
|
{
|
|
printf("Key_Callback\r\n");
|
|
}
|
|
|
|
|