This commit is contained in:
WangQiang 2014-07-25 04:10:48 +00:00
parent 17b3d7e492
commit 0c605626d3
3 changed files with 3 additions and 2 deletions

1
Spi.h
View File

@ -1,6 +1,7 @@
#ifndef __SPI_H__ #ifndef __SPI_H__
#define __SPI_H__ #define __SPI_H__
#include "Sys.h"
// SpiÀà // SpiÀà
class Spi class Spi
{ {

2
Sys.h
View File

@ -37,9 +37,7 @@ public:
byte MessagePort; // 消息口默认0表示USART1 byte MessagePort; // 消息口默认0表示USART1
uint ID[3]; // 芯片ID uint ID[3]; // 芯片ID
uint FlashSize; // 芯片Flash容量 uint FlashSize; // 芯片Flash容量
void Init(); // 初始化系统 void Init(); // 初始化系统
void Sleep(uint ms); // 毫秒级延迟 void Sleep(uint ms); // 毫秒级延迟
void Delay(uint us); // 微秒级延迟 void Delay(uint us); // 微秒级延迟
void DisableInterrupts(); // 关闭中断 void DisableInterrupts(); // 关闭中断

View File

@ -1,7 +1,9 @@
#ifndef __NRF24L01_H__ #ifndef __NRF24L01_H__
#define __NRF24L01_H__ #define __NRF24L01_H__
#include "Sys.h"
#include "Spi.h" #include "Spi.h"
//#include "Spi.h"
//使用哪个spi作为 nrf 通信口 //使用哪个spi作为 nrf 通信口
#define nRF2401_SPI SPI_3 #define nRF2401_SPI SPI_3