#include "app_inc.h"    //应用任务公共头文件

//===========================================================================
//任务名称：task_A
//功能概要：Light_D1灯每1秒闪烁1次
//参数说明：未使用
//===========================================================================
void task_A(uint32_t initial_data)
{
	_lwlog_write(lwlog1, (_mqx_max_type)'A',
					(_mqx_max_type)(++k), 0, 0, 0, 0, 0);	
	_lwlog_read(lwlog1, LOG_READ_OLDEST_AND_DELETE,&entry);
	printf("Time: %ld.%03ld%03ld", entry.SECONDS, entry.MILLISECONDS,
						                                entry.MICROSECONDS);
	printf("        task_");
	printf("%c,    I=%d\n", (uchar)entry.DATA[0] & 0xff,
						(_mqx_uint)entry.DATA[1]);
	
    while (TRUE)
    {
        printf("task_A---Light_D1灯亮---\n");
        light_control(Light_D1,LIGHT_ON);  
        _time_delay(1000);                 //延时1000ms(放弃CPU控制权)
        printf("task_A---Light_D1灯暗---\n");
        light_control(Light_D1,LIGHT_OFF); 
        _time_delay(1000);                 //延时1000ms(放弃CPU控制权)
    }
}


