lu1_bfb.h

来自「这是nrf24lu1的无线鼠标源代码,应用平台是keil c」· C头文件 代码 · 共 42 行

H
42
字号
/* Copyright (c) 2007 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.
 */ 
 
/** @file
 * File containing definitions for using the Basic Feature Board.
 * The definitions applies specifically for a BFB with an 
 * nRF24LU1 Radio Module.
 * @author Eirik Midttun
 */
 
#ifndef LU1_BFB_H__
#define LU1_BFB_H__

#include <Nordic\reg24lu1.h>

sbit SW1  = P0^5;  // SW1 on BFB
sbit SW2  = P0^4;  // SW2 on BFB
sbit SW3  = P0^3;  // SW3 on BFB

sbit LED1 = P0^0;  // LED1 on BFB
sbit LED2 = P0^1;  // LED2 on BFB
sbit LED3 = P0^2;  // LED3 on BFB

#define LED1_ON() do{LED1 = 1;}while(0)
#define LED2_ON() do{LED2 = 1;}while(0)
#define LED3_ON() do{LED3 = 1;}while(0)

#define LED1_OFF() do{LED1 = 0;}while(0)
#define LED2_OFF() do{LED2 = 0;}while(0)
#define LED3_OFF() do{LED3 = 0;}while(0)

#define LED1_TOGGLE() do{LED1 = ~LED1;}while(0)
#define LED2_TOGGLE() do{LED2 = ~LED2;}while(0)
#define LED3_TOGGLE() do{LED3 = ~LED3;}while(0)

#endif // LU1_BFB_H__

⌨️ 快捷键说明

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