led_flash.c

来自「一个用在51单片机上的调度器 后续版本将出现可占先式调度」· C语言 代码 · 共 41 行

C
41
字号


#include "..\INC\OS_cfg.h"
#include "..\EX_LED\LED_FLASH.h"
#include "..\INC\IO_Port.h"


//测试程序,LED灯闪烁
void LED_Flash1(void)
{
	static bit Flash_Flag;
	if(Flash_Flag)
	{
		Flash_Flag = 0;
		LED1       = 0;
	}
	else
	{
		Flash_Flag = 1;
		LED1       = 1;
	}
}

void LED_Flash2(void)
{
	static bit Flash_Flag;
	if(Flash_Flag)
	{
		Flash_Flag = 0;
		LED2       = 0;
	}
	else
	{
		Flash_Flag = 1;
		LED2       = 1;
	}
}

/*--------------------------------------------------------------------------------*-
-*-------------------------------End of file--------------------------------------*-
-*--------------------------------------------------------------------------------*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?