亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nrf24l01.h

?? nRF24L01開發指導
?? H
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************
*
* File: nrf24l01.h
* 
* Copyright S. Brennen Ball, 2006-2007
* 
* The author provides no guarantees, warantees, or promises, implied or
*	otherwise.  By using this software you agree to indemnify the author
* 	of any damages incurred by using it.
*
*****************************************************************************/

#ifndef NRF24L01_H_
#define NRF24L01_H_

#include <stddef.h>

#ifndef bool
#define bool unsigned char
#endif
#ifndef false
#define false 0
#endif
#ifndef true
#define true !false
#endif

/////////////////////////////////////////////////////////////////////////////////
// SPI function requirements
//
// The user must define a function to send one byte of data and also return the
//   resulting byte of data data through the SPI port. The function used here 
//   has the function prototype
//
//	    unsigned char spi_send_read_byte(unsigned char byte);
//
// This function should take the argument unsigned char byte and send it through
//   the SPI port to the 24L01.  Then, it should wait until the 24L01 has returned
//   its response over SPI.  This received byte should be the return value of the
//   function.
//
// You should also change the include file name below to whatever the name of your 
//   SPI include file is.
//////////////////////////////////////////////////////////////////////////////////
#include "spi1.h"
#define spi_send_read_byte(byte)	spi1_send_read_byte(byte)


/////////////////////////////////////////////////////////////////////////////////
// Delay function requirements
//
// The user must define a function that delays for the specified number of 
//	 microseconds. This function needs to be as precise as possible, and the use
//   of a timer module within your microcontroller is highly recommended. The 
//   function used here has the prototype
//
//	    void delay_us(unsigned int microseconds);
//
// You should also change the include file name below to whatever the name of your 
//   delay include file is.
//////////////////////////////////////////////////////////////////////////////////
#include "delays.h"
#define delay_us(microseconds)		DelayUS(microseconds)


//////////////////////////////////////////////////////////////////////////////////
// IO pin definitions
//
// Below you will find several definitions and includes.  The first is an #include
//   for your microcontroller's include file to allow you to use register names 
//   rather than numbers.  The next three are to allow you to control the pins on
//   the 24L01 that aren't automatically handled by SPI.  These are CE, CSN, and
//   IRQ.
//
// The general format of these defines is a define for the IO register the pin is
//   attached to.  The second define is a mask for the pin.  For example, say that
//   your CE pin is tied to an IO port with the register name IOPORT1. Also, let's
//   say that the IO port is 8-bits wide, and you have attached the pin to pin 0 of
//   the port.  Then your define would look like this:
//
//	 #define nrf24l01_CE_IOREGISTER		IOPORT1
//   #define nrf24l01_CE_PINMASK		0x01
//
// If you have defines in your include file for individual IO pins, you could use
//   this define in this file, as well.  Using the previous example, assume that in
//   your microcontroller's include file, pin 0 of IOPORT1 has a define like this
//
//   #define IOPORT1_PIN0	0x01
//
// Then, you could make your defines for the CE pin in this file look like this:
//
//	 #define nrf24l01_CE_IOREGISTER		IOPORT1
//   #define nrf24l01_CE_PINMASK		IOPORT1_PIN0
//
// You should also change the include file name below to whatever the name of your 
//   processor's register definition include file is.
/////////////////////////////////////////////////////////////////////////////////////
#include "lpc214x.h"

//defines for uC pins CE pin is connected to
//This is used so that the routines can send TX payload data and 
//	properly initialize the nrf24l01 in TX and RX states.
//Change these definitions (and then recompile) to suit your particular application.
#define nrf24l01_CE_IOREGISTER		FIO0PIN
#define nrf24l01_CE_PINMASK			0x200000

//defines for uC pins CSN pin is connected to
//This is used so that the routines can send properly operate the SPI interface
// on the nrf24l01.
//Change these definitions (and then recompile) to suit your particular application.
#define nrf24l01_CSN_IOREGISTER		FIO0PIN
#define nrf24l01_CSN_PINMASK		0x100000

//defines for uC pins IRQ pin is connected to
//This is used so that the routines can poll for IRQ or create an ISR.
//Change these definitions (and then recompile) to suit your particular application.
#define nrf24l01_IRQ_IOREGISTER		FIO0PIN
#define nrf24l01_IRQ_PINMASK		0x8000


////////////////////////////////////////////////////////////////////////////////////
// SPI commands
//
// The following are defines for all of the commands and data masks on the SPI 
//   interface.
////////////////////////////////////////////////////////////////////////////////////
//SPI command defines
#define nrf24l01_R_REGISTER		0x00
#define nrf24l01_W_REGISTER		0x20
#define nrf24l01_R_RX_PAYLOAD	0x61
#define nrf24l01_W_TX_PAYLOAD	0xA0
#define nrf24l01_FLUSH_TX		0xE1
#define nrf24l01_FLUSH_RX		0xE2
#define nrf24l01_REUSE_TX_PL	0xE3
#define nrf24l01_NOP			0xFF

//SPI command data mask defines
#define nrf24l01_R_REGISTER_DATA	0x1F
#define nrf24l01_W_REGISTER_DATA	0x1F

////////////////////////////////////////////////////////////////////////////////////
// Register definitions
//
// Below are the defines for each register's address in the 24L01.
////////////////////////////////////////////////////////////////////////////////////
#define nrf24l01_CONFIG			0x00
#define nrf24l01_EN_AA			0x01
#define nrf24l01_EN_RXADDR		0x02
#define nrf24l01_SETUP_AW		0x03
#define nrf24l01_SETUP_RETR		0x04
#define nrf24l01_RF_CH			0x05
#define nrf24l01_RF_SETUP		0x06
#define nrf24l01_STATUS			0x07
#define nrf24l01_OBSERVE_TX		0x08
#define nrf24l01_CD				0x09
#define nrf24l01_RX_ADDR_P0		0x0A
#define nrf24l01_RX_ADDR_P1		0x0B
#define nrf24l01_RX_ADDR_P2		0x0C
#define nrf24l01_RX_ADDR_P3		0x0D
#define nrf24l01_RX_ADDR_P4		0x0E
#define nrf24l01_RX_ADDR_P5		0x0F
#define nrf24l01_TX_ADDR		0x10
#define nrf24l01_RX_PW_P0		0x11
#define nrf24l01_RX_PW_P1		0x12
#define nrf24l01_RX_PW_P2		0x13
#define nrf24l01_RX_PW_P3		0x14
#define nrf24l01_RX_PW_P4		0x15
#define nrf24l01_RX_PW_P5		0x16
#define nrf24l01_FIFO_STATUS	0x17

////////////////////////////////////////////////////////////////////////////////////
// Default register values
//
// Below are the defines for each register's default value in the 24L01. Multi-byte
//   registers use notation B<X>, where "B" represents "byte" and <X> is the byte
//   number.
////////////////////////////////////////////////////////////////////////////////////
#define nrf24l01_CONFIG_DEFAULT_VAL			0x08
#define nrf24l01_EN_AA_DEFAULT_VAL			0x3F
#define nrf24l01_EN_RXADDR_DEFAULT_VAL		0x03
#define nrf24l01_SETUP_AW_DEFAULT_VAL		0x03
#define nrf24l01_SETUP_RETR_DEFAULT_VAL		0x03
#define nrf24l01_RF_CH_DEFAULT_VAL			0x02
#define nrf24l01_RF_SETUP_DEFAULT_VAL		0x0F
#define nrf24l01_STATUS_DEFAULT_VAL			0x0E
#define nrf24l01_OBSERVE_TX_DEFAULT_VAL		0x00
#define nrf24l01_CD_DEFAULT_VAL				0x00
#define nrf24l01_RX_ADDR_P0_B0_DEFAULT_VAL	0xE7
#define nrf24l01_RX_ADDR_P0_B1_DEFAULT_VAL	0xE7
#define nrf24l01_RX_ADDR_P0_B2_DEFAULT_VAL	0xE7
#define nrf24l01_RX_ADDR_P0_B3_DEFAULT_VAL	0xE7
#define nrf24l01_RX_ADDR_P0_B4_DEFAULT_VAL	0xE7
#define nrf24l01_RX_ADDR_P1_B0_DEFAULT_VAL	0xC2
#define nrf24l01_RX_ADDR_P1_B1_DEFAULT_VAL	0xC2
#define nrf24l01_RX_ADDR_P1_B2_DEFAULT_VAL	0xC2
#define nrf24l01_RX_ADDR_P1_B3_DEFAULT_VAL	0xC2
#define nrf24l01_RX_ADDR_P1_B4_DEFAULT_VAL	0xC2
#define nrf24l01_RX_ADDR_P2_DEFAULT_VAL		0xC3
#define nrf24l01_RX_ADDR_P3_DEFAULT_VAL		0xC4
#define nrf24l01_RX_ADDR_P4_DEFAULT_VAL		0xC5
#define nrf24l01_RX_ADDR_P5_DEFAULT_VAL		0xC6
#define nrf24l01_TX_ADDR_B0_DEFAULT_VAL		0xE7
#define nrf24l01_TX_ADDR_B1_DEFAULT_VAL		0xE7
#define nrf24l01_TX_ADDR_B2_DEFAULT_VAL		0xE7
#define nrf24l01_TX_ADDR_B3_DEFAULT_VAL		0xE7
#define nrf24l01_TX_ADDR_B4_DEFAULT_VAL		0xE7
#define nrf24l01_RX_PW_P0_DEFAULT_VAL		0x00
#define nrf24l01_RX_PW_P1_DEFAULT_VAL		0x00
#define nrf24l01_RX_PW_P2_DEFAULT_VAL		0x00
#define nrf24l01_RX_PW_P3_DEFAULT_VAL		0x00
#define nrf24l01_RX_PW_P4_DEFAULT_VAL		0x00
#define nrf24l01_RX_PW_P5_DEFAULT_VAL		0x00
#define nrf24l01_FIFO_STATUS_DEFAULT_VAL	0x11

////////////////////////////////////////////////////////////////////////////////////
// Register bitwise definitions
//
// Below are the defines for each register's bitwise fields in the 24L01.
////////////////////////////////////////////////////////////////////////////////////
//CONFIG register bitwise definitions
#define nrf24l01_CONFIG_RESERVED	0x80
#define	nrf24l01_CONFIG_MASK_RX_DR	0x40
#define	nrf24l01_CONFIG_MASK_TX_DS	0x20
#define	nrf24l01_CONFIG_MASK_MAX_RT	0x10
#define	nrf24l01_CONFIG_EN_CRC		0x08
#define	nrf24l01_CONFIG_CRCO		0x04
#define	nrf24l01_CONFIG_PWR_UP		0x02
#define	nrf24l01_CONFIG_PRIM_RX		0x01

//EN_AA register bitwise definitions
#define nrf24l01_EN_AA_RESERVED		0xC0
#define nrf24l01_EN_AA_ENAA_ALL		0x3F
#define nrf24l01_EN_AA_ENAA_P5		0x20
#define nrf24l01_EN_AA_ENAA_P4		0x10
#define nrf24l01_EN_AA_ENAA_P3		0x08
#define nrf24l01_EN_AA_ENAA_P2		0x04
#define nrf24l01_EN_AA_ENAA_P1		0x02
#define nrf24l01_EN_AA_ENAA_P0		0x01
#define nrf24l01_EN_AA_ENAA_NONE	0x00

//EN_RXADDR register bitwise definitions
#define nrf24l01_EN_RXADDR_RESERVED	0xC0

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线不卡一区二区| 精品国产露脸精彩对白| 欧美精品一区二区精品网| 欧美韩国日本不卡| 裸体健美xxxx欧美裸体表演| 卡一卡二国产精品| 欧美一区二区三区精品| 国产精品国产自产拍高清av王其| 日韩不卡一区二区| 99久久精品久久久久久清纯| 日韩免费电影网站| 国产成都精品91一区二区三| 国产精品久久久久三级| 日韩一区二区三区电影在线观看 | 亚洲另类春色国产| 日韩高清不卡在线| 91蜜桃婷婷狠狠久久综合9色| 日本精品视频一区二区三区| 久久久精品免费网站| 亚洲色大成网站www久久九九| 午夜一区二区三区在线观看| 懂色av中文字幕一区二区三区| 欧美日韩一区中文字幕| 自拍av一区二区三区| 久久国产麻豆精品| 日韩你懂的电影在线观看| 亚洲国产人成综合网站| 国产99久久久久| 天天操天天色综合| 欧美mv日韩mv国产网站app| 国内成人免费视频| 国产精品视频看| 成+人+亚洲+综合天堂| 欧美成人午夜电影| 日韩精品在线网站| 91在线观看下载| 在线观看视频欧美| 亚洲一区二区在线播放相泽| 国产精品日日摸夜夜摸av| 日韩精品一区二区三区在线播放 | 在线播放91灌醉迷j高跟美女 | 喷水一区二区三区| 亚洲一区二区三区自拍| 自拍偷拍欧美激情| 中文字幕日韩一区| 亚洲欧美综合网| 国产精品久久久久久久岛一牛影视| 久久久九九九九| 久久久久久97三级| 久久九九久久九九| 久久亚洲精华国产精华液 | 中文字幕av不卡| 国产欧美日韩精品在线| 久久久久久久久蜜桃| 久久久不卡网国产精品一区| 久久精品欧美日韩精品| 久久久精品tv| 国产精品天干天干在观线 | 欧美a一区二区| 久久91精品国产91久久小草| 国产一区二三区好的| 国产高清久久久| 不卡一区二区三区四区| 一本到不卡免费一区二区| 欧美亚一区二区| 91精品免费在线观看| 精品少妇一区二区三区视频免付费 | 国产一区二区中文字幕| 成人禁用看黄a在线| 日本韩国精品在线| 91精品国产综合久久精品| 精品女同一区二区| 中文字幕av一区二区三区免费看| 伊人开心综合网| 人禽交欧美网站| 国产福利一区二区| 91福利在线免费观看| 制服视频三区第一页精品| 久久一区二区三区四区| 亚洲欧美日韩在线不卡| 日本午夜精品视频在线观看| 国产成人在线电影| 色婷婷综合久色| 日韩欧美成人午夜| 国产精品久久久久天堂| 日日欢夜夜爽一区| 国产成人av一区二区三区在线观看| 色婷婷av一区二区三区gif| 欧美一级爆毛片| 中文字幕在线播放不卡一区| 午夜精品久久一牛影视| 成人一道本在线| 91麻豆精品国产综合久久久久久 | 成人免费一区二区三区在线观看| 亚洲成人资源在线| 国产99久久久精品| 欧美一区二区三区免费视频 | 国产精品伦理一区二区| 午夜精品久久久久影视| 国产91丝袜在线观看| 欧美电影在线免费观看| 中文字幕亚洲不卡| 久久成人av少妇免费| 在线观看成人免费视频| 欧美激情在线观看视频免费| 奇米影视一区二区三区| 色婷婷av一区二区三区软件| 国产人成亚洲第一网站在线播放| 丝袜美腿亚洲一区| 91免费看`日韩一区二区| 久久综合九色综合97婷婷| 午夜欧美电影在线观看| 成人av网站免费| 久久男人中文字幕资源站| 日韩精品91亚洲二区在线观看| 色综合久久88色综合天天免费| 国产亚洲一区二区三区| 蜜桃视频在线观看一区二区| 在线观看中文字幕不卡| 亚洲国产精品精华液网站| 欧美mv日韩mv国产| 9i看片成人免费高清| 亚洲在线中文字幕| 99久久久精品| 福利视频网站一区二区三区| 欧美一区二区三区视频在线观看| 曰韩精品一区二区| 成人午夜电影网站| 337p粉嫩大胆噜噜噜噜噜91av | 欧美一区二区三区啪啪| 香蕉久久夜色精品国产使用方法 | 国产免费久久精品| 久久国产精品99精品国产| 欧美日韩国产成人在线91| 亚洲激情男女视频| 国产成人日日夜夜| 免费观看一级特黄欧美大片| 成人欧美一区二区三区小说| 国产精品正在播放| 91久久国产最好的精华液| 久久久综合视频| 精品一区二区三区免费播放| 日韩欧美精品在线| 美女免费视频一区二区| 日韩欧美一二三| 久久97超碰色| 国产日韩欧美a| 成人午夜在线视频| 国产精品嫩草99a| 97精品久久久久中文字幕| 亚洲视频资源在线| 色综合天天视频在线观看| 亚洲欧美经典视频| 欧美视频完全免费看| 婷婷中文字幕一区三区| 91精品福利在线一区二区三区 | 国产欧美一区二区三区网站| 国产成人av一区二区三区在线| 中文在线一区二区| 91蝌蚪porny成人天涯| 一区二区三区电影在线播| 欧美午夜寂寞影院| 蜜臀99久久精品久久久久久软件 | 国产精品免费久久| 色综合久久九月婷婷色综合| 丝袜美腿一区二区三区| 精品国产乱码久久久久久免费| 国产99一区视频免费| 亚洲老妇xxxxxx| 欧美一区二区三区免费视频 | 亚洲色图一区二区| 欧美日本在线播放| 国产九色sp调教91| 有码一区二区三区| 日韩欧美一级在线播放| 床上的激情91.| 午夜精品久久久久| 欧美精品一区二区三区高清aⅴ| voyeur盗摄精品| 日韩国产欧美三级| 国产视频一区二区三区在线观看| 91久久国产综合久久| 麻豆精品在线视频| 亚洲视频在线一区| 日韩欧美的一区| 色94色欧美sute亚洲线路一久 | 国产精品一区久久久久| 亚洲男帅同性gay1069| 日韩免费视频一区| 色综合一个色综合亚洲| 久久91精品国产91久久小草| 亚洲色图丝袜美腿| 久久免费国产精品| 欧美无人高清视频在线观看| 国产激情视频一区二区在线观看| 亚洲午夜久久久久中文字幕久| 精品99一区二区三区| 精品污污网站免费看| 成人综合在线视频| 蜜桃久久久久久|