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

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

?? nrf24l01.h

?? 介紹了ARC4加密算法。以單片機為主控器
?? 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 <p18f452.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		PORTC
#define nrf24l01_CE_PINMASK			0x02

//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		PORTC
#define nrf24l01_CSN_PINMASK		0x04

//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		PORTB
#define nrf24l01_IRQ_PINMASK		0x01


////////////////////////////////////////////////////////////////////////////////////
// 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一区二区三区免费野_久草精品视频
一本色道久久加勒比精品 | 成人午夜视频在线观看| 蜜桃视频一区二区三区| 久久av中文字幕片| 成人精品国产一区二区4080| 99精品久久久久久| 欧美猛男超大videosgay| 日韩西西人体444www| 欧美高清在线一区二区| 最新国产成人在线观看| 亚洲一区二区三区在线| 国产在线看一区| 91久久香蕉国产日韩欧美9色| 欧美一区二区三区色| 亚洲欧美影音先锋| 免费亚洲电影在线| 一本色道久久加勒比精品| 久久久蜜臀国产一区二区| 亚洲在线观看免费视频| 成人免费观看视频| 日韩一区二区在线看片| 亚洲最大成人网4388xx| 91一区二区三区在线播放| 久久久蜜桃精品| 久久爱另类一区二区小说| 欧美群妇大交群中文字幕| 一区二区三区免费看视频| 不卡的电影网站| 国产欧美一区二区精品仙草咪| 青青草视频一区| 欧美日韩在线三级| 一二三四社区欧美黄| 色播五月激情综合网| 中日韩av电影| 成人app软件下载大全免费| 欧美电视剧在线观看完整版| 亚洲大片在线观看| 欧美日韩中文一区| 爽爽淫人综合网网站| 欧美丰满高潮xxxx喷水动漫| 视频在线在亚洲| 日韩一区二区免费视频| 欧美a级一区二区| 日韩欧美国产一区在线观看| 日韩高清中文字幕一区| 欧美一区二区成人| 另类小说综合欧美亚洲| 精品国产乱码久久久久久久久| 国产精品资源网站| 亚洲黄色尤物视频| 精品国产一区二区在线观看| 国内精品久久久久影院一蜜桃| 国产亚洲精品bt天堂精选| 成人av电影在线| 免费欧美日韩国产三级电影| 337p日本欧洲亚洲大胆精品| 成人av电影免费观看| 青草国产精品久久久久久| 国产精品视频一二三| 欧美视频一二三区| 成人午夜在线免费| 久久99精品国产91久久来源| 亚洲激情图片一区| 中文字幕一区二区三区不卡在线| 欧美日韩精品一区二区在线播放| 国产一区不卡在线| 九九九精品视频| 婷婷丁香久久五月婷婷| 中文字幕欧美三区| 欧美成人a视频| 欧美手机在线视频| 色婷婷狠狠综合| 北条麻妃一区二区三区| 国产综合久久久久久鬼色 | 波多野结衣中文字幕一区二区三区| 国产一区二区毛片| 亚洲欧美一区二区三区孕妇| wwwwww.欧美系列| 精品少妇一区二区| 91精品黄色片免费大全| 欧美日韩一区二区三区四区 | 26uuu精品一区二区 | 五月婷婷综合激情| 天涯成人国产亚洲精品一区av| 国产在线精品一区二区三区不卡 | 不卡av在线免费观看| 欧美日本韩国一区| 亚洲视频1区2区| 蜜臀久久99精品久久久久宅男| av在线不卡免费看| 91国在线观看| 欧美亚洲动漫精品| 欧美午夜一区二区| 日韩一区和二区| 久久久.com| 亚洲人妖av一区二区| 午夜电影一区二区三区| 寂寞少妇一区二区三区| 成熟亚洲日本毛茸茸凸凹| 成人a级免费电影| 欧美丝袜丝交足nylons图片| 欧美一区二区观看视频| 中文字幕不卡的av| 午夜不卡av在线| 国产一二三精品| 色综合天天综合网国产成人综合天 | www日韩大片| 一区二区三区中文字幕| 成人动漫视频在线| 久久久精品影视| 另类调教123区| 欧美夫妻性生活| 午夜精品免费在线| 色偷偷88欧美精品久久久 | 欧美偷拍一区二区| 国产精品国产三级国产aⅴ入口| 国内成人精品2018免费看| 91精品国产综合久久福利| 亚洲综合在线电影| 99久久国产综合精品麻豆| 久久免费电影网| 国产精品1区2区| 欧美国产日本韩| 国产69精品久久99不卡| 国产亚洲欧洲一区高清在线观看| 精品一区二区三区不卡 | 亚洲日本va在线观看| 18成人在线观看| 韩国v欧美v亚洲v日本v| 一区二区三区四区乱视频| 精品理论电影在线| 欧美日韩视频在线一区二区| 国产精品一区二区三区网站| 午夜av一区二区三区| 国产欧美视频在线观看| 日本韩国欧美一区| 精品在线亚洲视频| 亚洲免费视频中文字幕| 日韩女同互慰一区二区| 91日韩一区二区三区| 久久97超碰色| 亚洲地区一二三色| 国产精品久久久久久久久晋中 | 不卡欧美aaaaa| 久久av老司机精品网站导航| 亚洲在线观看免费| 国产欧美日韩在线观看| 欧美精品精品一区| 91欧美一区二区| 91小视频在线免费看| 成人av网在线| 国产一区二区三区在线观看精品| 亚洲丶国产丶欧美一区二区三区| 国产精品久久久爽爽爽麻豆色哟哟 | 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美国产亚洲另类动漫| 久久久一区二区| 精品国一区二区三区| 精品国产网站在线观看| 欧美日韩国产精品成人| 欧美三区在线观看| 欧美做爰猛烈大尺度电影无法无天| 丁香五精品蜜臀久久久久99网站| 成人在线综合网| 99综合电影在线视频| 91色porny| 91精品久久久久久蜜臀| 日韩欧美一级二级| 久久综合色8888| 中文字幕一区二区三区在线不卡 | 欧美制服丝袜第一页| 色一区在线观看| 欧美日韩国产高清一区二区| 欧美一区二区精品| 国产日韩在线不卡| 一区二区三区高清| 亚洲成人一区二区| 国产成人免费视频网站| 91久久免费观看| 精品国产乱码久久久久久牛牛 | 久久精品亚洲精品国产欧美kt∨ | 久久综合久久鬼色中文字| 中文字幕日韩一区| 国内偷窥港台综合视频在线播放| 91福利区一区二区三区| 中文字幕不卡的av| 午夜精品久久久久久久| 琪琪久久久久日韩精品| 精品无人码麻豆乱码1区2区| 国产一区二区看久久| 91毛片在线观看| 欧美精品一区二区蜜臀亚洲| 国产精品成人在线观看| 肉丝袜脚交视频一区二区| 五月天激情综合| 日韩av电影天堂| 国产成人啪免费观看软件| 成人免费观看视频| 日韩一二三区视频| 中文字幕在线免费不卡|