remove dead code

This commit is contained in:
daishengdong
2020-02-15 16:45:07 +08:00
parent 405e5d970a
commit d8ca59bf65

View File

@@ -5,7 +5,6 @@
#include "rtc.h"
#include "tim.h"
// this is a stm8 rtc demo UART1 print,the baud rate is 57600.
// LED GPIOB0
@@ -32,10 +31,8 @@ void LED_Off(void)
void Delay(unsigned int time)
{
unsigned int i;
while (time--)
{
for (i = 300; i > 0; i--)
{
while (time--) {
for (i = 300; i > 0; --i) {
asm("nop");
}
}
@@ -60,45 +57,6 @@ void disp_rtc(void)
UART1_Send_String(" \r\n");
}
#if 0
int main(void)
{
LED_GPIO_Init();
LED_On();
UART1_Init(57600); //Init the UART1 and the baud rate is 57600
UART1_Send_String("RTC Demo Code\r\n");
RTC_Setting_Init(); //Init RTC
while (1)
{
RTC_Get_Time();
UART1_Send_String("Current Time:");
UART1_Send_Dec(clock.cYear, 2); //YY-MM-DD
UART1_Send_String("-");
UART1_Send_Dec(clock.cMonth, 2);
UART1_Send_String("-");
UART1_Send_Dec(clock.cDay, 2);
UART1_Send_String(" "); //HH:MM:SS
UART1_Send_Dec(clock.cHour, 2);
UART1_Send_String(":");
UART1_Send_Dec(clock.cMinute, 2);
UART1_Send_String(":");
UART1_Send_Dec(clock.cSecond, 2);
UART1_Send_String(" ");
LED_On();
Delay(200);
LED_Off();
Delay(200);
}
}
#endif
void task1_entry(void *arg)
{
while (1) {
@@ -139,12 +97,11 @@ int main(void)
4,
task1_stack, sizeof(task1_stack),
0);
#if 1
tos_task_create(&task2, "task2", task2_entry, NULL,
4,
task2_stack, sizeof(task2_stack),
0);
#endif
tos_knl_start();