📄 l01_bfb.h
字号:
/* 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 only applies to the setup for nRF24L01. That is, using a
* radio module, and the MCU module with SiLabs C8051F320 controller.
*
* @author Eirik Midttun
*/
#ifndef L01_BFB_H__
#define L01_BFB_H__
#include <c8051f320.h>
sbit LED1 = P1^0; // LED1 on BFB
sbit LED2 = P1^1; // LED2 on BFB
sbit LED3 = P1^2; // LED3 on BFB
sbit LED4 = P1^3; // LED4 on BFB
sbit SW1 = P2^1; // SW1 on BFB
sbit SW2 = P2^2; // SW2 on BFB
sbit SW3 = P2^3; // SW3 on BFB
#define ROT_SW() ((~(P2 & 0xf0))>>4);
#define LED1_ON() do{LED1 = 0;}while(0)
#define LED2_ON() do{LED2 = 0;}while(0)
#define LED3_ON() do{LED3 = 0;}while(0)
#define LED4_ON() do{LED4 = 0;}while(0)
#define LED1_OFF() do{LED1 = 1;}while(0)
#define LED2_OFF() do{LED2 = 1;}while(0)
#define LED3_OFF() do{LED3 = 1;}while(0)
#define LED4_OFF() do{LED4 = 1;}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)
#define LED4_TOGGLE() do{LED4 = ~LED4;}while(0)
#define LED1_PULSE() do{LED1_ON();}while(0)
#define LED2_PULSE() do{LED2_ON();}while(0)
#define LED3_PULSE() do{LED3_ON();}while(0)
#define LED4_PULSE() do{LED4_ON();}while(0)
#endif /* L01_BFB_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -