⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 非常全的nrf2401设计资料
💻 C
字号:
/* Copyright (c) 2008 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is confidential property of Nordic 
 * Semiconductor. The use, copying, transfer or disclosure of such information 
 * is prohibited except by express written agreement with Nordic Semiconductor.
 *
 * $LastChangedRevision:$
 */

/** @file
 * The nRF24LE1 example application main file
 *
 * @author Rune Brandsegg

 */
 
#include <Nordic\reg24le1.h>
#include "hal_nrf.h"
#include "radio.h"
#include "application.h"
#include "system.h"





void main(void) 
{ 
  mcu_init();
                                          
  
  EA = 1;                               // Global interrupt enable
  boot_mess();

  if(!B0)                               // Pressed B0 during "boot":
  {                                     // Enter PRX mode (Receiver)        
    radio_init(RECEIVER);
    receiver_mode();                  
  }  
  else                                  // Released B0 during "boot":
  {                                     // Enter PTX mode (Transmitter)
    radio_init(TRANSMITTER);
    transmitter_mode();
  }
}

⌨️ 快捷键说明

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