资源简介
CC2530 basic rf
代码片段和文件信息
/***********************************************************************************
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补丁
- 下一篇:中科院高级软件工程期末题库
相关资源
- 基于嵌入式Linux的RFID读卡器的驱动程
- CRF++ toolkit 0.58
- NordicSemiconductor.nRF_DeviceFamilyPack.8.24.
- iperf-3.1.3-win64最新版
- RF MICROELECTRONICS Second Edition
- CC2530测心率
- STM32 RFID RC522 模拟SPI 读写卡程序
- 物理地址烧写Setup_SmartRFProgr_1.6.2.zip
- 高级Visual Basic6编程pdf + 原书源码成为
- WRF4.0官方手册
- GlusterFS3.4.6 RPM 安装包 相关依赖包
- NRF24L01 无线模块 串口转USBLabview上位机
- cc2530基础实验及配套pdf
- ZigBee基于CC2530飞比开发板上的测试源
- TensorFlow官方文档中文版
- RF Power Amplifiers for Wireless Communication
- GPS SiRF_spec
- altium designer cc2530 PCB库原理图文件pc
- SciPy_Tokyo_Hands-on TensorFlow 2.0.pdf
- 语义分割网络DeepLab-v3的架构设计思想
- SIFT\\PCA-SIFT\\SURF论文源代码
- Mathematical Statistics: Basic Ideas and Selec
- Visual Basic 6.0_.NET游戏开发随书源码
- finetune_alexnet_with_tensorflow-master
- Mechanics-sommerfeld
- PCA+SVM+RF
- 基于nrf51822的TSM12触控例程
- STM32F103_SPI驱动nRF24L01
- 《Visual Basic.NET程序设计教程》[PDF]
- tensorflow的model下的slim
评论
共有 条评论