【nRF51822蓝牙开发笔记】点亮LED灯

/******************** (C) COPYRIGHT 2014 ???? ********************
 * ÎļþÃû  :main
 * ÃèÊö    :
 * ÊÔÑéƽ̨:  nRF51822À¶ÑÀ¿ª·¢°å  
 * ÃèÊö    : 
 * ×÷Õß    :Ð¥·ç
 * ²©¿Í    :
**********************************************************************/



#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "nrf_gpio.h"
#include "led.h"

int main(void)
{
  // Configure LED-pins as outputs
  LED_Init();
  
  // LED 0 and LED 1 blink alternately.
  while(true)
  {
    LED1_Open();
    LED2_Close();
    
    nrf_delay_ms(500);
    
    LED2_Open();
    LED1_Close();
    
    nrf_delay_ms(500);
  }
}

 

/**************************End of XF-Studio*******************************/

  

原文地址:https://www.cnblogs.com/xiaofeng6636/p/4053296.html