資源簡介
基于zigbee的大型停車場設計代碼基于zigbee的大型停車場設計代碼

代碼片段和文件信息
/***********************************************************************************
??Filename:?light_switch.c
??Description:??This?application?function?either?as?a?light?or?a
??switch?toggling?the?ligh.?The?role?of?the
??application?is?chosen?in?the?menu?with?the?joystick?at?initialisation.
??Push?S1?to?enter?the?menu.?Choose?either?switch?or
??light?and?confirm?choice?with?S1.
??Joystick?Up:?Sends?data?from?switch?to?light
***********************************************************************************/
/***********************************************************************************
*?INCLUDES
*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?“hal_mcu.h“
#include?“hal_button.h“
#include?“hal_rf.h“
#include?“util_lcd.h“
#include?“basic_rf.h“
#include?
#include?“uart.h“
/***********************************************************************************
*?CONSTANTS
*/
//?Application?parameters
#define?RF_CHANNEL????????????????25??????//?2.4?GHz?RF?channel
//?BasicRF?address?definitions
#define?PAN_ID????????????????0x2007??????//
#define?SWITCH_ADDR???????????0x2520
#define?LIGHT_ADDR????????????0xBEEF
#define?APP_PAYLOAD_LENGTH????????2
#define?LIGHT_TOGGLE_CMD??????????‘*‘
#define?APP_PAYLOAD_LENGTH1????????2
#define?LIGHT_TOGGLE_CMD1??????????‘&‘
//?Application?states
#define?IDLE??????????????????????0
#define?SEND_CMD??????????????????1
//?Application?role
#define?NONE??????????????????????0
#define?SWITCH????????????????????1
#define?LIGHT?????????????????????2
#define?APP_MODES?????????????????2
#define?ab????????????????????????‘1‘
//定義控制燈的端口
#define?RLED?P1_0
#define?YLED?P1_3
//uint8??Recdata[5]=“hezed“;
uint8??table[2]={0x010X0A};
uint8??table1[2]={0x010X0B};
uint8?table2[2]={0x020x0A};
uint8?table3[2]={0x020x0B};
uint8?card1[]={0xFE0x920x590x230xE9};//a
uint8?card2[]={0xFE0x4F0x590x230x34};//b
uint8?RXTXflag?=?1;
//uint8?temp;
uint8??datanumber?=?0;
uint8??stringlenai;
uint8?ag=0;
uint8?bg=0;
uint8?m=0;
uint8?appMode?=?NONE;
/***********************************************************************************
*?LOCAL?VARIABLES
*/
static?uint8?pTxData[APP_PAYLOAD_LENGTH];
static?uint8?pRxData[APP_PAYLOAD_LENGTH];
static?basicRfCfg_t?basicRfConfig;
void?uart2();
//?Mode?menu
static?menuItem_t?pMenuItems[]?=
{
#ifdef?ASSY_EXP4618_CC2420
??//?Using?Softbaugh?7-seg?display
??“?L?S????“?SWITCH
??“?LIGHT??“?LIGHT
#else
??//?SRF04EB?and?SRF05EB
??“Switch“???SWITCH
??“Light“????LIGHT
#endif
};
static?menu_t?pMenu?=
{
??pMenuItems
??N_ITEMS(pMenuItems)
};
#ifdef?SECURITY_CCM
//?Security?key
static?uint8?key[]=?{
????0xc0?0xc1?0xc2?0xc3?0xc4?0xc5?0xc6?0xc7
????0xc8?0xc9?0xca?0xcb?0xcc?0xcd?0xce?0xcf
};
#endif
/*****************************************************************
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????12775??2011-08-12?17:05??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\light_switch\light_switch.c
?????文件???????9884??2011-07-30?15:39??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\light_switch\light_switch11.c
?????文件???????1842??2011-08-11?08:43??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\light_switch\uart.c
?????文件????????163??2011-08-11?08:43??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\light_switch\uart.h
?????文件??????14194??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\per_test\per_test.c
?????文件???????3385??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\per_test\per_test.h
?????文件???????6852??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\per_test\per_test_menu.c
?????文件???????3527??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\per_test\per_test_menu.h
?????文件???????8512??2010-11-10?18:05??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\apps\spectrum_analyzer\spectrum_analyzer.c
?????文件??????20499??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\basicrf\basic_rf.c
?????文件???????5088??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\basicrf\basic_rf.h
?????文件???????4044??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\basicrf\basic_rf_security.c
?????文件???????2887??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\basicrf\basic_rf_security.h
?????文件???????6227??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\common\cc8051\hal_cc8051.h
?????文件???????6128??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\common\hal_defs.h
?????文件???????3957??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\common\hal_int.c
?????文件???????5345??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\common\hal_types.h
?????文件???????3817??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\adc.c
?????文件???????4056??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\adc.h
?????文件???????4825??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\clock.c
?????文件???????3949??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\clock.h
?????文件???????5957??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\hal_mcu.c
?????文件??????16651??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\hal_rf.c
?????文件??????13563??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\hal_rf_security.c
?????文件???????2081??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\hal_rf_util.c
?????文件???????5944??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\radios\cc2530\hal_timer_32k.c
?????文件??????35798??2011-07-31?10:54??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\targets\common\hal_lcd_srf05.c
?????文件???????2776??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\targets\interface\hal_assert.h
?????文件???????3000??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\targets\interface\hal_button.h
?????文件???????3872??2009-10-27?13:13??基于zigbee的大型停車場設計代碼\CC2530?BasicRF\source\components\targets\interface\hal_digio.h
............此處省略48個文件信息
- 上一篇:現代通信網技術課后答案
- 下一篇:基于FPGA的VHDL語言的PWM波發生
評論
共有 條評論