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

📄 sensor-configuration.h

📁 是zmac的协议的全部完整的解析.代码例子很全
💻 H
字号:
// *******************************************************************// Stack Profile Parameters#define EMBER_STACK_PROFILE            0// *******************************************************************// Security//// There are three ways security can be configured:// 1) no security// 2) security with unsecure join (key is passed from parent)// 3) security with secure join (both devices must have the key)//// This application is configured to use security and join securely.// The key is preconfigured on each device with a call to setSecurityKey// in app/sensor/common.c. Devices must pass a value of TRUE as the// third parameter to emberJoinNetwork to join securely.//// EMBER_SECURITY_LEVEL=5 turns security on.// EMBER_SECURITY_LEVEL=0 turns security off.// EMBER_ALLOW_UNSECURED_JOINING should be defined when joining unsecurely//// This application also contains a define (USE_KEY_WHEN_JOINING) that// controls what is passed to emberJoinNetwork's hasKey parameter. This// value should be TRUE when joining securely, and FALSE when joining// unsecurely.///************************************************************************//*	lvyong	2006-12-1													*//*	原先在 ember-configuration-defaults.h 中,							*//*	EMBER_PACKET_BUFFER_COUNT = 24, 但是在 Sink 应用中, 考虑到需要		*//*	使用 PACKET_BUFFER 作为 RF 数据的缓存, 因此扩大4个共160字节			*//*	在 Sensor 应用中, 考虑到接收到的 RF 数据很少, 因此减少 1 个			*//************************************************************************/#ifdef	SINK_APP	#define		EMBER_PACKET_BUFFER_COUNT		28#endif#ifdef	SENSOR_APP	#define		EMBER_PACKET_BUFFER_COUNT		23#endif// To turn security on and use secure joining#define EMBER_SECURITY_LEVEL   5#define USE_KEY_WHEN_JOINING   TRUE// To turn security and use unsecure joining// #define EMBER_SECURITY_LEVEL   5// #define USE_KEY_WHEN_JOINING   FALSE// #define EMBER_ALLOW_UNSECURED_JOINING// To run without security// #define EMBER_SECURITY_LEVEL   0// #define USE_KEY_WHEN_JOINING   FALSE// *******************************************************************// Ember static memory requirements//// There are constants that define the amount of static memory// required by the stack. If the application does not set them then// the default values from ember-configuration-defaults.h are used.//// for example, this changes the default number of buffers to 8// #define EMBER_PACKET_BUFFER_COUNT 8// sink nodes need 15 bindings - non-sinks don't need as many bindings#ifdef SINK_APP  #define EMBER_BINDING_TABLE_SIZE			8  #define EMBER_TEMPORARY_BINDING_ENTRIES	8#else  #define EMBER_BINDING_TABLE_SIZE			3  #define EMBER_TEMPORARY_BINDING_ENTRIES	3#endif// RAM: No sequenced messages: recover the RAM -- Saved 24 bytes#define	EMBER_TRANSPORT_CONNECTION_COUNT	0// Lvyong 2006-12-6// in sensor-configuration-defaults.h, EMBER_NEIGHBOR_TABLE_SIZE is 16// changed to 12 here for ram issue.#define	EMBER_NEIGHBOR_TABLE_SIZE			12// *******************************************************************// Application Handlers//// By default, a number of stub handlers are automatically provided// that have no effect.  If the application would like to implement any// of these handlers itself, it needs to define the appropriate macro// need to define this to use the scan utilities#define EMBER_APPLICATION_HAS_ENERGY_SCAN_RESULT_HANDLER#define EMBER_APPLICATION_HAS_BUTTON_HANDLER#define EMBER_APPLICATION_HAS_REMOTE_BINDING_HANDLER#define EMBER_APPLICATION_HAS_UNICAST_SENT_HANDLER#if (defined(SINK_APP)) || (defined(SENSOR_APP))  #define EMBER_APPLICATION_HAS_CHILD_JOIN_HANDLER  #define EMBER_APPLICATION_HAS_POLL_HANDLER#endif#if (defined(SLEEPY_SENSOR_APP)) || (defined(MOBILE_SENSOR_APP))  #define EMBER_APPLICATION_HAS_POLL_COMPLETE_HANDLER#endif// To add bootloading capability to the application.// #define USE_BOOTLOADER_LIB#ifdef USE_BOOTLOADER_LIB	#define	EMBER_APPLICATION_HAS_BOOTLOAD_HANDLERS	#define	EMBER_APPLICATION_HAS_RAW_HANDLERS	// 2006-12-1 lvyong EMBER_APPLICATION_HAS_RAW_HANDLERS 允许接收 802.15.4 的数据包#endif// *******************************************************************// Sensor data acquisition setup - Which ADC channel will sensor data come from?// Default is the ADC input where temperature sensor is wired on Ember// development board for your platform#if (defined BOARD_DEV0455)// EM250 Breakout Board#define	SENSOR_ADC_CHANNEL 	ADC_SOURCE_ADC2_GND#define SENSOR_ADC_PLATFORM_ADJUSTMENT 1#elif (defined BOARD_DEV0221) || (defined BOARD_DEV0222)// AVR/EM2420 Breakout Boards#define SENSOR_ADC_CHANNEL	ADC_SOURCE_ADC1#define SENSOR_ADC_PLATFORM_ADJUSTMENT 2#else// Some other board pinout#error Need to to define SENSOR_ADC_CHANNEL for custom board#endif

⌨️ 快捷键说明

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