⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 target_xbee.h

📁 nRF24E1 sample xBee development
💻 H
字号:
/************************************************************************************
* Header file containing definitions for the XBee platform.
*
* (c) Copyright 2006, MaxStream, Inc.
*
************************************************************************************/

#ifndef _TARGET_XBEE_H_
#define _TARGET_XBEE_H_

#include "gb60_io.h"
#include "AllTargets.h"

#ifdef TARGET_XBEE
  #define HWAssertAbelReset	PTCD &= ~0x10;	// Reset = 0; (PTC4)
  #define HWDeAssertAbelReset     PTCD |=  0x10;	// Reset = 1;
  
  #define RxTxEnable              	PTCD |=  0x08;	// RxTxEnable = 1 (PTC3)
  #define RxTxDisable              	PTCD &= ~0x08;	// RxTxDisable = 0
  
  #define AttEnable                	PTCD |=  0x04;	// PTC2
  #define AttDisable               	PTCD &= ~0x04;
  
  #define IsAbelActive()   	(PTDD & (1<<4))	// GPIO1 (PTD4)
  #define IsAbelCrcOk()    	(PTDD & (1<<3))	// GPIO2 (PTD3)
  #define IsAbelCcaBusy()  	(PTDD & (1<<3))	// GPIO2
  
  //Antenna pins (PTA2, PTC6)
  #define ENABLE_ANTENNESWITCH_PINS    PTADD |= 0x04; PTCDD |= 0x40;
  #define RX_ANTENNE_ENABLED		   PTAD &= ~0x04; PTCD |= 0x40;
  #define TX_ANTENNE_ENABLED		   PTAD |= 0x04; PTCD &= ~0x40;
  
  // Setup Port C for ABEL setup (GPIO 1+2)
  #define ABEL_GPIO1		(1<<4)
  #define ABEL_GPIO2		(1<<3)
  
  #define ABEL_ATT_PIN		(1<<2)
  #define ABEL_RxTx_PIN	(1<<3)
  #define ABEL_RESET_PIN	(1<<4)
  #define ABEL_ANT_SWITCH_PIN 		// No antenna switch
  
  #define  mSETUP_PORT_A  PTAPE = 0x00;	
  #define  mSETUP_PORT_B	PTBD = 0x00;	PTBPE = 0x00;PTBDD = 0x00;
  #define  mSETUP_PORT_C  PTCDD = (ABEL_RESET_PIN | ABEL_ATT_PIN | ABEL_RxTx_PIN );
  #define  mSETUP_PORT_D  PTDPE = 0x00;
  
  #define NW_LED_ON() 
	#define NW_LED_OFF() 
	#define NW_LED_CHK() 
	#define NW_LED_TOGGLE()
	
	#define USE_LOW_POWER
	#define mENTER_LOWPOWER

	#if defined FLASH_LIB_ENABLED || defined BOOTLOADER_ENABLED
	  #define USE_NVM_QUICK_START
	#endif defined FLASH_LIB_ENABLED || defined BOOTLOADER_ENABLED
    
  #define PHY_TYPE "XBEE_DEV"
#endif

#endif _TARGET_XBEE_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -