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

📄 system.h

📁 非常全的nrf2401设计资料
💻 H
字号:
/* 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
 * System header file for the nRF24LE1 example application
 * 
 * @author Rune Brandsegg
 */
#ifndef SYSTEM_H__
#define SYSTEM_H__

#include "nordic_common.h"

#define B0 P04
#define B1 P05
#define B2 P06

#define LED0 P00
#define LED1 P01
#define LED2 P02

#define ON 1
#define OFF 0

#define TRANSMITTER 0
#define RECEIVER 1

/** low level macros */
#define LED0_BLINK() do{  LED0 = ON;        \
                          delay_10ms();     \
                          LED0 = OFF;       \
                          }while(0)

#define LED1_BLINK() do{  LED1 = ON;        \
                          delay_10ms();     \
                          LED1 = OFF;       \
                          }while(0)

#define LED2_BLINK() do{  LED2 = ON;        \
                          delay_10ms();     \
                          LED2 = OFF;       \
                          }while(0)

/** Function used to initialize the system, ports etc.
 */
void mcu_init(void);

/** This function flashes the leds in a certain pattern to indicate system boot
 */
void boot_mess(void);

/** Function that gives 10ms delay.
 */
void delay_10ms(void);

#endif // SYSTEM_H__

⌨️ 快捷键说明

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