led.c

来自「arm7下的led驱动」· C语言 代码 · 共 68 行

C
68
字号
#include <string.h>
#include "..\inc\def.h"
#include "..\inc\44b.h"
#include "..\inc\44blib.h"
#include "..\inc\led.h"

void flash_Led(void)
{

    rSYSCFG=SYSCFG_8KB;
#if (PLLON==1)
    ChangePllValue(PLL_M,PLL_P,PLL_S);
#endif
  Uart_Printf("\n start, press any key to return \n");
     while(!Uart_GetKey())
    {
	Delay(0);  //calibrate Delay()
       Led_Display(7);
       Delay(5000);  //calibrate Delay()
       Led_Display(0);//000
       Delay(5000);  //calibrate Delay()
       Led_Display(7);//111
    }
}


void LR_Led(void)
{

    rSYSCFG=SYSCFG_8KB;
#if (PLLON==1)
    ChangePllValue(PLL_M,PLL_P,PLL_S);
#endif
        Uart_Printf("\n start, press any key to return \n");
     while(!Uart_GetKey())
    {
    Delay(0);  //calibrate Delay()
    Led_Display(3);//011
    Delay(5000);  //calibrate Delay()
    Led_Display(5);//101
    Delay(5000);//calibrate Delay() 
    Led_Display(6); //110
    Delay(5000);
    }
}

  void Test_Led(void)
{

    rSYSCFG=SYSCFG_8KB;
#if (PLLON==1)
    ChangePllValue(PLL_M,PLL_P,PLL_S);
#endif
    
    Uart_Printf("\n start, press any key to return \n");
     while(!Uart_GetKey())
    {
	    Delay(5000);  //calibrate Delay()
	    Led_Display(1);//001
	    Delay(5000);  //calibrate Delay()
	    Led_Display(2);//010
	    Delay(5000);  //calibrate Delay()
	    Led_Display(4);//100
    }
}


⌨️ 快捷键说明

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