资料介绍
nRF905驱动程序(Atmega16主控) 程序和电路图
nRF905驱动程序(Atmega16主控)
头文件:nrf905.h
/*
* nrf905.h
*
* Created on: 2009-5-8
* Author: Administrator
*/
#ifndef NRF905_H_
#define NRF905_H_
// regs
#define WC 0x00 // Write configuration register command
#define RC 0x10 // Read configuration register command
#define WTP 0x20 // Write TX Payload command
#define RTP 0x21 // Read TX Payload command
#define WTA 0x22 // Write TX Address command
#define RTA 0x23 // Read TX Address command
#define RRP 0x24 // Read RX Payload command
// Control IOs
#define NRF905_TX_EN RF_IO4 // PB3
#define NRF905_TRX_CE RF_IO5 // PB2
#define NRF905_PWR_UP RF_IO6 // PB1
#define NRF905_CD RF_IO3
#define NRF905_AM RF_IO1
#define NRF905_DR RF_IO2
#define NRF905_CSN RF_IO0
// 定义数据包
#define NRF905_PKT_LEN 32
typed