美文网首页
控制LED,简单项目工程。

控制LED,简单项目工程。

作者: 昨天剩下的一杯冷茶 | 来源:发表于2020-06-30 12:03 被阅读0次

代码下载地址:
https://download.csdn.net/download/qq_31806069/12563757

image.png
#include <stdbool.h>
#include "nrf_gpio.h"
#include "nrf_delay.h"
#define LED_0          18

int main(void)
{
    nrf_gpio_cfg_output(LED_0);
    while (true)
    {
        nrf_gpio_pin_clear(LED_0);
        nrf_delay_ms(1000);
        nrf_gpio_pin_set(LED_0);
        nrf_delay_ms(1000);
    }
}

相关文章

网友评论

      本文标题:控制LED,简单项目工程。

      本文链接:https://www.haomeiwen.com/subject/eorzfktx.html