Fixed the wrong indentation and typos

This commit is contained in:
David Lin
2020-03-06 23:23:28 +08:00
committed by GitHub
parent df17c82e52
commit b63867f519

View File

@@ -23,7 +23,7 @@ void SYS_Init(void)
/* Disable digital input path of analog pin XT1_OUT to prevent leakage */ /* Disable digital input path of analog pin XT1_OUT to prevent leakage */
GPIO_DISABLE_DIGITAL_PATH(PF, BIT2 | BIT3); GPIO_DISABLE_DIGITAL_PATH(PF, BIT2 | BIT3);
/* Enable<EFBFBD><EFBFBD> HXT clock */ /* Enable£¬ HXT clock */
CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk); CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);
/* Switch HCLK clock source to external */ /* Switch HCLK clock source to external */
@@ -59,19 +59,16 @@ void UART0_Init()
//task1 function //task1 function
void task1_fun(void *Parameter) void task1_fun(void *Parameter)
{ {
while(1) while(1)
{ {
printf("Task1 <EFBFBD><EFBFBD>Thansplant CORTEX-M23 Succeed\r\n"); printf("Task1: Thansplant CORTEX-M23 Succeed\r\n");
PB14 =~ PB14; PB14 =~ PB14;
tos_task_delay(1000); tos_task_delay(1000);
} }
} }
void task2_task(void *Parameter) void task2_task(void *Parameter)
{ {
k_err_t err; k_err_t err;
while(1) while(1)
{ {
@@ -89,7 +86,8 @@ int main()
/* Init System, peripheral clock and multi-function I/O */ /* Init System, peripheral clock and multi-function I/O */
SYS_Init(); SYS_Init();
tos_knl_init(); //tos init ,include SystickInit,should init after protected registers unlock /* tos init ,include SystickInit,should init after protected registers unlock */
tos_knl_init();
/* Lock protected registers */ /* Lock protected registers */
SYS_LockReg(); SYS_LockReg();
@@ -109,8 +107,7 @@ int main()
2, 2,
task1_stack, task1_stack,
task1_size, task1_size,
100 100);
);
err = tos_task_create( err = tos_task_create(
&task2, &task2,
@@ -123,9 +120,7 @@ int main()
100); 100);
if(err != K_ERR_NONE) if(err != K_ERR_NONE)
printf("TenentOS creat task fail! code is %d\r\n",err); printf("TencentOS create task fail! errcode is %d\r\n",err);
tos_knl_start(); //Start TOS TINY tos_knl_start(); //Start TOS TINY
} }