资源简介

代码片段和文件信息
/***********************************************************************************
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“
/* 5/7/2010 ++ by outman from feibit */
#include
/***********************************************************************************
* 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 1
#define LIGHT_TOGGLE_CMD 0
// Application states
#define IDLE 0
#define SEND_CMD 1
// Application role
#define NONE 0
#define SWITCH 1
#define LIGHT 2
#define APP_MODES 2
/***********************************************************************************
* LOCAL VARIABLES
*/
static uint8 pTxData[APP_PAYLOAD_LENGTH];
static uint8 pRxData[APP_PAYLOAD_LENGTH];
static basicRfCfg_t basicRfConfig;
// 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
/***********************************************************************************
* LOCAL FUNCTIONS
*/
static void appLight();
static void appSwitch();
static uint8 appSelectMode(void);
/* 5/7/2010 ++ by outman from feibit */
void printRecCnt(int8 rec_cnt)
{
char rssiString[16];
sprintf(rssiString (char const *)“Rec Cnt: %d“ (rec_cnt));
halLcdWriteLine(HAL_LCD_LINE_3(char const *)rssiString);
}
/* 5/7/2010 ++ by outman from feibit */
void printRSSI(int8 rssi)
{
char rssiString[16];
sprintf(rssiString (char const *)“RSSI: %d dBm“ (rssi));
halLcdWriteLine(HAL_LCD_LINE_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-05-16 18:29 CC2530_BasicRF\
目录 0 2010-06-30 16:00 CC2530_BasicRF\docs\
文件 456246 2009-10-27 13:13 CC2530_BasicRF\docs\CC2530_Software_Examples.pdf
目录 0 2010-06-30 16:00 CC2530_BasicRF\ide\
目录 0 2010-06-30 16:00 CC2530_BasicRF\ide\settings\
文件 3078 2010-06-30 16:03 CC2530_BasicRF\ide\settings\cc2530_sw_examples.wsdt
目录 0 2010-06-30 16:00 CC2530_BasicRF\ide\srf05_cc2530\
目录 0 2013-05-19 12:12 CC2530_BasicRF\ide\srf05_cc2530\iar\
文件 167509 2013-05-17 18:34 CC2530_BasicRF\ide\srf05_cc2530\iar\light_switch.d51
文件 16771 2013-05-20 12:49 CC2530_BasicRF\ide\srf05_cc2530\iar\light_switch.dep
文件 13542 2009-10-27 13:13 CC2530_BasicRF\ide\srf05_cc2530\iar\light_switch.ewd
文件 32541 2013-05-17 17:32 CC2530_BasicRF\ide\srf05_cc2530\iar\light_switch.ewp
文件 166 2009-10-27 13:13 CC2530_BasicRF\ide\srf05_cc2530\iar\light_switch.eww
文件 14763 2013-05-17 18:34 CC2530_BasicRF\ide\srf05_cc2530\iar\light_switch.hex
文件 196272 2010-10-21 13:51 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test.d51
文件 16587 2013-05-20 11:23 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test.dep
文件 13542 2009-10-27 13:13 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test.ewd
文件 32684 2010-10-21 14:03 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test.ewp
文件 162 2009-10-27 13:13 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test.eww
文件 24979 2010-10-21 13:51 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test.hex
文件 26365 2010-10-11 19:23 CC2530_BasicRF\ide\srf05_cc2530\iar\per_test_new_LCD_20101011.hex
目录 0 2010-06-30 16:00 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\
文件 2496 2013-05-20 11:23 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\light_switch.cspy.bat
文件 5474 2013-05-20 12:49 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\light_switch.dbgdt
文件 459 2013-05-20 12:49 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\light_switch.dni
文件 5060 2013-05-20 12:49 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\light_switch.wsdt
文件 2496 2013-05-20 11:22 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\per_test.cspy.bat
文件 5848 2013-05-20 11:23 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\per_test.dbgdt
文件 459 2013-05-20 11:23 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\per_test.dni
文件 4695 2013-05-20 11:23 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\per_test.wsdt
文件 2496 2010-08-31 17:19 CC2530_BasicRF\ide\srf05_cc2530\iar\settings\spectrum_analyzer.cspy.bat
............此处省略144个文件信息
- 上一篇:kb917021补丁
- 下一篇:中科院高级软件工程期末题库
相关资源
- 用Beckhoff(倍福)PLC读写巴鲁夫RFID
- cc2530寄存器手册
- 飞思卡尔单片机MC9S12XS12G128驱动(硬件
- NRF24L01实现51与STM32双向通讯
- RF电阻衰减网络计算-用以RF设计中
- 清除grub启动项工具MbrFix下载
- 《Visual Basic 串口通信与测控应用技术
- The Impact of ETC System on Safety Performance
-
Differential ex
pression patterns of Toll-li - Furan-BDOPV Donor-Acceptor Polymers with Plana
- nRF24L01无线模块在单片机与FPGA上的应
- STM32F103C8T6+NRF24l01无线通信
- EESkill NRF24L01 无线模块用户手册
- 基于nRF24L01的射频收发电路原理图
- nRF24L01无线模块原理图和与5V单片机的
- 基于AVR的NRF24L01跳频通信程序
-
UnityWebPla
yer及UnityWebPla yerFull -
UnityWebPla
yerFull - 基于SPCE061A的无线环境监控系统设计
- Indentification of Interface Blocker to the LA
- Surface pro 7 SD卡固定硬盘X64驱动带数字
- new surface pro第5代官方最新系统家庭版
- 物联网中无线传感器节点和RFID数据融
- M1卡破解程序 Mifare 1k
- 明泰urf r330读写软件 官方版
- IEEE 802.15.4的CC2530无线数据收发设计
- IEEE 802.15.4的CC2530无线数据收发设计
- TensorFlow1.4 官方手册
- Antenna Theory Analysis and Design.3rd Edition
- ZStack-CC2530-2.5.1a
评论
共有 条评论