diff --git a/CC2530 BasicRF/docs/CC2530_Software_Examples.pdf b/CC2530 BasicRF/docs/CC2530_Software_Examples.pdf
new file mode 100644
index 0000000..69c0040
Binary files /dev/null and b/CC2530 BasicRF/docs/CC2530_Software_Examples.pdf differ
diff --git a/CC2530 BasicRF/ide/cc2530_sw_examples.eww b/CC2530 BasicRF/ide/cc2530_sw_examples.eww
new file mode 100644
index 0000000..5f380c4
--- /dev/null
+++ b/CC2530 BasicRF/ide/cc2530_sw_examples.eww
@@ -0,0 +1,46 @@
+
+
+
+
+ $WS_DIR$\srf05_cc2530\iar\light_switch.ewp
+
+
+ $WS_DIR$\srf05_cc2530_91\iar\light_switch.ewp
+
+
+ $WS_DIR$\srf05_cc2530\iar\per_test.ewp
+
+
+ $WS_DIR$\srf05_cc2530_91\iar\per_test.ewp
+
+
+ $WS_DIR$\srf05_cc2530\iar\spectrum_analyzer.ewp
+
+
+
+ All
+
+ light_switch
+ srf05_cc2530
+
+
+ light_switch
+ srf05_cc2530_91
+
+
+ per_test
+ srf05_cc2530
+
+
+ per_test
+ srf05_cc2530_91
+
+
+ spectrum_analyzer
+ srf05_cc2530
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/settings/cc2530_sw_examples.wsdt b/CC2530 BasicRF/ide/settings/cc2530_sw_examples.wsdt
new file mode 100644
index 0000000..9dc393a
--- /dev/null
+++ b/CC2530 BasicRF/ide/settings/cc2530_sw_examples.wsdt
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+ light_switch/srf05_cc2530spectrum_analyzer/srf05_cc2530per_test/srf05_cc2530_91light_switch/srf05_cc2530_91per_test/srf05_cc2530light_switch0
+
+
+
+
+
+
+
+
+ 180272714677140
+
+ 20103527669221305
+
+
+
+
+
+ TabID-6521-14246
+ Workspace
+ Workspace
+
+
+ <ws><ws>/light_switch<ws>/light_switch/application<ws>/light_switch/basic rf<ws>/light_switch/hal<ws>/light_switch/hal/common<ws>/light_switch/hal/srf05_soc<ws>/spectrum_analyzer<ws>/spectrum_analyzer/applicationlight_switchlight_switch/applicationper_test
+
+
+
+ 0TabID-28542-24478BuildBuildTabID-19357-17264Debug LogDebug-Log0
+
+
+
+
+
+ TextEditor$WS_DIR$\..\source\apps\light_switch\light_switch.c0192575457540TextEditor$WS_DIR$\..\source\Components\targets\srf05_soc\hal_board.h0632842840100000010000001
+
+
+
+
+
+
+ iaridepm.enu1-2-2461254-2-2172161139159242105207120696241-2-21591238-2-212401611003236242105139159242105
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup (2) of spectrum_analyzer.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup (2) of spectrum_analyzer.ewd
new file mode 100644
index 0000000..dcbeac1
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup (2) of spectrum_analyzer.ewd
@@ -0,0 +1,501 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup (2) of spectrum_analyzer.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup (2) of spectrum_analyzer.ewp
new file mode 100644
index 0000000..fdf340f
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup (2) of spectrum_analyzer.ewp
@@ -0,0 +1,1136 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$/../../../source/apps/spectrum_analyzer/spectrum_analyzer.c
+
+
+
+ utilities
+
+ $PROJ_DIR$/../../../source/Components/utils/util_lcd.c
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util_lcd.h
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util.c
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util.h
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util_menu.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$/../../../source/Components/common/hal_int.c
+
+
+ $PROJ_DIR$/../../../source/Components/common/hal_defs.h
+
+
+ $PROJ_DIR$/../../../source/Components/common/hal_types.h
+
+
+ $PROJ_DIR$/../../../source/Components/common/cc8051/hal_cc8051.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/common/hal_lcd_srf05.c
+
+
+
+ interface
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_assert.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_button.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_digio.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_int.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_joystick.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_led.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_lcd.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_mcu.h
+
+
+
+ rf
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_rf.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_rf_util.h
+
+
+ cc2530
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/hal_rf.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/clock.h
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/clock.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/hal_mcu.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/adc.h
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/adc.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/hal_rf_util.c
+
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_board.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_board.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_button.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_digio.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_joystick.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_assert.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_led.c
+
+
+
+
+ srf05_cc2530
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of light_switch.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of light_switch.ewd
new file mode 100644
index 0000000..5840fac
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of light_switch.ewd
@@ -0,0 +1,508 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of light_switch.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of light_switch.ewp
new file mode 100644
index 0000000..c36948d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of light_switch.ewp
@@ -0,0 +1,1152 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ srf05_cc2530
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_security.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of per_test.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of per_test.ewd
new file mode 100644
index 0000000..5840fac
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of per_test.ewd
@@ -0,0 +1,508 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of per_test.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of per_test.ewp
new file mode 100644
index 0000000..b0df1df
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of per_test.ewp
@@ -0,0 +1,1157 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ srf05_cc2530
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test.h
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test_menu.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test_menu.h
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_timer_32k.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_uart.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of spectrum_analyzer.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of spectrum_analyzer.ewd
new file mode 100644
index 0000000..dcbeac1
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of spectrum_analyzer.ewd
@@ -0,0 +1,501 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of spectrum_analyzer.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of spectrum_analyzer.ewp
new file mode 100644
index 0000000..fdf340f
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/Backup of spectrum_analyzer.ewp
@@ -0,0 +1,1136 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$/../../../source/apps/spectrum_analyzer/spectrum_analyzer.c
+
+
+
+ utilities
+
+ $PROJ_DIR$/../../../source/Components/utils/util_lcd.c
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util_lcd.h
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util.c
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util.h
+
+
+ $PROJ_DIR$/../../../source/Components/utils/util_menu.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$/../../../source/Components/common/hal_int.c
+
+
+ $PROJ_DIR$/../../../source/Components/common/hal_defs.h
+
+
+ $PROJ_DIR$/../../../source/Components/common/hal_types.h
+
+
+ $PROJ_DIR$/../../../source/Components/common/cc8051/hal_cc8051.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/common/hal_lcd_srf05.c
+
+
+
+ interface
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_assert.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_button.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_digio.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_int.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_joystick.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_led.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_lcd.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_mcu.h
+
+
+
+ rf
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_rf.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/interface/hal_rf_util.h
+
+
+ cc2530
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/hal_rf.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/clock.h
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/clock.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/hal_mcu.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/adc.h
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/adc.c
+
+
+ $PROJ_DIR$/../../../source/Components/radios/cc2530/hal_rf_util.c
+
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_board.h
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_board.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_button.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_digio.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_joystick.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_assert.c
+
+
+ $PROJ_DIR$/../../../source/Components/targets/srf05_soc/hal_led.c
+
+
+
+
+ srf05_cc2530
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.d51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.d51
new file mode 100644
index 0000000..7cc6d40
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.d51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.dep b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.dep
new file mode 100644
index 0000000..58211f1
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.dep
@@ -0,0 +1,515 @@
+
+
+
+ 2
+ 869046798
+
+ srf05_cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+ $PROJ_DIR$\temp\light_switch\hal_digio.r51
+ $PROJ_DIR$\temp\light_switch\clock.pbi
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+ $PROJ_DIR$\temp\light_switch\hal_uart.pbi
+ $PROJ_DIR$\temp\light_switch\basic_rf.r51
+ $PROJ_DIR$\temp\light_switch\hal_rf_security.r51
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+ $PROJ_DIR$\temp\light_switch.map
+ $PROJ_DIR$\temp\light_switch\hal_int.r51
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+ $PROJ_DIR$\temp\light_switch\light_switch.pbd
+ $PROJ_DIR$\temp\light_switch\hal_mcu.r51
+ $PROJ_DIR$\temp\light_switch\hal_rf_security.pbi
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+ $PROJ_DIR$\..\..\..\source\components\common\hal_uart.c
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_uart.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+ $PROJ_DIR$\temp\light_switch\hal_assert.r51
+ $TOOLKIT_DIR$\config\devices\Texas Instruments\lnk51ew_cc2530F256_banked.xcl
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+ $TOOLKIT_DIR$\inc\ioCC2530.h
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+ $PROJ_DIR$\temp\light_switch\adc.r51
+ $PROJ_DIR$\temp\light_switch\hal_int.pbi
+ $PROJ_DIR$\temp\light_switch\hal_digio.pbi
+ $PROJ_DIR$\temp\light_switch\light_switch.r51
+ $PROJ_DIR$\temp\light_switch\clock.r51
+ $PROJ_DIR$\temp\light_switch\hal_rf.r51
+ $PROJ_DIR$\temp\light_switch\util_lcd.pbi
+ $PROJ_DIR$\temp\light_switch\hal_rf.pbi
+ $PROJ_DIR$\temp\light_switch\adc.pbi
+ $PROJ_DIR$\light_switch.d51
+ $TOOLKIT_DIR$\inc\clib\sysmac.h
+ $PROJ_DIR$\temp\light_switch\hal_board.r51
+ $PROJ_DIR$\temp\light_switch\basic_rf_security.pbi
+ $PROJ_DIR$\temp\light_switch\hal_uart.r51
+ $PROJ_DIR$\temp\light_switch\hal_mcu.pbi
+ $PROJ_DIR$\temp\light_switch\basic_rf_security.r51
+ $PROJ_DIR$\temp\light_switch\hal_lcd_srf05.r51
+ $PROJ_DIR$\temp\light_switch\util_lcd.r51
+ $PROJ_DIR$\temp\light_switch\util.pbi
+ $PROJ_DIR$\temp\light_switch\hal_led.pbi
+ $PROJ_DIR$\temp\light_switch\light_switch.pbi
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+ $PROJ_DIR$\temp\light_switch\hal_button.r51
+ $PROJ_DIR$\temp\light_switch\util_buffer.pbi
+ $PROJ_DIR$\temp\light_switch\util.r51
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+ $PROJ_DIR$\temp\light_switch\hal_led.r51
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+ $PROJ_DIR$\temp\light_switch\hal_board.pbi
+ $PROJ_DIR$\temp\light_switch\hal_joystick.r51
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_security.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+ $PROJ_DIR$\temp\light_switch\hal_joystick.pbi
+ $PROJ_DIR$\temp\light_switch\hal_button.pbi
+ $PROJ_DIR$\temp\light_switch\basic_rf.pbi
+ $PROJ_DIR$\temp\light_switch\util_buffer.r51
+ $TOOLKIT_DIR$\inc\clib\string.h
+ $PROJ_DIR$\light_switch_1.hex
+ $PROJ_DIR$\temp\light_switch\hal_assert.pbi
+ $PROJ_DIR$\temp\light_switch\hal_lcd_srf05.pbi
+ $TOOLKIT_DIR$\lib\clib\cl-pli-blxd-1e16x01.r51
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ ICC8051
+ 23
+
+
+ BICOMP
+ 53
+
+
+
+
+ BICOMP
+ 21 0 2 11 35 17
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ ICC8051
+ 44
+
+
+ BICOMP
+ 46
+
+
+
+
+ BICOMP
+ 80 35 28 21 11 0 27 17 76 66
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ ICC8051
+ 43
+
+
+ BICOMP
+ 8
+
+
+
+
+ BICOMP
+ 2 21 11 35 0
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ ICC8051
+ 39
+
+
+ BICOMP
+ 47
+
+
+
+
+ BICOMP
+ 1 21 11 35
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+
+
+ ICC8051
+ 54
+
+
+ BICOMP
+ 51
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ ICC8051
+ 19
+
+
+ BICOMP
+ 40
+
+
+
+
+ BICOMP
+ 21 11 27 80 35 28 0
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ ICC8051
+ 55
+
+
+ BICOMP
+ 89
+
+
+
+
+ BICOMP
+ 21 34 0 80 35 28 11 86 49 66
+
+
+
+
+ $PROJ_DIR$\temp\light_switch\light_switch.pbd
+
+
+ BILINK
+ 47 84 51 8 88 72 83 41 40 82 89 58 53 46 24 14 59 57 62 45
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\components\common\hal_uart.c
+
+
+ ICC8051
+ 52
+
+
+ BICOMP
+ 14
+
+
+
+
+ BICOMP
+ 11 80 35 28 21 0 30
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+
+
+ ICC8051
+ 42
+
+
+ BICOMP
+ 59
+
+
+
+
+ BICOMP
+ 34 21 37 31 17 11 80 35 28 0 27 25 76 70 66 20
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ ICC8051
+ 15 54 19 39 43 23 44 16 55 32 50 61 7 73 68 63 85 56 42 52
+
+
+ BICOMP
+ 84
+
+
+
+
+ ICC8051
+ 27 21 0 76 20 11 66 86 49 9 12 80 35 28 6 1 5 2 3 17 4 74 79 13 34 69 37 78 26 31 30 75 25 67 71 64 81 77 65 60 70 36 29
+
+
+ BICOMP
+ 27 21 0 76 20 11 66 86 49
+
+
+
+
+ [ROOT_NODE]
+
+
+ XLINK
+ 18 87 48
+
+
+
+
+ $PROJ_DIR$\light_switch.d51
+
+
+ XLINK
+ 18 87
+
+
+
+
+ XLINK
+ 33 39 15 54 43 32 50 61 7 19 73 55 68 23 44 16 52 42 63 85 56 90
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ ICC8051
+ 56
+
+
+ BICOMP
+ 45
+
+
+
+
+ BICOMP
+ 80 35 28 21 11 0 34 31 25 17 70 66 76 86 49
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+ ICC8051
+ 68
+
+
+ BICOMP
+ 58
+
+
+
+
+ BICOMP
+ 21 37 80 35 28 11 0
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ ICC8051
+ 7
+
+
+ BICOMP
+ 41
+
+
+
+
+ BICOMP
+ 21 11 80 35 28 0 27 26
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ ICC8051
+ 32
+
+
+ BICOMP
+ 88
+
+
+
+
+ BICOMP
+ 17 11 37 21 0
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ ICC8051
+ 73
+
+
+ BICOMP
+ 82
+
+
+
+
+ BICOMP
+ 31 21 80 35 28 11 0 1 26 27
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+
+
+ ICC8051
+ 16
+
+
+ BICOMP
+ 24
+
+
+
+
+ BICOMP
+ 80 35 28 21 11 0 76 79 66 86 49
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ ICC8051
+ 61
+
+
+ BICOMP
+ 83
+
+
+
+
+ BICOMP
+ 21 80 35 28 11 0 25
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ ICC8051
+ 85
+
+
+ BICOMP
+ 62
+
+
+
+
+ BICOMP
+ 65 21 80 35 28 11 0 27 17
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ ICC8051
+ 50
+
+
+ BICOMP
+ 72
+
+
+
+
+ BICOMP
+ 21 11 26 27 0 80 35 28 34 31 2 30
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ ICC8051
+ 63
+
+
+ BICOMP
+ 57
+
+
+
+
+ BICOMP
+ 66 21 11 76
+
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.ewd
new file mode 100644
index 0000000..32ef946
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.ewd
@@ -0,0 +1,644 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.ewp
new file mode 100644
index 0000000..ca707f6
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.ewp
@@ -0,0 +1,1202 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ srf05_cc2530
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+ $PROJ_DIR$\..\..\..\source\components\common\hal_uart.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_uart.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_security.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.eww b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.eww
new file mode 100644
index 0000000..a1ad24c
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/light_switch.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\light_switch.ewp
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.d51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.d51
new file mode 100644
index 0000000..25335f3
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.d51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.dep b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.dep
new file mode 100644
index 0000000..82116b3
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.dep
@@ -0,0 +1,501 @@
+
+
+
+ 2
+ 4103724155
+
+ srf05_cc2530
+
+ $PROJ_DIR$\temp\per_test\per_test.pbd
+ $PROJ_DIR$\temp\per_test\hal_timer_32k.pbi
+ $PROJ_DIR$\temp\per_test\hal_board.pbi
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.h
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.c
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+ $TOOLKIT_DIR$\inc\clib\string.h
+ $PROJ_DIR$\temp\per_test\hal_digio.r51
+ $PROJ_DIR$\temp\per_test\per_test_menu.r51
+ $TOOLKIT_DIR$\lib\clib\cl-pli-nlxd-1e16x01.r51
+ $PROJ_DIR$\temp\per_test\adc.pbi
+ $PROJ_DIR$\temp\per_test\clock.pbi
+ $PROJ_DIR$\temp\per_test\hal_rf.pbi
+ $PROJ_DIR$\temp\per_test.map
+ $PROJ_DIR$\per_test.hex
+ $PROJ_DIR$\temp\per_test\hal_lcd_srf05.r51
+ $PROJ_DIR$\temp\per_test\adc.r51
+ $PROJ_DIR$\temp\per_test\hal_assert.r51
+ $PROJ_DIR$\temp\per_test\hal_rf.r51
+ $PROJ_DIR$\temp\per_test\hal_mcu.pbi
+ $PROJ_DIR$\temp\per_test\hal_mcu.r51
+ $TOOLKIT_DIR$\config\lnk51ew_cc2530b.xcl
+ $PROJ_DIR$\temp\per_test\hal_int.r51
+ $TOOLKIT_DIR$\inc\clib\sysmac.h
+ $PROJ_DIR$\temp\per_test\util_lcd.pbi
+ $PROJ_DIR$\temp\per_test\per_test.pbi
+ $PROJ_DIR$\temp\per_test\hal_int.pbi
+ $PROJ_DIR$\temp\per_test\hal_assert.pbi
+ $PROJ_DIR$\temp\per_test\per_test_menu.pbi
+ $PROJ_DIR$\temp\per_test\hal_button.pbi
+ $PROJ_DIR$\temp\per_test\per_test.r51
+ $PROJ_DIR$\temp\per_test\hal_led.pbi
+ $PROJ_DIR$\temp\per_test\util.pbi
+ $PROJ_DIR$\temp\per_test\util_buffer.r51
+ $PROJ_DIR$\temp\per_test\basic_rf.pbi
+ $PROJ_DIR$\temp\per_test\hal_button.r51
+ $PROJ_DIR$\temp\per_test\hal_digio.pbi
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+ $PROJ_DIR$\temp\per_test\hal_joystick.r51
+ $PROJ_DIR$\temp\per_test\hal_board.r51
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.h
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.c
+ $PROJ_DIR$\temp\per_test\util.r51
+ $PROJ_DIR$\temp\per_test\hal_lcd_srf05.pbi
+ $PROJ_DIR$\temp\per_test\clock.r51
+ $PROJ_DIR$\temp\per_test\basic_rf.r51
+ $PROJ_DIR$\temp\per_test\hal_timer_32k.r51
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_uart.h
+ $PROJ_DIR$\temp\per_test\hal_led.r51
+ $PROJ_DIR$\temp\per_test\util_lcd.r51
+ $PROJ_DIR$\per_test.d51
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_timer_32k.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+ $PROJ_DIR$\temp\per_test\util_buffer.pbi
+ $TOOLKIT_DIR$\inc\ioCC2530.h
+ $PROJ_DIR$\temp\per_test\hal_joystick.pbi
+ $TOOLKIT_DIR$\config\lnk_base.xcl
+
+
+ $PROJ_DIR$\temp\per_test\per_test.pbd
+
+
+ BILINK
+ 10 34 11 27 2 29 36 26 88 44 31 19 12 1 25 28 32 86 24
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.c
+
+
+ BICOMP
+ 28
+
+
+ ICC8051
+ 8
+
+
+
+
+ BICOMP
+ 3 55 52 75 87 37 63 61 72 56 85 81
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ BICOMP
+ 34
+
+
+ ICC8051
+ 46 22 16 45 20 18 47 15 17 39 35 7 38 49 43 33 50 30 8
+
+
+
+
+ BICOMP
+ 59 55 63 72 40 52 81 6 23
+
+
+ ICC8051
+ 59 55 63 72 40 52 81 6 23 53 75 87 37 65 66 67 68 69 56 70 71 64 54 61 73 62 74 58 60 76 57 77 78 79 80 82 83 84 85 42 41 3 4
+
+
+
+
+ [ROOT_NODE]
+
+
+ XLINK
+ 13 14 51
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.c
+
+
+ BICOMP
+ 25
+
+
+ ICC8051
+ 30
+
+
+
+
+ BICOMP
+ 61 55 62 59 64 60 57 75 87 37 52 63 72 56 85 81 40 41 3
+
+
+
+
+ $PROJ_DIR$\per_test.d51
+
+
+ XLINK
+ 13 14
+
+
+
+
+ XLINK
+ 21 89 16 46 45 17 39 35 7 22 38 15 49 20 18 47 30 8 43 33 50 9
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ BICOMP
+ 26
+
+
+ ICC8051
+ 22
+
+
+
+
+ BICOMP
+ 55 52 59 75 87 37 63
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ BICOMP
+ 44
+
+
+ ICC8051
+ 15
+
+
+
+
+ BICOMP
+ 55 61 63 75 87 37 52 6 23 81
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ BICOMP
+ 10
+
+
+ ICC8051
+ 16
+
+
+
+
+ BICOMP
+ 66 55 52 87
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ BICOMP
+ 11
+
+
+ ICC8051
+ 45
+
+
+
+
+ BICOMP
+ 68 55 52 87 63
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ BICOMP
+ 19
+
+
+ ICC8051
+ 20
+
+
+
+
+ BICOMP
+ 55 63 68 52 87 56
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ BICOMP
+ 12
+
+
+ ICC8051
+ 18
+
+
+
+
+ BICOMP
+ 75 87 37 55 52 63 59 56 72 81
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+
+
+ BICOMP
+ 1
+
+
+ ICC8051
+ 47
+
+
+
+
+ BICOMP
+ 55 52 64 75 87 37 63 59 56
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ BICOMP
+ 27
+
+
+ ICC8051
+ 17
+
+
+
+
+ BICOMP
+ 56 52 62 55 63
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ BICOMP
+ 2
+
+
+ ICC8051
+ 39
+
+
+
+
+ BICOMP
+ 55 52 58 59 63 75 87 37 61 60 68 48
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ BICOMP
+ 29
+
+
+ ICC8051
+ 35
+
+
+
+
+ BICOMP
+ 55 75 87 37 52 63 57
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ BICOMP
+ 36
+
+
+ ICC8051
+ 7
+
+
+
+
+ BICOMP
+ 55 52 75 87 37 63 59 58
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ BICOMP
+ 88
+
+
+ ICC8051
+ 38
+
+
+
+
+ BICOMP
+ 60 55 75 87 37 52 63 66 58 59
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+ BICOMP
+ 31
+
+
+ ICC8051
+ 49
+
+
+
+
+ BICOMP
+ 55 62 75 87 37 52 63
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ BICOMP
+ 32
+
+
+ ICC8051
+ 43
+
+
+
+
+ BICOMP
+ 81 55 52 72
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ BICOMP
+ 86
+
+
+ ICC8051
+ 33
+
+
+
+
+ BICOMP
+ 83 55 75 87 37 52 63 59 56
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ BICOMP
+ 24
+
+
+ ICC8051
+ 50
+
+
+
+
+ BICOMP
+ 75 87 37 55 52 63 61 60 57 56 85 81 72 6 23
+
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.ewd
new file mode 100644
index 0000000..32ef946
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.ewd
@@ -0,0 +1,644 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.ewp
new file mode 100644
index 0000000..eb2e0d7
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.ewp
@@ -0,0 +1,1201 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ srf05_cc2530
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.h
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.h
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_timer_32k.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_uart.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.eww b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.eww
new file mode 100644
index 0000000..f545013
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/per_test.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\per_test.ewp
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.cspy.bat b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.cspy.bat
new file mode 100644
index 0000000..d589572
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.cspy.bat
@@ -0,0 +1,15 @@
+@REM This batch file has been generated by the IAR Embedded Workbench
+@REM C-SPY Debugger, as an aid to preparing a command line for running
+@REM the cspybat command line utility using the appropriate settings.
+@REM
+@REM You can launch cspybat by typing the name of this batch file followed
+@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
+@REM Note that this file is generated every time a new debug session
+@REM is initialized, so you may want to move or rename the file before
+@REM making changes.
+@REM
+
+
+"D:\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051proc.dll" "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051emu_cc.dll" %1 --plugin "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051bat.dll" --backend -B "--proc_core" "plain" "--proc_code_model" "banked" "--proc_nr_virtual_regs" "8" "--proc_pdata_bank_reg_addr" "0xA0" "--proc_dptr_nr_of" "1" "--proc_codebank_reg" "0x9F" "--proc_codebank_start" "0x8000" "--proc_codebank_end" "0xFFFF" "--proc_codebank_mask" "0x07" "--proc_data_model" "large" "-p" "D:\IAR Systems\Embedded Workbench 6.0\8051\config\devices\_generic\io8052.ddf" "--proc_exclude_exit_breakpoint" "--proc_driver" "chipcon" "--retain_memory" "--verify_download" "use_crc16" "--stack_overflow" "--number_of_banks" "4"
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.dbgdt b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.dbgdt
new file mode 100644
index 0000000..1882f27
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.dbgdt
@@ -0,0 +1,85 @@
+
+
+
+
+
+ 201381
+
+ 20
+ 1035
+ 276
+ 69
+
+
+
+
+
+
+
+ 129272727
+
+
+
+
+ 101
+
+
+
+
+
+
+
+
+ TabID-11918-23766
+ Debug Log
+ Debug-Log
+
+
+
+ TabID-11395-23775
+ Build
+ Build
+
+
+
+
+ 0
+
+
+ TabID-22666-23769
+ Workspace
+ Workspace
+
+
+ light_switchlight_switch/applicationlight_switch/application/light_switch.c
+
+
+
+ 0
+
+
+ TabID-646-23772
+ Disassembly
+ Disassembly
+
+
+
+
+ 0
+
+
+
+
+
+ TextEditor$WS_DIR$\..\..\..\source\apps\light_switch\uart_rf_test.c066104104TextEditor$WS_DIR$\..\..\..\source\Components\basicrf\basic_rf.c0369485485TextEditor$WS_DIR$\..\..\..\source\components\common\hal_uart.c025380808080TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c03675675TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h06017761776TextEditor$WS_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h018416416TextEditor$WS_DIR$\..\..\..\source\Components\common\hal_int.c04991991TextEditor$WS_DIR$\..\..\..\source\Components\utils\util.c00366366TextEditor$WS_DIR$\..\..\..\source\Components\common\hal_defs.h012936683668TextEditor$WS_DIR$\..\..\..\source\Components\utils\util.h0600TextEditor$WS_DIR$\..\..\..\source\Components\targets\interface\hal_int.h04514071407TextEditor$WS_DIR$\..\..\..\source\Components\common\hal_types.h08118281828TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c05031266112661TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c08783028302TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c00354354TextEditor$WS_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c0144469469TextEditor$WS_DIR$\..\..\..\source\apps\light_switch\light_switch.c019256025602160100000010000001
+
+
+
+
+
+
+ iaridepm.enu1debuggergui.enu1-2-2436220-2-2172162139159243609179612658647-2-2436170-2-2172162139159243609139159658647-2-21601238-2-212401621003236243609139159243609
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.dni b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.dni
new file mode 100644
index 0000000..07ea4a6
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.dni
@@ -0,0 +1,36 @@
+[CodeCoverage]
+Enabled=_ 0
+[DisAssemblyWindow]
+NumStates=_ 1
+State 1=_ 1
+[Profiling]
+Enabled=0
+[StackPlugin]
+Enabled=1
+OverflowWarningsEnabled=1
+WarningThreshold=90
+SpWarningsEnabled=1
+WarnHow=0
+UseTrigger=1
+TriggerName=main
+LimitSize=0
+ByteLimit=50
+[DebugChecksum]
+Checksum=2020345584
+[InstructionProfiling]
+Enabled=_ 0
+[Log file]
+LoggingEnabled=_ 0
+LogFile=_ ""
+Category=_ 0
+[TermIOLog]
+LoggingEnabled=_ 0
+LogFile=_ ""
+[Breakpoints]
+Count=0
+[ChipconEmu]
+Stop timers on halt=0
+Leave target running=1
+[Aliases]
+Count=0
+SuppressDialog=0
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.wsdt b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.wsdt
new file mode 100644
index 0000000..5689c97
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/light_switch.wsdt
@@ -0,0 +1,66 @@
+
+
+
+
+
+ light_switch/srf05_cc2530
+
+
+
+
+
+
+
+
+ 205272727
+
+
+
+
+
+
+ 20103527669
+
+
+
+
+
+
+
+ TabID-4781-16958
+ Workspace
+ Workspace
+
+
+ light_switchlight_switch/applicationlight_switch/basic rflight_switch/hallight_switch/hal/commonlight_switch/hal/interfacelight_switch/hal/rflight_switch/hal/srf05_soclight_switch/utilities
+
+
+
+ 0
+
+
+ TabID-16659-19192
+ Build
+ Build
+
+
+
+
+ 0
+
+
+
+
+
+ TextEditor$WS_DIR$\..\..\..\source\apps\light_switch\light_switch.c0126347334820TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c07318731886TextEditor$WS_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h012544104420TextEditor$WS_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h044167116710100000010000001
+
+
+
+
+
+
+ iaridepm.enu1-2-2543296-2-2214187139323241915194010705045-2-21851538-2-215401871002604241915139323241915
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.cspy.bat b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.cspy.bat
new file mode 100644
index 0000000..3778179
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.cspy.bat
@@ -0,0 +1,15 @@
+@REM This batch file has been generated by the IAR Embedded Workbench
+@REM C-SPY Debugger, as an aid to preparing a command line for running
+@REM the cspybat command line utility using the appropriate settings.
+@REM
+@REM You can launch cspybat by typing the name of this batch file followed
+@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
+@REM Note that this file is generated every time a new debug session
+@REM is initialized, so you may want to move or rename the file before
+@REM making changes.
+@REM
+
+
+"C:\Program Files\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\bin\8051proc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\bin\8051emu_cc.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\bin\8051bat.dll" --backend -B "--proc_core" "plain" "--proc_code_model" "near" "--proc_nr_virtual_regs" "8" "--proc_pdata_bank_reg_addr" "0xA0" "--proc_dptr_nr_of" "1" "--proc_data_model" "large" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\config\devices\_generic\io8052.ddf" "--proc_exclude_exit_breakpoint" "--proc_driver" "chipcon" "--retain_memory" "--verify_download" "use_crc16" "--stack_overflow" "--number_of_banks" "4"
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.dbgdt b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.dbgdt
new file mode 100644
index 0000000..1ec6be5
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.dbgdt
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+ 20
+ 1035
+ 276
+ 69
+
+
+
+ 124
+ 27
+ 27
+ 27
+
+
+
+ 1
+ 0
+
+
+
+
+
+
+ TabID-4646-25521
+ Debug Log
+ Debug-Log
+
+
+
+ TabID-4123-25531
+ Build
+ Build
+
+
+
+ 0
+
+
+
+
+ TabID-15394-25525
+ Workspace
+ Workspace
+
+
+ <ws>
+
+
+
+
+ 0
+
+
+
+
+ TabID-26143-25528
+ Disassembly
+ Disassembly
+
+
+
+ 0
+
+
+
+
+
+ TextEditor
+ C:\Texas Instruments\CC2530 BasicRF\source\Components\targets\common\hal_lcd_srf05.c
+ 0
+ 608
+ 26563
+ 26563
+
+
+ TextEditor
+ C:\Texas Instruments\CC2530 BasicRF\source\apps\spectrum_analyzer\spectrum_analyzer.c
+ 0
+ 204
+ 5700
+ 5700
+
+
+ TextEditor
+ C:\Texas Instruments\CC2530 BasicRF\source\apps\light_switch\light_switch.c
+ 0
+ 190
+ 5519
+ 5519
+
+
+ TextEditor
+ C:\Texas Instruments\CC2530 BasicRF\source\apps\per_test\per_test.c
+ 0
+ 326
+ 10690
+ 10690
+
+ 3
+
+ 0
+
+
+ 1000000
+ 1000000
+
+
+ 1
+
+
+
+
+
+
+ iaridepm.enu1
+
+
+
+
+
+
+ debuggergui.enu1
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 557
+ 198
+ -2
+ -2
+ 200
+ 200
+ 138889
+ 242718
+ 138889
+ 678398
+
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 557
+ 198
+ -2
+ -2
+ 200
+ 200
+ 138889
+ 242718
+ 138889
+ 678398
+
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 198
+ 1442
+ -2
+ -2
+ 1444
+ 200
+ 1002778
+ 242718
+ 138889
+ 242718
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.dni b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.dni
new file mode 100644
index 0000000..6fdc30d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/per_test.dni
@@ -0,0 +1,32 @@
+[CodeCoverage]
+Enabled=_ 0
+[DisAssemblyWindow]
+NumStates=_ 1
+State 1=_ 1
+[Profiling]
+Enabled=0
+[StackPlugin]
+Enabled=1
+OverflowWarningsEnabled=1
+WarningThreshold=90
+SpWarningsEnabled=1
+WarnHow=0
+UseTrigger=1
+TriggerName=main
+LimitSize=0
+ByteLimit=50
+[Log file]
+LoggingEnabled=_ 0
+LogFile=_ ""
+Category=_ 0
+[TermIOLog]
+LoggingEnabled=_ 0
+LogFile=_ ""
+[Breakpoints]
+Count=0
+[ChipconEmu]
+Stop timers on halt=0
+Leave target running=1
+[Aliases]
+Count=0
+SuppressDialog=0
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.cspy.bat b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.cspy.bat
new file mode 100644
index 0000000..6dcc11c
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.cspy.bat
@@ -0,0 +1,32 @@
+@REM This bat file has been generated by the IAR Embeddded Workbench
+@REM C-SPY interactive debugger,as an aid to preparing a command
+@REM line for running the cspybat command line utility with the
+@REM appropriate settings.
+@REM
+@REM After making some adjustments to this file, you can launch cspybat
+@REM by typing the name of this file followed by the name of the debug
+@REM file (usually an ubrof file). Note that this file is generated
+@REM every time a new debug session is initialized, so you may want to
+@REM move or rename the file before making changes.
+@REM
+@REM Note: some command line arguments cannot be properly generated
+@REM by this process. Specifically, the plugin which is responsible
+@REM for the Terminal I/O window (and other C runtime functionality)
+@REM comes in a special version for cspybat, and the name of that
+@REM plugin dll is not known when generating this file. It resides in
+@REM the $TOOLKIT_DIR$\bin folder and is usually called XXXbat.dll or
+@REM XXXlibsupportbat.dll, where XXX is the name of the corresponding
+@REM tool chain. Replace the '' parameter
+@REM below with the appropriate file name. Other plugins loaded by
+@REM C-SPY are usually not needed by, or will not work in, cspybat
+@REM but they are listed at the end of this file for reference.
+
+
+"C:\Program Files\IAR Systems\Embedded Workbench 5.3\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 5.3\8051\bin\8051proc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 5.3\8051\bin\8051emu_cc.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 5.3\8051\bin\" --backend -B "--proc_core" "plain" "--proc_code_model" "near" "--proc_nr_virtual_regs" "8" "--proc_dptr_nr_of" "1" "--derivative_file" "C:\Program Files\IAR Systems\Embedded Workbench 5.3\8051\config\devices\Texas Instruments\CC2530.i51" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 5.3\8051\config\devices\Texas Instruments\CC2530.ddf" "--proc_data_model" "large" "--proc_driver" "chipcon" "--retain_memory" "--verify_download" "use_crc16" "--stack_overflow" "--no_banks=4"
+
+
+@REM Loaded plugins:
+@REM 8051libsupport.dll
+@REM C:\Program Files\IAR Systems\Embedded Workbench 5.3\common\plugins\CodeCoverage\CodeCoverage.dll
+@REM C:\Program Files\IAR Systems\Embedded Workbench 5.3\common\plugins\Profiling\Profiling.dll
+@REM C:\Program Files\IAR Systems\Embedded Workbench 5.3\common\plugins\stack\stack.dll
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.dbgdt b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.dbgdt
new file mode 100644
index 0000000..d2dac6a
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.dbgdt
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+ 20103527669
+
+
+
+
+
+
+ 273272727
+
+
+
+
+ 10
+
+
+
+
+
+
+
+
+ TabID-19597-22171
+ Debug Log
+ Debug-Log
+
+
+
+ TabID-19074-22181
+ Build
+ Build
+
+
+
+
+ 0
+
+
+ TabID-30345-22174
+ Workspace
+ Workspace
+
+
+ <ws><ws>/spectrum_analyzer<ws>/spectrum_analyzer/application<ws>/spectrum_analyzer/application/spectrum_analyzer.c
+
+
+
+ 0
+
+
+ TabID-8326-22177
+ Disassembly
+ Disassembly
+
+
+
+
+ 0
+
+
+
+
+
+ TextEditorC:\Texas Instruments\CC2530 BasicRF\source\Components\targets\common\hal_lcd_srf05.c06082656326563TextEditorC:\Texas Instruments\CC2530 BasicRF\source\apps\spectrum_analyzer\spectrum_analyzer.c0141364536451TextEditorC:\Texas Instruments\CC2530 BasicRF\source\apps\light_switch\light_switch.c019055195519TextEditorC:\Texas Instruments\CC2530 BasicRF\source\apps\per_test\per_test.c032610863108630100000010000001
+
+
+
+
+
+
+ iaridepm.enu1debuggergui.enu1-2-2557364-2-2200200138889242718254167678398-2-2557198-2-2200200138889242718138889678398-2-21981442-2-214442001002778242718138889242718
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.dni b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.dni
new file mode 100644
index 0000000..e10205d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/settings/spectrum_analyzer.dni
@@ -0,0 +1,29 @@
+[CodeCoverage]
+Enabled=_ 0
+[DisAssemblyWindow]
+NumStates=_ 1
+State 1=_ 1
+[Profiling]
+Enabled=0
+[StackPlugin]
+Enabled=1
+OverflowWarningsEnabled=1
+WarningThreshold=90
+SpWarningsEnabled=1
+WarnHow=0
+UseTrigger=1
+TriggerName=main
+LimitSize=0
+ByteLimit=50
+[Log file]
+LoggingEnabled=_ 0
+LogFile=_ ""
+Category=_ 0
+[TermIOLog]
+LoggingEnabled=_ 0
+LogFile=_ ""
+[Breakpoints]
+Count=0
+[ChipconEmu]
+Stop timers on halt=0
+Leave target running=1
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.d51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.d51
new file mode 100644
index 0000000..37b501c
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.d51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.dep b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.dep
new file mode 100644
index 0000000..18996ab
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.dep
@@ -0,0 +1,430 @@
+
+
+
+ 2
+ 3058640055
+
+ srf05_cc2530
+
+ $PROJ_DIR$\temp\spectrum_analyzer.map
+ $TOOLKIT_DIR$\inc\ioCC2530.h
+ $PROJ_DIR$\temp\spectrum_analyzer\clock.r51
+ $PROJ_DIR$\..\..\..\source\apps\spectrum_analyzer\spectrum_analyzer.c
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_mcu.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_int.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_led.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_digio.r51
+ $PROJ_DIR$\spectrum_analyzer.d51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_assert.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_button.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_lcd_srf05.r51
+ $TOOLKIT_DIR$\inc\clib\string.h
+ $PROJ_DIR$\temp\spectrum_analyzer\adc.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_board.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_joystick.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_joystick.pbi
+ $TOOLKIT_DIR$\config\lnk51ew_cc2530b.xcl
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_button.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_led.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\spectrum_analyzer.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\util.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_rf.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\util_lcd.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_lcd_srf05.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_rf.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\util.r51
+ $TOOLKIT_DIR$\inc\clib\sysmac.h
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_rf_util.pbi
+ $TOOLKIT_DIR$\lib\clib\cl-pli-nlxd-1e16x01.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_board.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\clock.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\spectrum_analyzer.pbd
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_mcu.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_int.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\spectrum_analyzer.pbi
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_rf_util.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\adc.pbi
+ $PROJ_DIR$\spectrum_analyzer.hex
+ $PROJ_DIR$\temp\spectrum_analyzer\util_lcd.pbi
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_util.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_util.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+ $TOOLKIT_DIR$\config\lnk_base.xcl
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_assert.r51
+ $PROJ_DIR$\temp\spectrum_analyzer\hal_digio.pbi
+
+
+ [ROOT_NODE]
+
+
+ XLINK
+ 0 40 10
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\apps\spectrum_analyzer\spectrum_analyzer.c
+
+
+ BICOMP
+ 37
+
+
+ ICC8051
+ 22
+
+
+
+
+ BICOMP
+ 50 44 51 49 64 1 4 5 52 48 45 60 70 61 72
+
+
+
+
+ $PROJ_DIR$\spectrum_analyzer.d51
+
+
+ XLINK
+ 0 40
+
+
+
+
+ XLINK
+ 19 73 15 2 74 16 12 9 7 17 13 21 35 27 38 22 28 25 31
+
+
+
+
+ $PROJ_DIR$\temp\spectrum_analyzer\spectrum_analyzer.pbd
+
+
+ BILINK
+ 39 33 11 32 20 75 36 18 26 8 6 24 30 37 23 41
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ BICOMP
+ 36
+
+
+ ICC8051
+ 7 15 2 35 27 38 13 74 16 12 9 17 21 28 25 22
+
+
+
+
+ BICOMP
+ 44 5 48 64 1 4 52
+
+
+ ICC8051
+ 44 5 48 64 1 4 52 53 54 55 56 57 45 58 60 70 59 61 43 50 14 29 62 51 63 47 49 65 46 66 67 68 69 71 72 3
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ BICOMP
+ 26
+
+
+ ICC8051
+ 13
+
+
+
+
+ BICOMP
+ 44 50 52 64 1 4 5 14 29 70
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ BICOMP
+ 39
+
+
+ ICC8051
+ 15
+
+
+
+
+ BICOMP
+ 54 44 5 1
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ BICOMP
+ 33
+
+
+ ICC8051
+ 2
+
+
+
+
+ BICOMP
+ 56 44 5 1 52
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ BICOMP
+ 6
+
+
+ ICC8051
+ 35
+
+
+
+
+ BICOMP
+ 44 52 56 5 1 45
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ BICOMP
+ 24
+
+
+ ICC8051
+ 27
+
+
+
+
+ BICOMP
+ 64 1 4 44 5 52 48 45 60 70
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_util.c
+
+
+ BICOMP
+ 30
+
+
+ ICC8051
+ 38
+
+
+
+
+ BICOMP
+ 64 1 4 44 5 52 45 61 60
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ BICOMP
+ 11
+
+
+ ICC8051
+ 74
+
+
+
+
+ BICOMP
+ 45 5 51 44 52
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ BICOMP
+ 32
+
+
+ ICC8051
+ 16
+
+
+
+
+ BICOMP
+ 44 5 47 48 52 64 1 4 50 49 56
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ BICOMP
+ 20
+
+
+ ICC8051
+ 12
+
+
+
+
+ BICOMP
+ 44 64 1 4 5 52 46
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ BICOMP
+ 75
+
+
+ ICC8051
+ 9
+
+
+
+
+ BICOMP
+ 44 5 64 1 4 52 48 47
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ BICOMP
+ 18
+
+
+ ICC8051
+ 17
+
+
+
+
+ BICOMP
+ 49 44 64 1 4 5 52 54 47 48
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+ BICOMP
+ 8
+
+
+ ICC8051
+ 21
+
+
+
+
+ BICOMP
+ 44 51 64 1 4 5 52
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ BICOMP
+ 23
+
+
+ ICC8051
+ 28
+
+
+
+
+ BICOMP
+ 70 44 5 60
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ BICOMP
+ 41
+
+
+ ICC8051
+ 25
+
+
+
+
+ BICOMP
+ 64 1 4 44 5 52 50 49 46 45 72 70 60 14 29
+
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.ewd b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.ewd
new file mode 100644
index 0000000..32ef946
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.ewd
@@ -0,0 +1,644 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.ewp b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.ewp
new file mode 100644
index 0000000..6e26b7d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.ewp
@@ -0,0 +1,1177 @@
+
+
+
+ 2
+
+ srf05_cc2530
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ srf05_cc2530
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\spectrum_analyzer\spectrum_analyzer.c
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_util.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_util.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_menu.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.eww b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.eww
new file mode 100644
index 0000000..ed87e8e
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/spectrum_analyzer.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\spectrum_analyzer.ewp
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/adc.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/adc.pbi
new file mode 100644
index 0000000..1b81e3d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/adc.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\adc.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\adc.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/adc.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/adc.r51
new file mode 100644
index 0000000..9776259
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/adc.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf.pbi
new file mode 100644
index 0000000..7e4b9c6
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 57s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\basicrf\basic_rf.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\basicrf\basic_rf.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf.r51
new file mode 100644
index 0000000..1cfeede
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf_security.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf_security.pbi
new file mode 100644
index 0000000..4550e22
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf_security.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 57s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\basicrf\basic_rf_security.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\basicrf\basic_rf_security.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf_security.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf_security.r51
new file mode 100644
index 0000000..7015cc4
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/basic_rf_security.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/clock.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/clock.pbi
new file mode 100644
index 0000000..e59c65c
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/clock.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\clock.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\clock.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/clock.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/clock.r51
new file mode 100644
index 0000000..a04d3ad
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/clock.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_assert.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_assert.pbi
new file mode 100644
index 0000000..e31e930
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_assert.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_assert.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_assert.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_assert.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_assert.r51
new file mode 100644
index 0000000..9e41c57
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_assert.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_board.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_board.pbi
new file mode 100644
index 0000000..c7fadc9
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_board.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_board.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_board.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_board.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_board.r51
new file mode 100644
index 0000000..cb1da32
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_board.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_button.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_button.pbi
new file mode 100644
index 0000000..aa0b167
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_button.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_button.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_button.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_button.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_button.r51
new file mode 100644
index 0000000..3e59d0a
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_button.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_digio.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_digio.pbi
new file mode 100644
index 0000000..238714d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_digio.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_digio.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_digio.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_digio.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_digio.r51
new file mode 100644
index 0000000..da282d9
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_digio.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_int.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_int.pbi
new file mode 100644
index 0000000..eef03e4
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_int.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 57s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\common\hal_int.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\common\hal_int.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_int.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_int.r51
new file mode 100644
index 0000000..7a78c44
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_int.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_joystick.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_joystick.pbi
new file mode 100644
index 0000000..72f270b
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_joystick.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_joystick.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_joystick.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_joystick.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_joystick.r51
new file mode 100644
index 0000000..1ed8177
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_joystick.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_lcd_srf05.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_lcd_srf05.pbi
new file mode 100644
index 0000000..8c940ca
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_lcd_srf05.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 57s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\common\hal_lcd_srf05.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\common\hal_lcd_srf05.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_lcd_srf05.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_lcd_srf05.r51
new file mode 100644
index 0000000..c09ce02
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_lcd_srf05.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_led.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_led.pbi
new file mode 100644
index 0000000..1367b0f
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_led.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_led.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\targets\srf05_soc\hal_led.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_led.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_led.r51
new file mode 100644
index 0000000..f424c45
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_led.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_mcu.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_mcu.pbi
new file mode 100644
index 0000000..ba8de27
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_mcu.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\hal_mcu.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\hal_mcu.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_mcu.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_mcu.r51
new file mode 100644
index 0000000..0147d72
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_mcu.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf.pbi
new file mode 100644
index 0000000..5130844
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\hal_rf.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\hal_rf.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf.r51
new file mode 100644
index 0000000..88ed7f4
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf_security.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf_security.pbi
new file mode 100644
index 0000000..10f5bcb
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf_security.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\hal_rf_security.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\radios\cc2530\hal_rf_security.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf_security.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf_security.r51
new file mode 100644
index 0000000..0971752
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_rf_security.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart.pbi
new file mode 100644
index 0000000..648429c
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\components\common\hal_uart.c
+E:\CC2530Projects\CC2530 BasicRF\source\components\common\hal_uart.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart.r51
new file mode 100644
index 0000000..85c42f6
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart1.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart1.r51
new file mode 100644
index 0000000..f045f94
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/hal_uart1.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.pbd b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.pbd
new file mode 100644
index 0000000..bf4c4de
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.pbd
@@ -0,0 +1,22 @@
+This is an internal working file generated by the Source Browser.
+10:42 34s
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\adc.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\basic_rf.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\basic_rf_security.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\clock.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_assert.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_board.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_button.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_digio.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_int.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_joystick.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_lcd_srf05.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_led.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_mcu.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_rf.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_rf_security.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\hal_uart.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\light_switch.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\util.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\util_buffer.pbi
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\util_lcd.pbi
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.pbi
new file mode 100644
index 0000000..a653455
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:42 34s
+E:\CC2530Projects\CC2530 BasicRF\source\apps\light_switch\light_switch.c
+E:\CC2530Projects\CC2530 BasicRF\source\apps\light_switch\light_switch.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.r51
new file mode 100644
index 0000000..d0eb48d
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/light_switch.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/uart_rf_test.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/uart_rf_test.r51
new file mode 100644
index 0000000..8a884aa
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/uart_rf_test.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util.pbi
new file mode 100644
index 0000000..2f86abf
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\utils\util.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\utils\util.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util.r51
new file mode 100644
index 0000000..5611222
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_buffer.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_buffer.pbi
new file mode 100644
index 0000000..7f9b497
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_buffer.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\utils\util_buffer.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\utils\util_buffer.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_buffer.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_buffer.r51
new file mode 100644
index 0000000..44ed604
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_buffer.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_lcd.pbi b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_lcd.pbi
new file mode 100644
index 0000000..9b8c774
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_lcd.pbi
@@ -0,0 +1,40 @@
+This is an internal working file generated by the Source Browser.
+10:14 58s
+E:\CC2530Projects\CC2530 BasicRF\source\Components\utils\util_lcd.c
+E:\CC2530Projects\CC2530 BasicRF\source\Components\utils\util_lcd.c
+-D
+chip=2530
+-D
+xSECURITY_CCM
+--diag_suppress
+Pe001,Pa084
+-o
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\light_switch\
+-e
+--no_code_motion
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/utils\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/basicrf\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/interface\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/assembly\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/common/cc8051\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/targets/srf05_soc\
+-I
+E:\CC2530Projects\CC2530 BasicRF\ide\srf05_cc2530\iar/../../../source/Components/radios/cc2530\
+-Ohz
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_lcd.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_lcd.r51
new file mode 100644
index 0000000..bc44ca9
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/light_switch/util_lcd.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/adc.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/adc.r51
new file mode 100644
index 0000000..c454a45
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/adc.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/basic_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/basic_rf.r51
new file mode 100644
index 0000000..a4c70fa
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/basic_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/clock.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/clock.r51
new file mode 100644
index 0000000..7fd9508
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/clock.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_assert.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_assert.r51
new file mode 100644
index 0000000..740baea
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_assert.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_board.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_board.r51
new file mode 100644
index 0000000..ff2674e
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_board.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_button.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_button.r51
new file mode 100644
index 0000000..07e7435
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_button.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_digio.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_digio.r51
new file mode 100644
index 0000000..0e6d634
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_digio.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_int.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_int.r51
new file mode 100644
index 0000000..7f50da8
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_int.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_joystick.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_joystick.r51
new file mode 100644
index 0000000..55ee419
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_joystick.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_lcd_srf05.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_lcd_srf05.r51
new file mode 100644
index 0000000..84efc0f
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_lcd_srf05.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_led.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_led.r51
new file mode 100644
index 0000000..ddfd1da
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_led.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_mcu.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_mcu.r51
new file mode 100644
index 0000000..663f076
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_mcu.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_rf.r51
new file mode 100644
index 0000000..189bc59
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_timer_32k.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_timer_32k.r51
new file mode 100644
index 0000000..22edaae
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/hal_timer_32k.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test.pbd b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test.pbd
new file mode 100644
index 0000000..c14745d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test.pbd
@@ -0,0 +1,21 @@
+This is an internal working file generated by the Source Browser.
+17:29 41s
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\adc.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\basic_rf.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\clock.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_assert.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_board.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_button.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_digio.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_int.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_joystick.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_lcd_srf05.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_led.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_mcu.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_rf.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\hal_timer_32k.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\per_test.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\per_test_menu.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\util.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\util_buffer.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\per_test\util_lcd.pbi
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test.r51
new file mode 100644
index 0000000..28be4ca
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test_menu.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test_menu.r51
new file mode 100644
index 0000000..ed88979
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/per_test_menu.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util.r51
new file mode 100644
index 0000000..c267aa0
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util_buffer.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util_buffer.r51
new file mode 100644
index 0000000..0c2a17d
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util_buffer.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util_lcd.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util_lcd.r51
new file mode 100644
index 0000000..3f62a92
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/per_test/util_lcd.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/adc.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/adc.r51
new file mode 100644
index 0000000..f269b47
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/adc.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/clock.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/clock.r51
new file mode 100644
index 0000000..080080e
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/clock.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_assert.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_assert.r51
new file mode 100644
index 0000000..2fd69fb
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_assert.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_board.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_board.r51
new file mode 100644
index 0000000..165a0e8
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_board.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_button.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_button.r51
new file mode 100644
index 0000000..67f5bb2
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_button.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_digio.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_digio.r51
new file mode 100644
index 0000000..726c4de
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_digio.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_int.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_int.r51
new file mode 100644
index 0000000..ebb04c8
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_int.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_joystick.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_joystick.r51
new file mode 100644
index 0000000..a7d07a8
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_joystick.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_lcd_srf05.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_lcd_srf05.r51
new file mode 100644
index 0000000..f1b6767
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_lcd_srf05.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_led.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_led.r51
new file mode 100644
index 0000000..0eeab82
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_led.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_mcu.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_mcu.r51
new file mode 100644
index 0000000..add921b
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_mcu.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_rf.r51
new file mode 100644
index 0000000..eac6fd8
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_rf_util.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_rf_util.r51
new file mode 100644
index 0000000..f5fea87
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/hal_rf_util.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/spectrum_analyzer.pbd b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/spectrum_analyzer.pbd
new file mode 100644
index 0000000..e3e6557
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/spectrum_analyzer.pbd
@@ -0,0 +1,18 @@
+This is an internal working file generated by the Source Browser.
+12:24 18s
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\adc.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\clock.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_assert.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_board.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_button.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_digio.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_int.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_joystick.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_lcd_srf05.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_led.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_mcu.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_rf.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\hal_rf_util.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\spectrum_analyzer.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\util.pbi
+C:\Texas Instruments\CC2530 BasicRF\ide\srf05_cc2530\iar\temp\spectrum_analyzer\util_lcd.pbi
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/spectrum_analyzer.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/spectrum_analyzer.r51
new file mode 100644
index 0000000..0069b23
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/spectrum_analyzer.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/util.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/util.r51
new file mode 100644
index 0000000..21cff7f
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/util.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/util_lcd.r51 b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/util_lcd.r51
new file mode 100644
index 0000000..9401368
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530/iar/temp/spectrum_analyzer/util_lcd.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup (2) of per_test.ewd b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup (2) of per_test.ewd
new file mode 100644
index 0000000..e1f18ad
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup (2) of per_test.ewd
@@ -0,0 +1,508 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup (2) of per_test.ewp b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup (2) of per_test.ewp
new file mode 100644
index 0000000..42cf80a
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup (2) of per_test.ewp
@@ -0,0 +1,1155 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test.h
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test_menu.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test_menu.h
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_timer_32k.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_uart.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of light_switch.ewd b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of light_switch.ewd
new file mode 100644
index 0000000..e1f18ad
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of light_switch.ewd
@@ -0,0 +1,508 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of light_switch.ewp b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of light_switch.ewp
new file mode 100644
index 0000000..5a72e93
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of light_switch.ewp
@@ -0,0 +1,1150 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_security.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of per_test.ewd b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of per_test.ewd
new file mode 100644
index 0000000..e1f18ad
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of per_test.ewd
@@ -0,0 +1,508 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ C-SPY
+ 1
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of per_test.ewp b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of per_test.ewp
new file mode 100644
index 0000000..42cf80a
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/Backup of per_test.ewp
@@ -0,0 +1,1155 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 3
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 4
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 16
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test.h
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test_menu.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\PER_test\per_test_menu.h
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_timer_32k.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_uart.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.dep b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.dep
new file mode 100644
index 0000000..be2bba6
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.dep
@@ -0,0 +1,545 @@
+
+
+
+ 2
+ 3593570240
+
+ srf05_cc2530_91
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+ $PROJ_DIR$\temp\light_switch\hal_button.r51
+ $PROJ_DIR$\temp\light_switch\hal_joystick.r51
+ $PROJ_DIR$\temp\light_switch\util.r51
+ $PROJ_DIR$\temp\light_switch\hal_led.r51
+ $PROJ_DIR$\temp\light_switch\hal_board.r51
+ $PROJ_DIR$\temp\light_switch\hal_digio.r51
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_security.h
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+ $PROJ_DIR$\temp\light_switch\hal_mcu.r51
+ $PROJ_DIR$\temp\light_switch\clock.r51
+ $PROJ_DIR$\temp\light_switch\basic_rf_security.r51
+ $PROJ_DIR$\temp\light_switch\hal_int.r51
+ $PROJ_DIR$\temp\light_switch\hal_lcd_srf05.r51
+ $PROJ_DIR$\temp\light_switch\basic_rf.r51
+ $PROJ_DIR$\temp\light_switch\light_switch.r51
+ $PROJ_DIR$\temp\light_switch\adc.r51
+ $TOOLKIT_DIR$\inc\ioCC2530.h
+ $TOOLKIT_DIR$\inc\clib\sysmac.h
+ $TOOLKIT_DIR$\inc\clib\string.h
+ $PROJ_DIR$\temp\light_switch\hal_rf.r51
+ $PROJ_DIR$\temp\light_switch\util_lcd.r51
+ $PROJ_DIR$\temp\light_switch\util_buffer.r51
+ $PROJ_DIR$\temp\light_switch\light_switch.pbi
+ $PROJ_DIR$\temp\light_switch\basic_rf.pbi
+ $PROJ_DIR$\temp\light_switch\basic_rf_security.pbi
+ $PROJ_DIR$\temp\light_switch\hal_int.pbi
+ $PROJ_DIR$\temp\light_switch\hal_lcd_srf05.pbi
+ $PROJ_DIR$\temp\light_switch\adc.pbi
+ $PROJ_DIR$\temp\light_switch\clock.pbi
+ $PROJ_DIR$\temp\light_switch\hal_mcu.pbi
+ $PROJ_DIR$\temp\light_switch\hal_rf.pbi
+ $PROJ_DIR$\temp\light_switch\hal_rf_security.pbi
+ $PROJ_DIR$\temp\light_switch\hal_assert.pbi
+ $PROJ_DIR$\temp\light_switch\hal_board.pbi
+ $PROJ_DIR$\temp\light_switch\hal_button.pbi
+ $PROJ_DIR$\temp\light_switch\hal_digio.pbi
+ $PROJ_DIR$\temp\light_switch\hal_joystick.pbi
+ $PROJ_DIR$\temp\light_switch\hal_led.pbi
+ $PROJ_DIR$\temp\light_switch\util.pbi
+ $PROJ_DIR$\temp\light_switch\util_buffer.pbi
+ $PROJ_DIR$\temp\light_switch\util_lcd.pbi
+ $PROJ_DIR$\light_switch.d51
+ $PROJ_DIR$\temp\light_switch\light_switch.pbd
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_uart.h
+ $PROJ_DIR$\temp\light_switch\hal_assert.r51
+ $PROJ_DIR$\temp\light_switch\hal_rf_security.r51
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ BICOMP
+ 69
+
+
+ ICC8051
+ 81
+
+
+
+
+ BICOMP
+ 24 20 30 23 31
+
+
+ ICC8051
+ 24 20 30 23 31
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ BICOMP
+ 70
+
+
+ ICC8051
+ 15
+
+
+
+
+ BICOMP
+ 23 20 26 27 31 0 53 19 29 28 35 80
+
+
+ ICC8051
+ 23 20 26 27 31 0 53 19 29 28 35 80
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ BICOMP
+ 72
+
+
+ ICC8051
+ 16
+
+
+
+
+ BICOMP
+ 23 20 0 53 19 31 27 26
+
+
+ ICC8051
+ 23 20 0 53 19 31 27 26
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ BICOMP
+ 73
+
+
+ ICC8051
+ 12
+
+
+
+
+ BICOMP
+ 28 23 0 53 19 20 31 33 26 27
+
+
+ ICC8051
+ 28 23 0 53 19 20 31 33 26 27
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+ BICOMP
+ 74
+
+
+ ICC8051
+ 14
+
+
+
+
+ BICOMP
+ 23 30 0 53 19 20 31
+
+
+ ICC8051
+ 23 30 0 53 19 20 31
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ BICOMP
+ 75
+
+
+ ICC8051
+ 13
+
+
+
+
+ BICOMP
+ 7 23 20 39
+
+
+ ICC8051
+ 7 23 20 39
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ BICOMP
+ 76
+
+
+ ICC8051
+ 58
+
+
+
+
+ BICOMP
+ 9 23 0 53 19 20 31 27 24
+
+
+ ICC8051
+ 9 23 0 53 19 20 31 27 24
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ BICOMP
+ 71
+
+
+ ICC8051
+ 11
+
+
+
+
+ BICOMP
+ 23 0 53 19 20 31 25
+
+
+ ICC8051
+ 23 0 53 19 20 31 25
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+
+
+ BICOMP
+ 61
+
+
+ ICC8051
+ 47
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ BICOMP
+ 62
+
+
+ ICC8051
+ 48
+
+
+
+
+ BICOMP
+ 23 20 27 0 53 19 31
+
+
+ ICC8051
+ 23 20 27 0 53 19 31
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ BICOMP
+ 63
+
+
+ ICC8051
+ 49
+
+
+
+
+ BICOMP
+ 23 29 31 0 53 19 20 55 54 7
+
+
+ ICC8051
+ 23 29 31 0 53 19 20 55 54 7
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ BICOMP
+ 64
+
+
+ ICC8051
+ 52
+
+
+
+
+ BICOMP
+ 33 23 20 53
+
+
+ ICC8051
+ 33 23 20 53
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ BICOMP
+ 65
+
+
+ ICC8051
+ 46
+
+
+
+
+ BICOMP
+ 35 23 20 53 31
+
+
+ ICC8051
+ 35 23 20 53 31
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ BICOMP
+ 66
+
+
+ ICC8051
+ 45
+
+
+
+
+ BICOMP
+ 23 31 35 20 53 24
+
+
+ ICC8051
+ 23 31 35 20 53 24
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ BICOMP
+ 67
+
+
+ ICC8051
+ 56
+
+
+
+
+ BICOMP
+ 0 53 19 23 20 31 27 24 39 7
+
+
+ ICC8051
+ 0 53 19 23 20 31 27 24 39 7
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+
+
+ BICOMP
+ 68
+
+
+ ICC8051
+ 82
+
+
+
+
+ BICOMP
+ 0 53 19 23 20 31 39 40 7 55 54
+
+
+ ICC8051
+ 0 53 19 23 20 31 39 40 7 55 54
+
+
+
+
+ [ROOT_NODE]
+
+
+ XLINK
+ 78
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ BICOMP
+ 77
+
+
+ ICC8051
+ 57
+
+
+
+
+ BICOMP
+ 0 53 19 23 20 31 29 28 25 24 44 7 39 55 54
+
+
+ ICC8051
+ 0 53 19 23 20 31 29 28 25 24 44 7 39 55 54
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ BICOMP
+ 60
+
+
+ ICC8051
+ 50
+
+
+
+
+ BICOMP
+ 27 23 31 39 18 20 7 55 54
+
+
+ ICC8051
+ 27 23 31 39 18 20 7 55 54
+
+
+
+
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+
+
+ BICOMP
+ 59
+
+
+ ICC8051
+ 51
+
+
+
+
+ BICOMP
+ 29 23 30 28 24 20 0 53 19 31 27 25 39 44 7 18
+
+
+ ICC8051
+ 29 23 30 28 24 20 0 53 19 31 27 25 39 44 7 18
+
+
+
+
+ $PROJ_DIR$\temp\light_switch\light_switch.pbd
+
+
+ BILINK
+ 64 60 61 65 69 70 71 72 62 73 63 74 66 67 68 59 75 76 77
+
+
+
+
+ [MULTI_TOOL]
+ XLINK
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.ewd b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.ewd
new file mode 100644
index 0000000..69761b9
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.ewd
@@ -0,0 +1,644 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.ewp b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.ewp
new file mode 100644
index 0000000..1a32b61
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/light_switch.ewp
@@ -0,0 +1,1194 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\light_switch\light_switch.c
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf_security.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf_security.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf_security.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.dep b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.dep
new file mode 100644
index 0000000..ca1f1e0
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.dep
@@ -0,0 +1,16 @@
+
+
+
+ 2
+ 2954946759
+
+ srf05_cc2530_91
+
+
+ [MULTI_TOOL]
+ XLINK
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.ewd b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.ewd
new file mode 100644
index 0000000..69761b9
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.ewd
@@ -0,0 +1,644 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.ewp b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.ewp
new file mode 100644
index 0000000..1206e57
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/per_test.ewp
@@ -0,0 +1,1199 @@
+
+
+
+ 2
+
+ srf05_cc2530_91
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ application
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test.h
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.c
+
+
+ $PROJ_DIR$\..\..\..\source\apps\per_test\per_test_menu.h
+
+
+
+ basic rf
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\basicrf\basic_rf.h
+
+
+
+ hal
+
+ common
+
+ $PROJ_DIR$\..\..\..\source\Components\common\cc8051\hal_cc8051.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_defs.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_int.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\common\hal_lcd_srf05.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\common\hal_types.h
+
+
+
+ interface
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_assert.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_button.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_digio.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_int.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_joystick.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_lcd.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_led.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_mcu.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_timer_32k.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_uart.h
+
+
+
+ rf
+
+ cc2530
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\adc.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\clock.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_mcu.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_rf.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\radios\cc2530\hal_timer_32k.c
+
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\interface\hal_rf.h
+
+
+
+ srf05_soc
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_assert.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_board.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_button.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_digio.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_joystick.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\targets\srf05_soc\hal_led.c
+
+
+
+
+ utilities
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_buffer.h
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.c
+
+
+ $PROJ_DIR$\..\..\..\source\Components\utils\util_lcd.h
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.cspy.bat b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.cspy.bat
new file mode 100644
index 0000000..3778179
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.cspy.bat
@@ -0,0 +1,15 @@
+@REM This batch file has been generated by the IAR Embedded Workbench
+@REM C-SPY Debugger, as an aid to preparing a command line for running
+@REM the cspybat command line utility using the appropriate settings.
+@REM
+@REM You can launch cspybat by typing the name of this batch file followed
+@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
+@REM Note that this file is generated every time a new debug session
+@REM is initialized, so you may want to move or rename the file before
+@REM making changes.
+@REM
+
+
+"C:\Program Files\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\bin\8051proc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\bin\8051emu_cc.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\bin\8051bat.dll" --backend -B "--proc_core" "plain" "--proc_code_model" "near" "--proc_nr_virtual_regs" "8" "--proc_pdata_bank_reg_addr" "0xA0" "--proc_dptr_nr_of" "1" "--proc_data_model" "large" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 6.0\8051\config\devices\_generic\io8052.ddf" "--proc_exclude_exit_breakpoint" "--proc_driver" "chipcon" "--retain_memory" "--verify_download" "use_crc16" "--stack_overflow" "--number_of_banks" "4"
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.dbgdt b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.dbgdt
new file mode 100644
index 0000000..e068f91
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.dbgdt
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.dni b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.dni
new file mode 100644
index 0000000..d05f93d
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/settings/light_switch.dni
@@ -0,0 +1,8 @@
+[Breakpoints]
+Count=0
+[ChipconEmu]
+Stop timers on halt=1
+Leave target running=1
+[Aliases]
+Count=0
+SuppressDialog=0
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/adc.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/adc.r51
new file mode 100644
index 0000000..2e51045
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/adc.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/basic_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/basic_rf.r51
new file mode 100644
index 0000000..59afef4
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/basic_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/basic_rf_security.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/basic_rf_security.r51
new file mode 100644
index 0000000..29e7d59
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/basic_rf_security.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/clock.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/clock.r51
new file mode 100644
index 0000000..78014c9
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/clock.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_assert.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_assert.r51
new file mode 100644
index 0000000..d8e9197
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_assert.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_board.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_board.r51
new file mode 100644
index 0000000..24a2e75
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_board.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_button.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_button.r51
new file mode 100644
index 0000000..e9011c1
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_button.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_digio.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_digio.r51
new file mode 100644
index 0000000..dbf0a12
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_digio.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_int.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_int.r51
new file mode 100644
index 0000000..5839b91
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_int.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_joystick.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_joystick.r51
new file mode 100644
index 0000000..44ab63a
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_joystick.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_lcd_srf05.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_lcd_srf05.r51
new file mode 100644
index 0000000..a96c312
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_lcd_srf05.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_led.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_led.r51
new file mode 100644
index 0000000..d2d6c2f
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_led.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_mcu.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_mcu.r51
new file mode 100644
index 0000000..7537e7b
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_mcu.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_rf.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_rf.r51
new file mode 100644
index 0000000..be6dde4
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_rf.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_rf_security.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_rf_security.r51
new file mode 100644
index 0000000..0001785
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/hal_rf_security.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/light_switch.pbd b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/light_switch.pbd
new file mode 100644
index 0000000..831a00b
--- /dev/null
+++ b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/light_switch.pbd
@@ -0,0 +1,21 @@
+This is an internal working file generated by the Source Browser.
+17:34 32s
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\adc.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\basic_rf.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\basic_rf_security.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\clock.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_assert.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_board.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_button.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_digio.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_int.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_joystick.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_lcd_srf05.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_led.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_mcu.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_rf.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\hal_rf_security.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\light_switch.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\util.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\util_buffer.pbi
+E:\ylf\15-16(1)\½Ì²Ä\ÕûºÏÊé¸å\Ô´Âë\ÏîÄ¿Èý\ÈÎÎñ3.1\CC2530 BasicRF\ide\srf05_cc2530_91\iar\temp\light_switch\util_lcd.pbi
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/light_switch.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/light_switch.r51
new file mode 100644
index 0000000..a5610d0
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/light_switch.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util.r51
new file mode 100644
index 0000000..4de0fa9
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util_buffer.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util_buffer.r51
new file mode 100644
index 0000000..4a8a120
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util_buffer.r51 differ
diff --git a/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util_lcd.r51 b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util_lcd.r51
new file mode 100644
index 0000000..ed42c18
Binary files /dev/null and b/CC2530 BasicRF/ide/srf05_cc2530_91/iar/temp/light_switch/util_lcd.r51 differ
diff --git a/CC2530 BasicRF/source/apps/light_switch/light_switch.c b/CC2530 BasicRF/source/apps/light_switch/light_switch.c
new file mode 100644
index 0000000..2e38666
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/light_switch/light_switch.c
@@ -0,0 +1,310 @@
+/***********************************************************************************
+ 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"
+
+
+/***********************************************************************************
+* 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 void breathLight();
+static uint8 appSelectMode(void);
+
+static void breathLight(void){
+
+}
+
+/***********************************************************************************
+* @fn appLight
+*
+* @brief Application code for light application. Puts MCU in endless
+* loop waiting for user input from joystick.
+*
+* @param basicRfConfig - file scope variable. Basic RF configuration data
+* pRxData - file scope variable. Pointer to buffer for RX data
+*
+* @return none
+*/
+static void appLight()
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "Light");
+ halLcdWriteLine(HAL_LCD_LINE_2, "Ready");
+
+#ifdef ASSY_EXP4618_CC2420
+ halLcdClearLine(1);
+ halLcdWriteSymbol(HAL_LCD_SYMBOL_RX, 1);
+#endif
+
+ // Initialize BasicRF
+ basicRfConfig.myAddr = LIGHT_ADDR;
+ if(basicRfInit(&basicRfConfig)==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+ basicRfReceiveOn();
+
+ // Main loop
+ while (TRUE) {
+ while(!basicRfPacketIsReady());
+ if(basicRfReceive(pRxData, APP_PAYLOAD_LENGTH, NULL)>0) {
+ if(pRxData[0] == LIGHT_TOGGLE_CMD) {
+ halLedToggle(1);
+ halLedToggle(2);
+ halLedToggle(3);
+ halLedToggle(4);
+ }
+ }
+// if(basicRfReceive(pRxData, APP_PAYLOAD_LENGTH, NULL)>0) {
+// breathLight();
+// }
+ }
+}
+
+
+/***********************************************************************************
+* @fn appSwitch
+*
+* @brief Application code for switch application. Puts MCU in
+* endless loop to wait for commands from from switch
+*
+* @param basicRfConfig - file scope variable. Basic RF configuration data
+* pTxData - file scope variable. Pointer to buffer for TX
+* payload
+* appState - file scope variable. Holds application state
+*
+* @return none
+*/
+static void appSwitch()
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "Switch");
+ halLcdWriteLine(HAL_LCD_LINE_2, "Joystick Push");
+ halLcdWriteLine(HAL_LCD_LINE_3, "Send Command");
+#ifdef ASSY_EXP4618_CC2420
+ halLcdClearLine(1);
+ halLcdWriteSymbol(HAL_LCD_SYMBOL_TX, 1);
+#endif
+
+ pTxData[0] = LIGHT_TOGGLE_CMD;
+
+ // Initialize BasicRF
+ basicRfConfig.myAddr = SWITCH_ADDR;
+ if(basicRfInit(&basicRfConfig)==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+
+ // Keep Receiver off when not needed to save power
+ basicRfReceiveOff();
+
+ // Main loop
+ while (TRUE) {
+ // if( halJoystickPushed() ) {
+ if(halButtonPushed()==HAL_BUTTON_1){
+ basicRfSendPacket(LIGHT_ADDR, pTxData, APP_PAYLOAD_LENGTH);
+
+ // Put MCU to sleep. It will wake up on joystick interrupt
+ halIntOff();
+ halMcuSetLowPowerMode(HAL_MCU_LPM_3); // Will turn on global
+ // interrupt enable
+ halIntOn();
+
+ }
+ }
+}
+
+
+/***********************************************************************************
+* @fn main
+*
+* @brief This is the main entry of the "Light Switch" application.
+* After the application modes are chosen the switch can
+* send toggle commands to a light device.
+*
+* @param basicRfConfig - file scope variable. Basic RF configuration
+* data
+* appState - file scope variable. Holds application state
+*
+* @return none
+*/
+void main(void)
+{
+ //uint8 appMode = SWITCH;
+ uint8 appMode = LIGHT;
+ // Config basicRF
+ basicRfConfig.panId = PAN_ID;
+ basicRfConfig.channel = RF_CHANNEL;
+ basicRfConfig.ackRequest = TRUE;
+#ifdef SECURITY_CCM
+ basicRfConfig.securityKey = key;
+#endif
+
+ // Initalise board peripherals
+ halBoardInit();
+ halJoystickInit();
+
+ // Initalise hal_rf
+ if(halRfInit()==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+
+ // Indicate that device is powered
+ halLedSet(1);
+
+ // Print Logo and splash screen on LCD
+ // utilPrintLogo("Light Switch");
+
+ // Wait for user to press S1 to enter menu
+ // while (halButtonPushed()!=HAL_BUTTON_1);
+ halMcuWaitMs(350);
+ halLcdClear();
+
+ // Set application role
+ // appMode = appSelectMode();
+ halLcdClear();
+
+ // Transmitter application
+ if(appMode == SWITCH) {
+ // No return from here
+ appSwitch();
+ }
+ // Receiver application
+ else if(appMode == LIGHT) {
+ // No return from here
+ appLight();
+ }
+ // Role is undefined. This code should not be reached
+ HAL_ASSERT(FALSE);
+}
+
+
+/****************************************************************************************
+* @fn appSelectMode
+*
+* @brief Select application mode
+*
+* @param none
+*
+* @return uint8 - Application mode chosen
+*/
+static uint8 appSelectMode(void)
+{
+ halLcdWriteLine(1, "Device Mode: ");
+
+ return utilMenuSelect(&pMenu);
+}
+
+/****************************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/apps/light_switch/uart_rf_test.c b/CC2530 BasicRF/source/apps/light_switch/uart_rf_test.c
new file mode 100644
index 0000000..ff6b302
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/light_switch/uart_rf_test.c
@@ -0,0 +1,102 @@
+#include "hal_defs.h"
+#include "hal_cc8051.h"
+#include "hal_int.h"
+#include "hal_mcu.h"
+#include "hal_board.h"
+#include "hal_led.h"
+#include "hal_rf.h"
+#include "basic_rf.h"
+#include "hal_uart.h"
+#include
+#include
+#include
+
+#define MAX_SEND_BUF_LEN 128
+#define MAX_RECV_BUF_LEN 128
+static uint8 pTxData[MAX_SEND_BUF_LEN]; //¶¨ÒåÎÞÏß·¢ËÍ»º³åÇøµÄ´óС
+static uint8 pRxData[MAX_RECV_BUF_LEN]; //¶¨ÒåÎÞÏß½ÓÊÕ»º³åÇøµÄ´óС
+
+#define MAX_UART_SEND_BUF_LEN 128
+#define MAX_UART_RECV_BUF_LEN 128
+uint8 uTxData[MAX_UART_SEND_BUF_LEN]; //¶¨Òå´®¿Ú·¢ËÍ»º³åÇøµÄ´óС
+uint8 uRxData[MAX_UART_RECV_BUF_LEN]; //¶¨Òå´®¿Ú½ÓÊÕ»º³åÇøµÄ´óС
+uint16 uTxlen = 0;
+uint16 uRxlen = 0;
+
+
+/*****µã¶ÔµãͨѶµØÖ·ÉèÖÃ******/
+#define RF_CHANNEL 20 // ƵµÀ 11~26
+#define PAN_ID 0x1379 //ÍøÂçid
+//#define MY_ADDR 0x1234 // ±¾»úÄ£¿éµØÖ·
+//#define SEND_ADDR 0x5678 //·¢Ë͵ØÖ·
+
+#define MY_ADDR 0x5678 // ±¾»úÄ£¿éµØÖ·
+#define SEND_ADDR 0x1234 //·¢Ë͵ØÖ·
+/**************************************************/
+static basicRfCfg_t basicRfConfig;
+/******************************************/
+void MyByteCopy(uint8 *dst, int dststart, uint8 *src, int srcstart, int len)
+{
+ int i;
+ for(i=0; i 0)
+ {
+ r_UartLen = halUartRead(r_UartBuf, sizeof(r_UartBuf));
+ MyByteCopy(uRxData, uRxlen, r_UartBuf, 0, r_UartLen);
+ uRxlen += r_UartLen;
+ halMcuWaitMs(5); //ÕâÀïµÄÑӳٷdz£ÖØÒª£¬ÒòΪÕâÊÇ´®¿ÚÁ¬Ðø¶ÁÈ¡Êý¾ÝʱºòÐèÒªÓÐÒ»¶¨µÄʱ¼ä¼ä¸ô
+ r_UartLen = halUartRxLen();
+ }
+ return uRxlen;
+}
+/**************************************************/
+// ÎÞÏßRF³õʼ»¯
+void ConfigRf_Init(void)
+{
+ basicRfConfig.panId = PAN_ID; //zigbeeµÄIDºÅÉèÖÃ
+ basicRfConfig.channel = RF_CHANNEL; //zigbeeµÄƵµÀÉèÖÃ
+ basicRfConfig.myAddr = MY_ADDR; //ÉèÖñ¾»úµØÖ·
+ basicRfConfig.ackRequest = TRUE; //Ó¦´ðÐźÅ
+ while(basicRfInit(&basicRfConfig) == FAILED); //¼ì²âzigbeeµÄ²ÎÊýÊÇ·ñÅäÖóɹ¦
+ basicRfReceiveOn(); // ´ò¿ªRF
+}
+
+/********************MAIN************************/
+void main(void)
+{
+ uint16 len = 0;
+ halBoardInit(); //Ä£¿éÏà¹Ø×ÊÔ´µÄ³õʼ»¯
+ ConfigRf_Init(); //ÎÞÏßÊÕ·¢²ÎÊýµÄÅäÖóõʼ»¯
+ halLedSet(3);
+ halLedSet(4);
+ while(1)
+ {
+ len = RecvUartData(); // ½ÓÊÕ´®¿ÚÊý¾Ý
+ if(len > 0)
+ {
+ halLedToggle(3); // Â̵ÆÈ¡·´£¬ÎÞÏß·¢ËÍָʾ
+ //°Ñ´®¿ÚÊý¾Ýͨ¹ýzigbee·¢ËͳöÈ¥
+ basicRfSendPacket(SEND_ADDR, uRxData,len);
+ }
+ if(basicRfPacketIsReady()) //²éѯÓÐûÊÕµ½ÎÞÏßÐźÅ
+ {
+ halLedToggle(4); // ºìµÆÈ¡·´£¬ÎÞÏß½ÓÊÕָʾ
+ //½ÓÊÕÎÞÏßÊý¾Ý
+ len = basicRfReceive(pRxData, MAX_RECV_BUF_LEN, NULL);
+ //½ÓÊÕµ½µÄÎÞÏß·¢Ë͵½´®¿ÚÊý
+ halUartWrite(pRxData,len);
+ }
+ }
+}
+/************************main end *********************************************/
\ No newline at end of file
diff --git a/CC2530 BasicRF/source/apps/per_test/per_test.c b/CC2530 BasicRF/source/apps/per_test/per_test.c
new file mode 100644
index 0000000..bfcd5f7
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/per_test/per_test.c
@@ -0,0 +1,419 @@
+/***********************************************************************************
+ Filename: per_test.c
+
+ Description: This application functions as a packet error rate (PER) tester.
+ One node is set up as transmitter and the other as receiver. The role and
+ configuration parameters for the PER test of the node is chosen on initalisation
+ by navigating the joystick and confirm the choices with S1.
+
+ The configuration parameters are channel, burst size and tx power. Push S1 to
+ enter the menu. Then the configuration parameters are set by pressing
+ joystick to right or left (increase/decrease value) and confirm with S1.
+
+ After configuration of both the receiver and transmitter, the PER test is
+ started by pressing joystick up on the transmitter. By pressing joystick up
+ again the test is stopped.
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_lcd.h"
+#include "hal_led.h"
+#include "hal_int.h"
+#include "hal_timer_32k.h"
+#include "hal_joystick.h"
+#include "hal_button.h"
+#include "hal_board.h"
+#include "hal_rf.h"
+#include "hal_assert.h"
+#include "util_lcd.h"
+#include "basic_rf.h"
+#include "per_test.h"
+
+/***********************************************************************************
+* CONSTANTS
+*/
+// Application states
+#define IDLE 0
+#define TRANSMIT_PACKET 1
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+static basicRfCfg_t basicRfConfig;
+static perTestPacket_t txPacket;
+static perTestPacket_t rxPacket;
+static volatile uint8 appState;
+static volatile uint8 appStarted;
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+static void appTimerISR(void);
+static void appStartStop(void);
+static void appTransmitter();
+static void appReceiver();
+
+/***********************************************************************************
+* @fn appTimerISR
+*
+* @brief 32KHz timer interrupt service routine. Signals PER test transmitter
+* application to transmit a packet by setting application state.
+*
+* @param none
+*
+* @return none
+*/
+static void appTimerISR(void)
+{
+ appState = TRANSMIT_PACKET;
+}
+
+
+/***********************************************************************************
+* @fn appStartStop
+*
+* @brief Joystick up interrupt service routine. Start or stop 32KHz timer,
+* and thereby start or stop PER test packet transmission.
+*
+* @param none
+*
+* @return none
+*/
+static void appStartStop(void)
+{
+ // toggle value
+ appStarted ^= 1;
+
+ if(appStarted) {
+ halTimer32kIntEnable();
+ }
+ else {
+ halTimer32kIntDisable();
+ }
+}
+
+
+/***********************************************************************************
+* @fn appConfigTimer
+*
+* @brief Configure timer interrupts for application. Uses 32KHz timer
+*
+* @param uint16 rate - Frequency of timer interrupt. This value must be
+* between 1 and 32768 Hz
+*
+* @return none
+*/
+static void appConfigTimer(uint16 rate)
+{
+ halTimer32kInit(TIMER_32K_CLK_FREQ/rate);
+ halTimer32kIntConnect(&appTimerISR);
+}
+
+
+/***********************************************************************************
+* @fn appReceiver
+*
+* @brief Application code for the receiver mode. Puts MCU in endless loop
+*
+* @param basicRfConfig - file scope variable. Basic RF configuration data
+* rxPacket - file scope variable of type perTestPacket_t
+*
+* @return none
+*/
+static void appReceiver()
+{
+ uint32 segNumber=0;
+ int16 perRssiBuf[RSSI_AVG_WINDOW_SIZE] = {0}; // Ring buffer for RSSI
+ uint8 perRssiBufCounter = 0; // Counter to keep track of the
+ // oldest newest byte in RSSI
+ // ring buffer
+ perRxStats_t rxStats = {0,0,0,0};
+ int16 rssi;
+ uint8 resetStats=FALSE;
+
+#ifdef INCLUDE_PA
+ uint8 gain;
+
+ // Select gain (for modules with CC2590/91 only)
+ gain =appSelectGain();
+ halRfSetGain(gain);
+#endif
+
+ // Initialize BasicRF
+ basicRfConfig.myAddr = RX_ADDR;
+ if(basicRfInit(&basicRfConfig)==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+ basicRfReceiveOn();
+
+ halLcdClear();
+ halLcdWriteLines("PER Tester", "Receiver", "Ready");
+
+ // Main loop
+ while (TRUE) {
+ while(!basicRfPacketIsReady());
+ if(basicRfReceive((uint8*)&rxPacket, MAX_PAYLOAD_LENGTH, &rssi)>0) {
+ halLedSet(3);
+
+ // Change byte order from network to host order
+ UINT32_NTOH(rxPacket.seqNumber);
+ segNumber = rxPacket.seqNumber;
+
+ // If statistics is reset set expected sequence number to
+ // received sequence number
+ if(resetStats){
+ rxStats.expectedSeqNum = segNumber;
+ resetStats=FALSE;
+ }
+
+ // Subtract old RSSI value from sum
+ rxStats.rssiSum -= perRssiBuf[perRssiBufCounter];
+ // Store new RSSI value in ring buffer, will add it to sum later
+ perRssiBuf[perRssiBufCounter] = rssi;
+
+ // Add the new RSSI value to sum
+ rxStats.rssiSum += perRssiBuf[perRssiBufCounter];
+ if (++perRssiBufCounter == RSSI_AVG_WINDOW_SIZE) {
+ perRssiBufCounter = 0; // Wrap ring buffer counter
+ }
+
+ // Check if received packet is the expected packet
+ if (rxStats.expectedSeqNum == segNumber) {
+ rxStats.expectedSeqNum++;
+ }
+ // If there is a jump in the sequence numbering this means some packets in
+ // between has been lost.
+ else if (rxStats.expectedSeqNum < segNumber){
+ rxStats.lostPkts += segNumber - rxStats.expectedSeqNum;
+ rxStats.expectedSeqNum = segNumber + 1;
+ }
+ // If the sequence number is lower than the previous one, we will assume a
+ // new data burst has started and we will reset our statistics variables.
+ else {
+ // Update our expectations assuming this is a new burst
+ rxStats.expectedSeqNum = segNumber + 1;
+ rxStats.rcvdPkts = 0;
+ rxStats.lostPkts = 0;
+ }
+ rxStats.rcvdPkts++;
+
+ // reset statistics if button 1 is pressed
+ if(halButtonPushed()==HAL_BUTTON_1){
+ resetStats = TRUE;
+ rxStats.rcvdPkts = 1;
+ rxStats.lostPkts = 0;
+ }
+
+ // Update LCD
+ // PER in units per 1000
+ utilLcdDisplayValue(HAL_LCD_LINE_1, "PER: ", (int32)((rxStats.lostPkts*1000)/(rxStats.lostPkts+rxStats.rcvdPkts)), " /1000");
+ utilLcdDisplayValue(HAL_LCD_LINE_2, "RSSI: ", (int32)rxStats.rssiSum/32, "dBm");
+ #ifndef SRF04EB
+ utilLcdDisplayValue(HAL_LCD_LINE_3, "Recv'd: ", (int32)rxStats.rcvdPkts, NULL);
+ #endif
+ halLedClear(3);
+ }
+ }
+}
+
+
+/***********************************************************************************
+* @fn appTransmitter
+*
+* @brief Application code for the transmitter mode. Puts MCU in endless
+* loop
+*
+* @param basicRfConfig - file scope variable. Basic RF configuration data
+* txPacket - file scope variable of type perTestPacket_t
+* appState - file scope variable. Holds application state
+* appStarted - file scope variable. Controls start and stop of
+* transmission
+*
+* @return none
+*/
+static void appTransmitter()
+{
+ uint32 burstSize=0;
+ uint32 pktsSent=0;
+ uint8 appTxPower;
+ uint8 n;
+
+ // Initialize BasicRF
+ basicRfConfig.myAddr = TX_ADDR;
+ if(basicRfInit(&basicRfConfig)==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+
+ // Set TX output power
+ appTxPower = appSelectOutputPower();
+ halRfSetTxPower(appTxPower);
+
+ // Set burst size
+ burstSize = appSelectBurstSize();
+
+ // Basic RF puts on receiver before transmission of packet, and turns off
+ // after packet is sent
+ basicRfReceiveOff();
+
+ // Config timer and IO
+ n= appSelectRate();
+ appConfigTimer(n);
+ halJoystickInit();
+
+ // Initalise packet payload
+ txPacket.seqNumber = 0;
+ for(n = 0; n < sizeof(txPacket.padding); n++) {
+ txPacket.padding[n] = n;
+ }
+
+ halLcdClear();
+ halLcdWriteLines("PER Tester", "Joystick Push", "start/stop");
+
+ // Main loop
+ while (TRUE) {
+
+ // Wait for user to start application
+ while(!halJoystickPushed() );
+ appStartStop();
+
+ halLcdClear();
+ halLcdWriteLines("PER Tester", "Transmitter", NULL);
+
+ while(appStarted) {
+ if( halJoystickPushed() ) {
+ appStartStop();
+ }
+
+ if (pktsSent < burstSize) {
+ if( appState == TRANSMIT_PACKET ) {
+ // Make sure sequence number has network byte order
+ UINT32_HTON(txPacket.seqNumber);
+
+ basicRfSendPacket(RX_ADDR, (uint8*)&txPacket, PACKET_SIZE);
+
+ // Change byte order back to host order before increment
+ UINT32_NTOH(txPacket.seqNumber);
+ txPacket.seqNumber++;
+
+ pktsSent++;
+ #ifdef SRF04EB
+ utilLcdDisplayValue(HAL_LCD_LINE_2, "Sent: ", (int32)pktsSent, NULL);
+ #else
+ utilLcdDisplayValue(HAL_LCD_LINE_3, "Sent: ", (int32)pktsSent, NULL);
+ #endif
+ appState = IDLE;
+
+ halLedToggle(3);
+ }
+ }
+ else
+ appStarted = !appStarted;
+ }
+
+ // Reset statistics and sequence number
+ pktsSent = 0;
+ txPacket.seqNumber = 0;
+ halLcdClear();
+ halLedClear(3);
+ halLcdWriteLines("PER Test", "Joystick Push", "start/stop");
+ }
+}
+
+
+/***********************************************************************************
+* @fn main
+*
+* @brief This is the main entry of the "PER test" application.
+*
+* @param basicRfConfig - file scope variable. Basic RF configuration data
+* appState - file scope variable. Holds application state
+* appStarted - file scope variable. Used to control start and stop of
+* transmitter application.
+*
+* @return none
+*/
+void main (void)
+{
+ uint8 appMode;
+
+ appState = IDLE;
+ appStarted = FALSE;
+
+ // Config basicRF
+ basicRfConfig.panId = PAN_ID;
+ basicRfConfig.ackRequest = FALSE;
+
+ // Initialise board peripherals
+ halBoardInit();
+
+ // Initalise hal_rf
+ if(halRfInit()==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+
+ // Indicate that device is powered
+ halLedSet(1);
+
+ // Print Logo and splash screen on LCD
+ utilPrintLogo("PER Tester");
+
+ // Wait for user to press S1 to enter menu
+ while (halButtonPushed()!=HAL_BUTTON_1);
+ halMcuWaitMs(350);
+ halLcdClear();
+
+ // Set channel
+ basicRfConfig.channel = appSelectChannel();
+
+ // Set mode
+ appMode = appSelectMode();
+
+ // Transmitter application
+ if(appMode == MODE_TX) {
+ // No return from here
+ appTransmitter();
+ }
+ // Receiver application
+ else if(appMode == MODE_RX) {
+ // No return from here
+ appReceiver();
+ }
+ // Role is undefined. This code should not be reached
+ HAL_ASSERT(FALSE);
+}
+
+
+/***********************************************************************************
+ Copyright 2008 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/apps/per_test/per_test.h b/CC2530 BasicRF/source/apps/per_test/per_test.h
new file mode 100644
index 0000000..0228423
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/per_test/per_test.h
@@ -0,0 +1,82 @@
+
+/***********************************************************************************
+ Filename: per_test.h
+
+ Description: PER test header file
+
+***********************************************************************************/
+
+#ifndef PER_TEST_H
+#define PER_TEST_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "per_test_menu.h"
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+
+// PER test packet format
+typedef struct {
+ uint32 seqNumber;
+ uint8 padding[6];
+} perTestPacket_t;
+
+// PER test receiver statistics
+typedef struct {
+ uint32 expectedSeqNum;
+ uint32 rcvdPkts;
+ uint32 lostPkts;
+ int16 rssiSum;
+} perRxStats_t;
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+// BasicRF definitions
+#define PAN_ID 0x2007
+#define TX_ADDR 0x2520
+#define RX_ADDR 0xBEEF
+#define MAX_PAYLOAD_LENGTH 103
+#define PACKET_SIZE sizeof(perTestPacket_t)
+
+#define RSSI_AVG_WINDOW_SIZE 32 // Window size for RSSI moving average
+
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/apps/per_test/per_test_menu.c b/CC2530 BasicRF/source/apps/per_test/per_test_menu.c
new file mode 100644
index 0000000..9913d91
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/per_test/per_test_menu.c
@@ -0,0 +1,264 @@
+/***********************************************************************************
+ Filename: per_test_menu.c
+
+ Description: PER test menu library
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+
+#include "per_test_menu.h"
+#include "hal_lcd.h"
+#include "hal_rf.h"
+#include "hal_assert.h"
+#include "util_lcd.h"
+
+/***********************************************************************************
+* LOCAL CONSTSANTS and MACROS
+*/
+
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+// Channel menu
+static const menuItem_t pChannels[] =
+{
+ "11 - 2405 MHz", 11,
+ "12 - 2410 MHz", 12,
+ "13 - 2415 MHz", 13,
+ "14 - 2420 MHz", 14,
+ "15 - 2425 MHz", 15,
+ "16 - 2430 MHz", 16,
+ "17 - 2435 MHz", 17,
+ "18 - 2440 MHz", 18,
+ "19 - 2445 MHz", 19,
+ "20 - 2450 MHz", 20,
+ "21 - 2455 MHz", 21,
+ "22 - 2460 MHz", 22,
+ "23 - 2465 MHz", 23,
+ "24 - 2470 MHz", 24,
+ "25 - 2475 MHz", 25,
+ "26 - 2480 MHz", 26,
+};
+
+static const menu_t channelMenu =
+{
+ pChannels,
+ N_ITEMS(pChannels)
+};
+
+// Mode menu
+static const menuItem_t pModes[] =
+{
+ "Transmitter", MODE_TX,
+ "Receiver", MODE_RX,
+};
+
+static const menu_t modeMenu =
+{
+ pModes,
+ N_ITEMS(pModes)
+};
+
+// Burst size menu
+static const menuItem_t pBurstSizes[] =
+{
+ "1000 Pkts", 0,
+ "10000 Pkts", 1,
+ "100000 Pkts", 2,
+ "1000000 Pkts", 3
+};
+
+uint32 burstSizes[] =
+{
+ BURST_SIZE_1,
+ BURST_SIZE_2,
+ BURST_SIZE_3,
+ BURST_SIZE_4
+};
+
+static const menu_t burstSizeMenu =
+{
+ pBurstSizes,
+ N_ITEMS(pBurstSizes)
+};
+
+// Packet rate menu
+#define RATE_ITEM(n) { #n"/second", n }
+static const menuItem_t pRate[] =
+{
+ RATE_ITEM(100),
+ RATE_ITEM(50),
+ RATE_ITEM(20),
+ RATE_ITEM(10),
+};
+
+static const menu_t rateMenu =
+{
+ pRate,
+ N_ITEMS(pRate)
+};
+
+// TX output power menu
+extern const menu_t powerMenu;
+
+#ifdef INCLUDE_PA
+// Gain menu
+static const menuItem_t pGainSettings[] =
+{
+ "high gain", HAL_RF_GAIN_HIGH,
+ "low gain", HAL_RF_GAIN_LOW
+};
+
+static const menu_t gainMenu =
+{
+ pGainSettings,
+ N_ITEMS(pGainSettings)
+};
+
+#endif
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+
+
+/***********************************************************************************
+* @fn appSelectChannel
+*
+* @brief Select channel
+*
+* @param none
+*
+* @return uint8 - Channel chosen
+*/
+uint8 appSelectChannel(void)
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "Channel: ");
+
+ return utilMenuSelect(&channelMenu);
+}
+
+/***********************************************************************************
+* @fn appSelectMode
+*
+* @brief Select application mode
+*
+* @param none
+*
+* @return uint8 - Application mode chosen
+*/
+uint8 appSelectMode(void)
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "Operating Mode: ");
+
+ return utilMenuSelect(&modeMenu);
+}
+
+
+/***********************************************************************************
+* @fn appSelectRate
+*
+* @brief Select transmit rate
+*
+* @param none
+*
+* @return uint8 - Rat chosen
+*/
+uint8 appSelectRate(void)
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "Packet rate: ");
+
+ return utilMenuSelect(&rateMenu);
+}
+
+
+/***********************************************************************************
+* @fn appSelectBurstSize
+*
+* @brief Select burst size (Number of packets to be transmitted)
+*
+* @param none
+*
+* @return uint32 - burst size
+*/
+uint32 appSelectBurstSize(void)
+{
+ uint8 index=0;
+ halLcdWriteLine(HAL_LCD_LINE_1, "Burst Size: ");
+
+ index = utilMenuSelect(&burstSizeMenu);
+ return burstSizes[index];
+}
+
+/***********************************************************************************
+* @fn appSelectOutputPower
+*
+* @brief Select output power
+*
+* @param none
+*
+* @return uint8 - Output power alternative
+*/
+uint8 appSelectOutputPower(void)
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "TX Output Power: ");
+
+ return utilMenuSelect(&powerMenu);
+}
+
+
+#ifdef INCLUDE_PA
+/***********************************************************************************
+* @fn appSelectGain
+*
+* @brief Select gain for CC2590/91
+*
+* @param none
+*
+* @return uint8 - selected gain
+*/
+uint8 appSelectGain(void)
+{
+ halLcdWriteLine(HAL_LCD_LINE_1, "Gain: ");
+
+ return utilMenuSelect(&gainMenu);
+}
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/apps/per_test/per_test_menu.h b/CC2530 BasicRF/source/apps/per_test/per_test_menu.h
new file mode 100644
index 0000000..73efd85
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/per_test/per_test_menu.h
@@ -0,0 +1,81 @@
+
+/***********************************************************************************
+ Filename: per_test_menu.h
+
+ Description: PER test menu header file
+
+***********************************************************************************/
+
+#ifndef PER_TEST_MENU_H
+#define PER_TEST_MENU_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_defs.h"
+#include "hal_board.h"
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+// Application modes
+#define MODE_TX 0
+#define MODE_RX 1
+#define MODES 2
+
+// Burst Sizes
+#define BURST_SIZE_1 1000
+#define BURST_SIZE_2 10000
+#define BURST_SIZE_3 100000
+#define BURST_SIZE_4 1000000
+#define BURSTSIZES 4
+
+// Channel 11, first channel in band
+#define CHANNEL_11 11
+#define CHANNELS 16
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+uint8 appSelectMode(void);
+uint8 appSelectChannel(void);
+uint8 appSelectOutputPower(void);
+uint8 appSelectGain(void); // Modules with CC2590/91 only
+uint8 appSelectRate(void);
+uint32 appSelectBurstSize(void);
+
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/apps/spectrum_analyzer/spectrum_analyzer.c b/CC2530 BasicRF/source/apps/spectrum_analyzer/spectrum_analyzer.c
new file mode 100644
index 0000000..101fd8e
--- /dev/null
+++ b/CC2530 BasicRF/source/apps/spectrum_analyzer/spectrum_analyzer.c
@@ -0,0 +1,277 @@
+/***********************************************************************************
+
+ Filename: spectrum_analyzer.c
+
+ Description: Samples energy on each channel (11-26).
+
+ Mode 1: display values as bar graphs only
+ Mode 2: display values as bar graphs AND RSSI value for the
+ selected channel. Select channel by moving the joystick left/right.
+
+ - Toggle between the display modes by moving the joystick up.
+ - The program starts in mode 1.
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "hal_rf.h"
+#include "util.h"
+#include "hal_rf_util.h"
+#include "util_lcd.h"
+
+/***********************************************************************************
+* CONSTANTS
+*/
+#define SAMPLE_COUNT 8
+#define CHANNELS 16
+#define CHANNEL_11 11
+#define SAMPLE_TIME 2000 // us
+
+// Display range; minimum and maximum RSSI-values in dBm
+#define MIN_RSSI_DBM -120
+#define MAX_RSSI_DBM -10
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+static volatile uint8 appShowText;
+static volatile uint8 txtChannel;
+static int8 ppRssi[CHANNELS][SAMPLE_COUNT];
+
+static const char *channelText[CHANNELS] =
+{
+ "CH11 ", "CH12 ", "CH13 ", "CH14 ", "CH15 ", "CH16 ", "CH17 ", "CH18 ",
+ "CH19 ", "CH20 ", "CH21 ", "CH22 ", "CH23 ", "CH24 ", "CH25 ", "CH26 "
+};
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+
+
+/***********************************************************************************
+* @fn appShowText
+*
+* @brief
+*
+* @param none
+*
+* @return none
+*/
+static void appSetShowText(void)
+{
+ // toggle value
+ appShowText ^= 1;
+}
+
+
+/***********************************************************************************
+* @fn appIncChannel
+*
+* @brief
+*
+* @param none
+*
+* @return none
+*/
+static void appIncChannel(void)
+{
+ if (appShowText) {
+ txtChannel++;
+ if(txtChannel>=CHANNELS)
+ txtChannel=0;
+ }
+}
+
+
+/***********************************************************************************
+* @fn appDecChannel
+*
+* @brief
+*
+* @param none
+*
+* @return none
+*/
+static void appDecChannel(void)
+{
+ if (appShowText) {
+ if(txtChannel==0)
+ txtChannel=CHANNELS-1;
+ else
+ txtChannel--;
+ }
+}
+
+
+/***********************************************************************************
+* @fn appConfigIO
+*
+* @brief Configure IO interrupts for application
+*
+* @param none
+*
+* @return none
+*/
+static void appConfigIO(void)
+{
+ halJoystickInit();
+
+ halJoystickIntConnect(HAL_JOYSTICK_EVT_UP,&appSetShowText);
+ halJoystickIntEnable(HAL_JOYSTICK_EVT_UP);
+
+ halJoystickIntConnect(HAL_JOYSTICK_EVT_RIGHT,&appIncChannel);
+ halJoystickIntEnable(HAL_JOYSTICK_EVT_RIGHT);
+
+ halJoystickIntConnect(HAL_JOYSTICK_EVT_LEFT,&appDecChannel);
+ halJoystickIntEnable(HAL_JOYSTICK_EVT_LEFT);
+}
+
+
+/***********************************************************************************
+* @fn main
+*
+* @brief
+*
+* @param
+*
+*
+* @return none
+*/
+void main (void)
+{
+ int8 minRssi, maxRssi, rssiOffset;
+ int16 barValue;
+ int16 txtValue;
+ uint8 barHeight, n;
+
+ appShowText=FALSE;
+ barHeight= 3;
+ txtChannel= 0;
+
+ // Initalise board peripherals
+ halBoardInit();
+
+ // Initalise hal_rf
+ if(halRfInit()==FAILED) {
+ HAL_ASSERT(FALSE);
+ }
+ // Indicate that device is powered
+ halLedSet(1);
+
+ // Print Logo and splash screen on LCD
+ utilPrintLogo("Spectrum Anl");
+ halMcuWaitMs(3000);
+
+ // Calculate RSSI offset and range (must be done after setting gain mode)
+ halRfSetGain(HAL_RF_GAIN_HIGH);
+
+ rssiOffset= halRfGetRssiOffset();
+ minRssi= MIN_RSSI_DBM + rssiOffset;
+ maxRssi= MAX_RSSI_DBM + rssiOffset;
+
+ // Config IO interrupt
+ appConfigIO();
+
+ // Set chip in RX scan mode
+ halSetRxScanMode();
+
+ // Load bar graph symbols to LCD
+ utilLoadBarGraph();
+
+ while(1) {
+ uint8 sample;
+
+ // For each RSSI sample record
+ for (sample = 0; sample < SAMPLE_COUNT; sample++) {
+ uint8 channel;
+ // Sample channel 11-26
+ for(channel = 0; channel < CHANNELS; channel++ ) {
+ ppRssi[channel][sample] = halSampleED(channel+CHANNEL_11, SAMPLE_TIME);
+ }
+
+ // Update the display with the latest graph values
+ for(channel = 0; channel < CHANNELS; channel++ ) {
+
+ barValue = -128;
+ for (n = 0; n < SAMPLE_COUNT; n++) {
+ barValue = MAX((int8) barValue, ppRssi[channel][n]);
+ }
+ barValue -= minRssi;
+
+ // Saturate
+ if (barValue < 0)
+ barValue = 0;
+ if (barValue > ((int16) maxRssi - (int16) minRssi))
+ barValue = (int16) maxRssi - (int16) minRssi;
+ // Scale
+ barValue *= (barHeight == 2) ? (8 + 1 + 8) : (8 + 1 + 8 + 1 + 8);
+ barValue /= maxRssi - minRssi;
+
+ // Display the bar
+ for (n = 0; n < barHeight; n++) {
+ utilDisplayBarGraph(n + 1, channel, (barHeight - 1 - n) * 9, barValue);
+ }
+ }
+ }
+
+ // Show RSSI in text form on display
+ if(appShowText) {
+ txtValue = -128;
+ barHeight=2;
+ // find peak value
+ for (n = 0; n < SAMPLE_COUNT; n++) {
+ txtValue = MAX((int8) txtValue, ppRssi[txtChannel][n]);
+ }
+ txtValue -= rssiOffset;
+ utilLcdDisplayValue(3, (char*)channelText[txtChannel], txtValue, " dBm");
+ }
+ else
+ barHeight=3;
+ }
+}
+
+
+/***********************************************************************************
+Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+IMPORTANT: Your use of this Software is limited to those specific rights
+granted under the terms of a software license agreement between the user
+who downloaded the software, his/her employer (which must be your employer)
+and Texas Instruments Incorporated (the "License"). You may not use this
+Software unless you agree to abide by the terms of the License. The License
+limits your use, and you acknowledge, that the Software may not be modified,
+copied or distributed unless embedded on a Texas Instruments microcontroller
+or used solely and exclusively in conjunction with a Texas Instruments radio
+frequency transceiver, which is integrated into your product. Other than for
+the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+works of, modify, distribute, perform, display or sell this Software and/or
+its documentation for any purpose.
+
+YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+PROVIDED “AS IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+Should you have any questions regarding your right to use this Software,
+contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+
+
diff --git a/CC2530 BasicRF/source/components/basicrf/basic_rf.c b/CC2530 BasicRF/source/components/basicrf/basic_rf.c
new file mode 100644
index 0000000..5e6537c
--- /dev/null
+++ b/CC2530 BasicRF/source/components/basicrf/basic_rf.c
@@ -0,0 +1,615 @@
+/***********************************************************************************
+ Filename: basic_rf.c
+
+ Description: Basic RF library
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_int.h"
+#include "hal_mcu.h" // Using halMcuWaitUs()
+
+#include "hal_rf.h"
+#ifdef SECURITY_CCM
+#include "hal_rf_security.h"
+#endif
+
+#include "basic_rf.h"
+#ifdef SECURITY_CCM
+#include "basic_rf_security.h"
+#endif
+
+#include "util.h" // Using min()
+#include "string.h"
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+// Packet and packet part lengths
+#define PKT_LEN_MIC 8
+#define PKT_LEN_SEC PKT_LEN_UNSEC + PKT_LEN_MIC
+#define PKT_LEN_AUTH 8
+#define PKT_LEN_ENCR 24
+
+// Packet overhead ((frame control field, sequence number, PAN ID,
+// destination and source) + (footer))
+// Note that the length byte itself is not included included in the packet length
+#define BASIC_RF_PACKET_OVERHEAD_SIZE ((2 + 1 + 2 + 2 + 2) + (2))
+#define BASIC_RF_MAX_PAYLOAD_SIZE (127 - BASIC_RF_PACKET_OVERHEAD_SIZE - \
+ BASIC_RF_AUX_HDR_LENGTH - BASIC_RF_LEN_MIC)
+#define BASIC_RF_ACK_PACKET_SIZE 5
+#define BASIC_RF_FOOTER_SIZE 2
+#define BASIC_RF_HDR_SIZE 10
+
+// The time it takes for the acknowledgment packet to be received after the
+// data packet has been transmitted.
+#define BASIC_RF_ACK_DURATION (0.5 * 32 * 2 * ((4 + 1) + (1) + (2 + 1) + (2)))
+#define BASIC_RF_SYMBOL_DURATION (32 * 0.5)
+
+// The length byte
+#define BASIC_RF_PLD_LEN_MASK 0x7F
+
+// Frame control field
+#define BASIC_RF_FCF_NOACK 0x8841
+#define BASIC_RF_FCF_ACK 0x8861
+#define BASIC_RF_FCF_ACK_BM 0x0020
+#define BASIC_RF_FCF_BM (~BASIC_RF_FCF_ACK_BM)
+#define BASIC_RF_SEC_ENABLED_FCF_BM 0x0008
+
+// Frame control field LSB
+#define BASIC_RF_FCF_NOACK_L LO_UINT16(BASIC_RF_FCF_NOACK)
+#define BASIC_RF_FCF_ACK_L LO_UINT16(BASIC_RF_FCF_ACK)
+#define BASIC_RF_FCF_ACK_BM_L LO_UINT16(BASIC_RF_FCF_ACK_BM)
+#define BASIC_RF_FCF_BM_L LO_UINT16(BASIC_RF_FCF_BM)
+#define BASIC_RF_SEC_ENABLED_FCF_BM_L LO_UINT16(BASIC_RF_SEC_ENABLED_FCF_BM)
+
+// Auxiliary Security header
+#define BASIC_RF_AUX_HDR_LENGTH 5
+#define BASIC_RF_LEN_AUTH BASIC_RF_PACKET_OVERHEAD_SIZE + \
+ BASIC_RF_AUX_HDR_LENGTH - BASIC_RF_FOOTER_SIZE
+#define BASIC_RF_SECURITY_M 2
+#define BASIC_RF_LEN_MIC 8
+#ifdef SECURITY_CCM
+#undef BASIC_RF_HDR_SIZE
+#define BASIC_RF_HDR_SIZE 15
+#endif
+
+// Footer
+#define BASIC_RF_CRC_OK_BM 0x80
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+// The receive struct
+typedef struct {
+ uint8 seqNumber;
+ uint16 srcAddr;
+ uint16 srcPanId;
+ int8 length;
+ uint8* pPayload;
+ uint8 ackRequest;
+ int8 rssi;
+ volatile uint8 isReady;
+ uint8 status;
+} basicRfRxInfo_t;
+
+// Tx state
+typedef struct {
+ uint8 txSeqNumber;
+ volatile uint8 ackReceived;
+ uint8 receiveOn;
+ uint32 frameCounter;
+} basicRfTxState_t;
+
+
+// Basic RF packet header (IEEE 802.15.4)
+typedef struct {
+ uint8 packetLength;
+ uint8 fcf0; // Frame control field LSB
+ uint8 fcf1; // Frame control field MSB
+ uint8 seqNumber;
+ uint16 panId;
+ uint16 destAddr;
+ uint16 srcAddr;
+ #ifdef SECURITY_CCM
+ uint8 securityControl;
+ uint8 frameCounter[4];
+ #endif
+} basicRfPktHdr_t;
+
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+static basicRfRxInfo_t rxi= { 0xFF }; // Make sure sequence numbers are
+static basicRfTxState_t txState= { 0x00 }; // initialised and distinct.
+
+static basicRfCfg_t* pConfig;
+static uint8 txMpdu[BASIC_RF_MAX_PAYLOAD_SIZE+BASIC_RF_PACKET_OVERHEAD_SIZE+1];
+static uint8 rxMpdu[128];
+
+/***********************************************************************************
+* GLOBAL VARIABLES
+*/
+
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+
+
+/***********************************************************************************
+* @fn basicRfBuildHeader
+*
+* @brief Builds packet header according to IEEE 802.15.4 frame format
+*
+* @param buffer - Pointer to buffer to write the header
+* destAddr - destination short address
+* payloadLength - length of higher layer payload
+*
+* @return uint8 - length of header
+*/
+static uint8 basicRfBuildHeader(uint8* buffer, uint16 destAddr, uint8 payloadLength)
+{
+ basicRfPktHdr_t *pHdr;
+ uint16 fcf;
+
+ pHdr= (basicRfPktHdr_t*)buffer;
+
+ // Populate packet header
+ pHdr->packetLength = payloadLength + BASIC_RF_PACKET_OVERHEAD_SIZE;
+ //pHdr->frameControlField = pConfig->ackRequest ? BASIC_RF_FCF_ACK : BASIC_RF_FCF_NOACK;
+ fcf= pConfig->ackRequest ? BASIC_RF_FCF_ACK : BASIC_RF_FCF_NOACK;
+ pHdr->fcf0 = LO_UINT16(fcf);
+ pHdr->fcf1 = HI_UINT16(fcf);
+ pHdr->seqNumber= txState.txSeqNumber;
+ pHdr->panId= pConfig->panId;
+ pHdr->destAddr= destAddr;
+ pHdr->srcAddr= pConfig->myAddr;
+
+ #ifdef SECURITY_CCM
+
+ // Add security to FCF, length and security header
+ pHdr->fcf0 |= BASIC_RF_SEC_ENABLED_FCF_BM_L;
+ pHdr->packetLength += PKT_LEN_MIC;
+ pHdr->packetLength += BASIC_RF_AUX_HDR_LENGTH;
+
+ pHdr->securityControl= SECURITY_CONTROL;
+ pHdr->frameCounter[0]= LO_UINT16(LO_UINT32(txState.frameCounter));
+ pHdr->frameCounter[1]= HI_UINT16(LO_UINT32(txState.frameCounter));
+ pHdr->frameCounter[2]= LO_UINT16(HI_UINT32(txState.frameCounter));
+ pHdr->frameCounter[3]= HI_UINT16(HI_UINT32(txState.frameCounter));
+
+ #endif
+
+ // Make sure bytefields are network byte order
+ UINT16_HTON(pHdr->panId);
+ UINT16_HTON(pHdr->destAddr);
+ UINT16_HTON(pHdr->srcAddr);
+
+ return BASIC_RF_HDR_SIZE;
+}
+
+
+/***********************************************************************************
+* @fn basicRfBuildMpdu
+*
+* @brief Builds mpdu (MAC header + payload) according to IEEE 802.15.4
+* frame format
+*
+* @param destAddr - Destination short address
+* pPayload - pointer to buffer with payload
+* payloadLength - length of payload buffer
+*
+* @return uint8 - length of mpdu
+*/
+static uint8 basicRfBuildMpdu(uint16 destAddr, uint8* pPayload, uint8 payloadLength)
+{
+ uint8 hdrLength, n;
+
+ hdrLength = basicRfBuildHeader(txMpdu, destAddr, payloadLength);
+
+ for(n=0;npacketLength,1);
+ pHdr->packetLength &= BASIC_RF_PLD_LEN_MASK; // Ignore MSB
+
+ // Is this an acknowledgment packet?
+ // Only ack packets may be 5 bytes in total.
+ if (pHdr->packetLength == BASIC_RF_ACK_PACKET_SIZE) {
+
+ // Read the packet
+ halRfReadRxBuf(&rxMpdu[1], pHdr->packetLength);
+
+ // Make sure byte fields are changed from network to host byte order
+ UINT16_NTOH(pHdr->panId);
+ UINT16_NTOH(pHdr->destAddr);
+ UINT16_NTOH(pHdr->srcAddr);
+ #ifdef SECURITY_CCM
+ UINT32_NTOH(pHdr->frameCounter);
+ #endif
+
+ rxi.ackRequest = !!(pHdr->fcf0 & BASIC_RF_FCF_ACK_BM_L);
+
+ // Read the status word and check for CRC OK
+ pStatusWord= rxMpdu + 4;
+
+ // Indicate the successful ACK reception if CRC and sequence number OK
+ if ((pStatusWord[1] & BASIC_RF_CRC_OK_BM) && (pHdr->seqNumber == txState.txSeqNumber)) {
+ txState.ackReceived = TRUE;
+ }
+
+ // No, it is data
+ } else {
+
+ // It is assumed that the radio rejects packets with invalid length.
+ // Subtract the number of bytes in the frame overhead to get actual payload.
+
+ rxi.length = pHdr->packetLength - BASIC_RF_PACKET_OVERHEAD_SIZE;
+
+ #ifdef SECURITY_CCM
+ rxi.length -= (BASIC_RF_AUX_HDR_LENGTH + BASIC_RF_LEN_MIC);
+ authStatus = halRfReadRxBufSecure(&rxMpdu[1], pHdr->packetLength, rxi.length,
+ BASIC_RF_LEN_AUTH, BASIC_RF_SECURITY_M);
+ #else
+ halRfReadRxBuf(&rxMpdu[1], pHdr->packetLength);
+ #endif
+
+ // Make sure byte fields are changed from network to host byte order
+ UINT16_NTOH(pHdr->panId);
+ UINT16_NTOH(pHdr->destAddr);
+ UINT16_NTOH(pHdr->srcAddr);
+ #ifdef SECURITY_CCM
+ UINT32_NTOH(pHdr->frameCounter);
+ #endif
+
+ rxi.ackRequest = !!(pHdr->fcf0 & BASIC_RF_FCF_ACK_BM_L);
+
+ // Read the source address
+ rxi.srcAddr= pHdr->srcAddr;
+
+ // Read the packet payload
+ rxi.pPayload = rxMpdu + BASIC_RF_HDR_SIZE;
+
+ // Read the FCS to get the RSSI and CRC
+ pStatusWord= rxi.pPayload+rxi.length;
+ #ifdef SECURITY_CCM
+ pStatusWord+= BASIC_RF_LEN_MIC;
+ #endif
+ rxi.rssi = pStatusWord[0];
+
+ // Notify the application about the received data packet if the CRC is OK
+ // Throw packet if the previous packet had the same sequence number
+ if( (pStatusWord[1] & BASIC_RF_CRC_OK_BM) && (rxi.seqNumber != pHdr->seqNumber) ) {
+ // If security is used check also that authentication passed
+ #ifdef SECURITY_CCM
+ if( authStatus==SUCCESS ) {
+ if ( (pHdr->fcf0 & BASIC_RF_FCF_BM_L) ==
+ (BASIC_RF_FCF_NOACK_L | BASIC_RF_SEC_ENABLED_FCF_BM_L)) {
+ rxi.isReady = TRUE;
+ }
+ }
+ #else
+ if ( ((pHdr->fcf0 & (BASIC_RF_FCF_BM_L)) == BASIC_RF_FCF_NOACK_L) ) {
+ rxi.isReady = TRUE;
+ }
+ #endif
+ }
+ rxi.seqNumber = pHdr->seqNumber;
+ }
+
+ // Enable RX frame done interrupt again
+ halIntOff();
+ halRfEnableRxInterrupt();
+}
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn basicRfInit
+*
+* @brief Initialise basic RF datastructures. Sets channel, short address and
+* PAN id in the chip and configures interrupt on packet reception
+*
+* @param pRfConfig - pointer to BASIC_RF_CONFIG struct.
+* This struct must be allocated by higher layer
+* txState - file scope variable that keeps tx state info
+* rxi - file scope variable info extracted from the last incoming
+* frame
+*
+* @return none
+*/
+uint8 basicRfInit(basicRfCfg_t* pRfConfig)
+{
+ if (halRfInit()==FAILED)
+ return FAILED;
+
+ halIntOff();
+
+ // Set the protocol configuration
+ pConfig = pRfConfig;
+ rxi.pPayload = NULL;
+
+ txState.receiveOn = TRUE;
+ txState.frameCounter = 0;
+
+ // Set channel
+ halRfSetChannel(pConfig->channel);
+
+ // Write the short address and the PAN ID to the CC2520 RAM
+ halRfSetShortAddr(pConfig->myAddr);
+ halRfSetPanId(pConfig->panId);
+
+ // if security is enabled, write key and nonce
+ #ifdef SECURITY_CCM
+ basicRfSecurityInit(pConfig);
+ #endif
+
+ // Set up receive interrupt (received data or acknowlegment)
+ halRfRxInterruptConfig(basicRfRxFrmDoneIsr);
+
+ halIntOn();
+
+ return SUCCESS;
+}
+
+
+/***********************************************************************************
+* @fn basicRfSendPacket
+*
+* @brief Send packet
+*
+* @param destAddr - destination short address
+* pPayload - pointer to payload buffer. This buffer must be
+* allocated by higher layer.
+* length - length of payload
+* txState - file scope variable that keeps tx state info
+* mpdu - file scope variable. Buffer for the frame to send
+*
+* @return basicRFStatus_t - SUCCESS or FAILED
+*/
+uint8 basicRfSendPacket(uint16 destAddr, uint8* pPayload, uint8 length)
+{
+ uint8 mpduLength;
+ uint8 status;
+
+ // Turn on receiver if its not on
+ if(!txState.receiveOn) {
+ halRfReceiveOn();
+ }
+
+ // Check packet length
+ length = min(length, BASIC_RF_MAX_PAYLOAD_SIZE);
+
+ // Wait until the transceiver is idle
+ halRfWaitTransceiverReady();
+
+ // Turn off RX frame done interrupt to avoid interference on the SPI interface
+ halRfDisableRxInterrupt();
+
+ mpduLength = basicRfBuildMpdu(destAddr, pPayload, length);
+
+ #ifdef SECURITY_CCM
+ halRfWriteTxBufSecure(txMpdu, mpduLength, length, BASIC_RF_LEN_AUTH, BASIC_RF_SECURITY_M);
+ txState.frameCounter++; // Increment frame counter field
+ #else
+ halRfWriteTxBuf(txMpdu, mpduLength);
+ #endif
+
+ // Turn on RX frame done interrupt for ACK reception
+ halRfEnableRxInterrupt();
+
+ // Send frame with CCA. return FAILED if not successful
+ if(halRfTransmit() != SUCCESS) {
+ status = FAILED;
+ }
+
+ // Wait for the acknowledge to be received, if any
+ if (pConfig->ackRequest) {
+ txState.ackReceived = FALSE;
+
+ // We'll enter RX automatically, so just wait until we can be sure that the ack reception should have finished
+ // The timeout consists of a 12-symbol turnaround time, the ack packet duration, and a small margin
+ halMcuWaitUs((12 * BASIC_RF_SYMBOL_DURATION) + (BASIC_RF_ACK_DURATION) + (2 * BASIC_RF_SYMBOL_DURATION) + 10);
+
+ // If an acknowledgment has been received (by RxFrmDoneIsr), the ackReceived flag should be set
+ status = txState.ackReceived ? SUCCESS : FAILED;
+
+ } else {
+ status = SUCCESS;
+ }
+
+ // Turn off the receiver if it should not continue to be enabled
+ if (!txState.receiveOn) {
+ halRfReceiveOff();
+ }
+
+ if(status == SUCCESS) {
+ txState.txSeqNumber++;
+ }
+
+#ifdef SECURITY_CCM
+ halRfIncNonceTx(); // Increment nonce value
+#endif
+
+ return status;
+
+}
+
+
+/***********************************************************************************
+* @fn basicRfPacketIsReady
+*
+* @brief Check if a new packet is ready to be read by next higher layer
+*
+* @param none
+*
+* @return uint8 - TRUE if a packet is ready to be read by higher layer
+*/
+uint8 basicRfPacketIsReady(void)
+{
+ return rxi.isReady;
+}
+
+
+/**********************************************************************************
+* @fn basicRfReceive
+*
+* @brief Copies the payload of the last incoming packet into a buffer
+*
+* @param pRxData - pointer to data buffer to fill. This buffer must be
+* allocated by higher layer.
+* len - Number of bytes to read in to buffer
+* rxi - file scope variable holding the information of the last
+* incoming packet
+*
+* @return uint8 - number of bytes actually copied into buffer
+*/
+uint8 basicRfReceive(uint8* pRxData, uint8 len, int16* pRssi)
+{
+ // Accessing shared variables -> this is a critical region
+ // Critical region start
+ halIntOff();
+ memcpy(pRxData, rxi.pPayload, min(rxi.length, len));
+ if(pRssi != NULL) {
+ if(rxi.rssi < 128){
+ *pRssi = rxi.rssi - halRfGetRssiOffset();
+ }
+ else{
+ *pRssi = (rxi.rssi - 256) - halRfGetRssiOffset();
+ }
+ }
+ rxi.isReady = FALSE;
+ halIntOn();
+
+ // Critical region end
+
+ return min(rxi.length, len);
+}
+
+
+/**********************************************************************************
+* @fn basicRfGetRssi
+*
+* @brief Copies the payload of the last incoming packet into a buffer
+*
+* @param none
+
+* @return int8 - RSSI value
+*/
+int8 basicRfGetRssi(void)
+{
+ if(rxi.rssi < 128){
+ return rxi.rssi - halRfGetRssiOffset();
+ }
+ else{
+ return (rxi.rssi - 256) - halRfGetRssiOffset();
+ }
+}
+
+/***********************************************************************************
+* @fn basicRfReceiveOn
+*
+* @brief Turns on receiver on radio
+*
+* @param txState - file scope variable
+*
+* @return none
+*/
+void basicRfReceiveOn(void)
+{
+ txState.receiveOn = TRUE;
+ halRfReceiveOn();
+}
+
+
+/***********************************************************************************
+* @fn basicRfReceiveOff
+*
+* @brief Turns off receiver on radio
+*
+* @param txState - file scope variable
+*
+* @return none
+*/
+void basicRfReceiveOff(void)
+{
+ txState.receiveOn = FALSE;
+ halRfReceiveOff();
+}
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
diff --git a/CC2530 BasicRF/source/components/basicrf/basic_rf.h b/CC2530 BasicRF/source/components/basicrf/basic_rf.h
new file mode 100644
index 0000000..ee55dce
--- /dev/null
+++ b/CC2530 BasicRF/source/components/basicrf/basic_rf.h
@@ -0,0 +1,113 @@
+/***********************************************************************************
+ Filename: basic_rf.h
+
+ Description: Basic RF library header file
+
+***********************************************************************************/
+#ifndef BASIC_RF_H
+#define BASIC_RF_H
+
+/***********************************************************************************
+ The "Basic RF" library contains simple functions for packet transmission and
+ reception with the IEEE 802.15.4 compliant radio devices. The intention of this
+ library is to demonstrate how the radio devices are operated, and not to provide
+ a complete and fully-functional packet protocol. The protocol uses 802.15.4 MAC compliant data
+ and acknowledgment packets, however it contains only a small subset of the
+ 802.15.4 standard:
+ - Association, scanning nor beacons are not implemented
+ - No defined coordinator/device roles (peer-to-peer, all nodes are equal)
+ - Waits for the channel to become ready, but does not check CCA twice
+ (802.15.4 CSMA-CA)
+ - Does not retransmit packets
+
+ INSTRUCTIONS:
+ Startup:
+ 1. Create a basicRfCfg_t structure, and initialize the members:
+ 2. Call basicRfInit() to initialize the packet protocol.
+
+ Transmission:
+ 1. Create a buffer with the payload to send
+ 2. Call basicRfSendPacket()
+
+ Reception:
+ 1. Check if a packet is ready to be received by highger layer with
+ basicRfPacketIsReady()
+ 2. Call basicRfReceive() to receive the packet by higher layer
+
+ FRAME FORMATS:
+ Data packets (without security):
+ [Preambles (4)][SFD (1)][Length (1)][Frame control field (2)]
+ [Sequence number (1)][PAN ID (2)][Dest. address (2)][Source address (2)]
+ [Payload (Length - 2+1+2+2+2)][Frame check sequence (2)]
+
+ Acknowledgment packets:
+ [Preambles (4)][SFD (1)][Length = 5 (1)][Frame control field (2)]
+ [Sequence number (1)][Frame check sequence (2)]
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_defs.h"
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+
+typedef struct {
+ uint16 myAddr;
+ uint16 panId;
+ uint8 channel;
+ uint8 ackRequest;
+ #ifdef SECURITY_CCM
+ uint8* securityKey;
+ uint8* securityNonce;
+ #endif
+} basicRfCfg_t;
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+uint8 basicRfInit(basicRfCfg_t* pRfConfig);
+uint8 basicRfSendPacket(uint16 destAddr, uint8* pPayload, uint8 length);
+uint8 basicRfPacketIsReady(void);
+int8 basicRfGetRssi(void);
+uint8 basicRfReceive(uint8* pRxData, uint8 len, int16* pRssi);
+void basicRfReceiveOn(void);
+void basicRfReceiveOff(void);
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
+
diff --git a/CC2530 BasicRF/source/components/basicrf/basic_rf_security.c b/CC2530 BasicRF/source/components/basicrf/basic_rf_security.c
new file mode 100644
index 0000000..9398556
--- /dev/null
+++ b/CC2530 BasicRF/source/components/basicrf/basic_rf_security.c
@@ -0,0 +1,104 @@
+/***********************************************************************************
+
+ Filename: basic_rf_security.c
+
+ Description: Basic RF security library
+
+***********************************************************************************/
+
+#ifdef SECURITY_CCM
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "basic_rf_security.h"
+#include "hal_rf_security.h"
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+#define FLAG_FIELD 0x09
+#define NONCE_SIZE 16
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+
+static uint8 nonceTx[NONCE_SIZE];
+static uint8 nonceRx[NONCE_SIZE];
+
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn basicRfSecurityInit
+*
+* @brief Initialise key and nonces and write to radio
+*
+* @param pConfig - file scope variable holding configuration data for
+* basic RF
+*
+* @return none
+*/
+void basicRfSecurityInit(basicRfCfg_t* pConfig)
+{
+ uint8 i;
+
+ // Initialise nonce bytes to 0
+ for(i=0;imyAddr;
+ nonceTx[7] = (uint8)(pConfig->myAddr>>8);
+
+ // Set Security mode field of nonces (Byte 13)
+ nonceRx[13] = SECURITY_CONTROL;
+ nonceTx[13] = SECURITY_CONTROL;
+
+ halRfSecurityInit(pConfig->securityKey, nonceRx, nonceTx);
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/basicrf/basic_rf_security.h b/CC2530 BasicRF/source/components/basicrf/basic_rf_security.h
new file mode 100644
index 0000000..436b15e
--- /dev/null
+++ b/CC2530 BasicRF/source/components/basicrf/basic_rf_security.h
@@ -0,0 +1,62 @@
+/***********************************************************************************
+
+ Filename: basic_rf_security.h
+
+ Description: Basic RF security library header file
+
+***********************************************************************************/
+
+#ifndef BASIC_RF_SEC_H
+#define BASIC_RF_SEC_H
+
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include
+#include "basic_rf.h"
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+void basicRfSecurityInit(basicRfCfg_t* pConfig);
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
+
diff --git a/CC2530 BasicRF/source/components/common/basic_rf.r51 b/CC2530 BasicRF/source/components/common/basic_rf.r51
new file mode 100644
index 0000000..4a4159d
Binary files /dev/null and b/CC2530 BasicRF/source/components/common/basic_rf.r51 differ
diff --git a/CC2530 BasicRF/source/components/common/cc8051/hal_cc8051.h b/CC2530 BasicRF/source/components/common/cc8051/hal_cc8051.h
new file mode 100644
index 0000000..7190c56
--- /dev/null
+++ b/CC2530 BasicRF/source/components/common/cc8051/hal_cc8051.h
@@ -0,0 +1,122 @@
+/******************************************************************************
+ Filename: hal_cc8051.h
+
+ Copyright 2007 Texas Instruments, Inc.
+******************************************************************************/
+
+#ifndef HAL_CC8051_H
+#define HAL_CC8051_H
+
+/******************************************************************************
+ * INCLUDES
+ */
+
+#include
+#include
+
+
+/******************************************************************************
+ * CONSTANTS
+ */
+#define BIT0 0x01
+#define BIT1 0x02
+#define BIT2 0x04
+#define BIT3 0x08
+#define BIT4 0x10
+#define BIT5 0x20
+#define BIT6 0x40
+#define BIT7 0x80
+
+
+/******************************************************************************
+ * MACROS
+ */
+
+#define MCU_IO_TRISTATE 1 // Used as "func" for the macros below
+#define MCU_IO_PULLUP 2
+#define MCU_IO_PULLDOWN 3
+
+
+//-----------------------------------------------------------------------------
+// Macros for simple configuration of IO pins on TI LPW SoCs
+//-----------------------------------------------------------------------------
+#define MCU_IO_PERIPHERAL(port, pin) MCU_IO_PERIPHERAL_PREP(port, pin)
+#define MCU_IO_INPUT(port, pin, func) MCU_IO_INPUT_PREP(port, pin, func)
+#define MCU_IO_OUTPUT(port, pin, val) MCU_IO_OUTPUT_PREP(port, pin, val)
+#define MCU_IO_SET(port, pin, val) MCU_IO_SET_PREP(port, pin, val)
+#define MCU_IO_SET_HIGH(port, pin) MCU_IO_SET_HIGH_PREP(port, pin)
+#define MCU_IO_SET_LOW(port, pin) MCU_IO_SET_LOW_PREP(port, pin)
+#define MCU_IO_TGL(port, pin) MCU_IO_TGL_PREP(port, pin)
+#define MCU_IO_GET(port, pin) MCU_IO_GET_PREP(port, pin)
+
+#define MCU_IO_DIR_INPUT(port, pin) MCU_IO_DIR_INPUT_PREP(port, pin)
+#define MCU_IO_DIR_OUTPUT(port, pin) MCU_IO_DIR_OUTPUT_PREP(port, pin)
+
+
+//----------------------------------------------------------------------------------
+// Macros for internal use (the macros above need a new round in the preprocessor)
+//----------------------------------------------------------------------------------
+#define MCU_IO_PERIPHERAL_PREP(port, pin) st( P##port##SEL |= BM(pin); )
+
+#define MCU_IO_INPUT_PREP(port, pin, func) st( P##port##SEL &= ~BM(pin); \
+ P##port##DIR &= ~BM(pin); \
+ switch (func) { \
+ case MCU_IO_PULLUP: \
+ P##port##INP &= ~BM(pin); \
+ P2INP &= ~BM(port + 5); \
+ break; \
+ case MCU_IO_PULLDOWN: \
+ P##port##INP &= ~BM(pin); \
+ P2INP |= BM(port + 5); \
+ break; \
+ default: \
+ P##port##INP |= BM(pin); \
+ break; } )
+
+#define MCU_IO_OUTPUT_PREP(port, pin, val) st( P##port##SEL &= ~BM(pin); \
+ P##port##_##pin## = val; \
+ P##port##DIR |= BM(pin); )
+
+#define MCU_IO_SET_HIGH_PREP(port, pin) st( P##port##_##pin## = 1; )
+#define MCU_IO_SET_LOW_PREP(port, pin) st( P##port##_##pin## = 0; )
+
+#define MCU_IO_SET_PREP(port, pin, val) st( P##port##_##pin## = val; )
+#define MCU_IO_TGL_PREP(port, pin) st( P##port##_##pin## ^= 1; )
+#define MCU_IO_GET_PREP(port, pin) (P##port## & BM(pin))
+
+#define MCU_IO_DIR_INPUT_PREP(port, pin) st( P##port##DIR &= ~BM(pin); )
+#define MCU_IO_DIR_OUTPUT_PREP(port, pin) st( P##port##DIR |= BM(pin); )
+
+
+/****************************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+#endif
diff --git a/CC2530 BasicRF/source/components/common/hal_defs.h b/CC2530 BasicRF/source/components/common/hal_defs.h
new file mode 100644
index 0000000..62bb0a2
--- /dev/null
+++ b/CC2530 BasicRF/source/components/common/hal_defs.h
@@ -0,0 +1,189 @@
+/***********************************************************************************
+ Filename: hal_defs.h
+
+ Description: HAL defines
+
+***********************************************************************************/
+
+#ifndef HAL_DEFS_H
+#define HAL_DEFS_H
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+#ifndef TRUE
+#define TRUE 1
+#else
+#ifdef __IAR_SYSTEMS_ICC__
+#warning "Macro TRUE already defined"
+#endif
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#else
+#ifdef __IAR_SYSTEMS_ICC__
+#warning "Macro FALSE already defined"
+#endif
+#endif
+
+#ifndef NULL
+#define NULL (void *)0
+#else
+#ifdef __IAR_SYSTEMS_ICC__
+#warning "Macro NULL already defined"
+#endif
+#endif
+
+#ifndef SUCCESS
+#define SUCCESS 0
+#else
+#warning "Macro SUCCESS already defined"
+#endif
+
+#ifndef FAILED
+#ifndef WIN32
+#define FAILED 1
+#endif
+#else
+#ifdef __IAR_SYSTEMS_ICC__
+#warning "Macro FAILED already defined"
+#endif
+#endif
+
+/***********************************************************************************
+* MACROS
+*/
+
+#ifndef BV
+#define BV(n) (1 << (n))
+#endif
+
+#ifndef BM
+#define BM(n) (1 << (n))
+#endif
+
+#ifndef BF
+#define BF(x,b,s) (((x) & (b)) >> (s))
+#endif
+
+#ifndef MIN
+#define MIN(n,m) (((n) < (m)) ? (n) : (m))
+#endif
+
+#ifndef MAX
+#define MAX(n,m) (((n) < (m)) ? (m) : (n))
+#endif
+
+#ifndef ABS
+#define ABS(n) (((n) < 0) ? -(n) : (n))
+#endif
+
+
+/* uint32 processing */
+#define BREAK_UINT32( var, ByteNum ) \
+ (uint8)((uint32)(((var) >>((ByteNum) * 8)) & 0x00FF))
+
+#define BUILD_UINT32(Byte0, Byte1, Byte2, Byte3) \
+ ((uint32)((uint32)((Byte0) & 0x00FF) \
+ + ((uint32)((Byte1) & 0x00FF) << 8) \
+ + ((uint32)((Byte2) & 0x00FF) << 16) \
+ + ((uint32)((Byte3) & 0x00FF) << 24)))
+
+#define HI_UINT32(a) ((uint16) (((uint32)(a)) >> 16))
+#define LO_UINT32(a) ((uint16) ((uint32)(a)))
+
+
+/* uint16 processing */
+#define BUILD_UINT16(loByte, hiByte) \
+ ((uint16)(((loByte) & 0x00FF) + (((hiByte) & 0x00FF) << 8)))
+
+#define HI_UINT16(a) (((uint16)(a) >> 8) & 0xFF)
+#define LO_UINT16(a) ((uint16)(a) & 0xFF)
+
+
+/* uint16 processing */
+#define BUILD_UINT8(hiByte, loByte) \
+ ((uint8)(((loByte) & 0x0F) + (((hiByte) & 0x0F) << 4)))
+
+#define HI_UINT8(a) (((uint8)(a) >> 4) & 0x0F)
+#define LO_UINT8(a) ((uint8)(a) & 0x0F)
+
+/***********************************************************************************
+ * Host to network byte order macros
+ */
+#ifdef BIG_ENDIAN
+#define UINT16_HTON(x) st( utilReverseBuf((uint8*)&x, sizeof(uint16)); )
+#define UINT16_NTOH(x) st( utilReverseBuf((uint8*)&x, sizeof(uint16)); )
+
+#define UINT32_HTON(x) st( utilReverseBuf((uint8*)&x, sizeof(uint32)); )
+#define UINT32_NTOH(x) st( utilReverseBuf((uint8*)&x, sizeof(uint32)); )
+#else
+#define UINT16_HTON(x)
+#define UINT16_NTOH(x)
+
+#define UINT32_HTON(x)
+#define UINT32_NTOH(x)
+#endif
+
+
+/*
+* This macro is for use by other macros to form a fully valid C statement.
+* Without this, the if/else conditionals could show unexpected behavior.
+*
+* For example, use...
+* #define SET_REGS() st( ioreg1 = 0; ioreg2 = 0; )
+* instead of ...
+* #define SET_REGS() { ioreg1 = 0; ioreg2 = 0; }
+* or
+* #define SET_REGS() ioreg1 = 0; ioreg2 = 0;
+* The last macro would not behave as expected in the if/else construct.
+* The second to last macro will cause a compiler error in certain uses
+* of if/else construct
+*
+* It is not necessary, or recommended, to use this macro where there is
+* already a valid C statement. For example, the following is redundant...
+* #define CALL_FUNC() st( func(); )
+* This should simply be...
+* #define CALL_FUNC() func()
+*
+* (The while condition below evaluates false without generating a
+* constant-controlling-loop type of warning on most compilers.)
+*/
+#define st(x) do { x } while (__LINE__ == -1)
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/common/hal_int.c b/CC2530 BasicRF/source/components/common/hal_int.c
new file mode 100644
index 0000000..082e38e
--- /dev/null
+++ b/CC2530 BasicRF/source/components/common/hal_int.c
@@ -0,0 +1,115 @@
+/***********************************************************************************
+ Filename: hal_int.c
+
+ Description: HAL interrupt control
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_defs.h"
+#include "hal_int.h"
+#include "hal_board.h"
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn halIntOn
+*
+* @brief Enable global interrupts.
+*
+* @param none
+*
+* @return none
+*/
+void halIntOn(void)
+{
+ HAL_INT_ON();
+}
+
+
+/***********************************************************************************
+* @fn halIntOff
+*
+* @brief Turns global interrupts off.
+*
+* @param none
+*
+* @return none
+*/
+void halIntOff(void)
+{
+ HAL_INT_OFF();
+}
+
+
+/***********************************************************************************
+* @fn halIntLock
+*
+* @brief Turns global interrupts off and returns current interrupt state.
+* Should always be used together with halIntUnlock().
+*
+* @param none
+*
+* @return uint16 - current interrupt state
+*/
+uint16 halIntLock(void)
+{
+ istate_t key;
+ HAL_INT_LOCK(key);
+ return(key);
+}
+
+
+/***********************************************************************************
+* @fn halIntUnlock
+*
+* @brief Set interrupt state back to the state it had before calling halIntLock().
+* Should always be used together with halIntLock().
+*
+* @param key
+*
+* @return none
+*/
+void halIntUnlock(uint16 key)
+{
+ HAL_INT_UNLOCK(key);
+}
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
diff --git a/CC2530 BasicRF/source/components/common/hal_types.h b/CC2530 BasicRF/source/components/common/hal_types.h
new file mode 100644
index 0000000..773cfe8
--- /dev/null
+++ b/CC2530 BasicRF/source/components/common/hal_types.h
@@ -0,0 +1,188 @@
+/***********************************************************************************
+ Filename: hal_types.h
+
+ Description: HAL type definitions
+
+***********************************************************************************/
+
+#ifndef HAL_TYPES_H
+#define HAL_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+/***********************************************************************************
+ * TYPEDEFS
+ */
+
+typedef signed char int8;
+typedef unsigned char uint8;
+
+typedef signed short int16;
+typedef unsigned short uint16;
+
+typedef signed long int32;
+typedef unsigned long uint32;
+
+
+typedef void (*ISR_FUNC_PTR)(void);
+typedef void (*VFPTR)(void);
+
+
+/***********************************************************************************
+ * Compiler abstraction
+ */
+
+/*****************************************************
+ * IAR MSP430
+ */
+#ifdef __IAR_SYSTEMS_ICC__
+
+#define _PRAGMA(x) _Pragma(#x)
+
+#if defined __ICC430__
+
+#ifndef CODE
+#define CODE
+#endif
+#ifndef XDATA
+#define XDATA
+#endif
+#define FAR
+#define NOP() asm("NOP")
+
+#define HAL_ISR_FUNC_DECLARATION(f,v) \
+ _PRAGMA(vector=v##_VECTOR) __interrupt void f(void)
+#define HAL_ISR_FUNC_PROTOTYPE(f,v) \
+ _PRAGMA(vector=v##_VECTOR) __interrupt void f(void)
+#define HAL_ISR_FUNCTION(f,v) \
+ HAL_ISR_FUNC_PROTOTYPE(f,v); HAL_ISR_FUNC_DECLARATION(f,v)
+
+
+/*****************************************************
+ * IAR 8051
+ */
+#elif defined __ICC8051__
+
+#ifndef BSP_H
+#define CODE __code
+#define XDATA __xdata
+#endif
+
+#define FAR
+#define NOP() asm("NOP")
+
+#define HAL_MCU_LITTLE_ENDIAN() __LITTLE_ENDIAN__
+#define HAL_ISR_FUNC_DECLARATION(f,v) \
+ _PRAGMA(vector=v) __near_func __interrupt void f(void)
+#define HAL_ISR_FUNC_PROTOTYPE(f,v) \
+ _PRAGMA(vector=v) __near_func __interrupt void f(void)
+#define HAL_ISR_FUNCTION(f,v) \
+ HAL_ISR_FUNC_PROTOTYPE(f,v); HAL_ISR_FUNC_DECLARATION(f,v)
+
+#else
+#error "Unsupported architecture"
+#endif
+
+
+/*****************************************************
+ * KEIL 8051
+ */
+#elif defined __KEIL__
+#include
+#define BIG_ENDIAN
+
+#define CODE code
+#define XDATA xdata
+#define FAR
+#define NOP() _nop_()
+
+#define HAL_ISR_FUNC_DECLARATION(f,v) \
+ void f(void) interrupt v
+#define HAL_ISR_FUNC_PROTOTYPE(f,v) \
+ void f(void)
+#define HAL_ISR_FUNCTION(f,v) \
+ HAL_ISR_FUNC_PROTOTYPE(f,v); HAL_ISR_FUNC_DECLARATION(f,v)
+
+typedef unsigned short istate_t;
+
+// Keil workaround
+#define __code code
+#define __xdata xdata
+
+
+/*****************************************************
+ * WIN32
+ */
+#elif defined WIN32
+
+#define CODE
+#define XDATA
+#include "windows.h"
+#define FAR far
+#pragma warning (disable :4761)
+
+
+/*****************************************************
+ * Code Composer Essential
+ */
+
+#elif __TI_COMPILER_VERSION__
+#define CODE
+#define XDATA
+#define FAR
+
+typedef unsigned short istate_t;
+
+
+/*****************************************************
+ * Other compilers
+ */
+#else
+#error "Unsupported compiler"
+#endif
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+/***********************************************************************************
+ Copyright 2007-2008 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/common/hal_uart.c b/CC2530 BasicRF/source/components/common/hal_uart.c
new file mode 100644
index 0000000..571177a
--- /dev/null
+++ b/CC2530 BasicRF/source/components/common/hal_uart.c
@@ -0,0 +1,287 @@
+//-------------------------------------------------------------------
+// Filename: hal_uart.c
+// Description: This file contains the interface to the H/W UART driver.
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+// INCLUDES
+//-------------------------------------------------------------------
+#include "hal_defs.h"
+#include "hal_board.h"
+#include "hal_uart.h"
+
+//-------------------------------------------------------------------
+// MACROS
+//-------------------------------------------------------------------
+#define HAL_UART_ISR_RX_AVAIL() \
+(uartCfg.rxTail >= uartCfg.rxHead) ? \
+(uartCfg.rxTail - uartCfg.rxHead) : \
+(HAL_UART_ISR_RX_MAX - uartCfg.rxHead + uartCfg.rxTail)
+
+#define HAL_UART_ISR_TX_AVAIL() \
+(uartCfg.txHead > uartCfg.txTail) ? \
+(uartCfg.txHead - uartCfg.txTail - 1) : \
+(HAL_UART_ISR_TX_MAX - uartCfg.txTail + uartCfg.txHead - 1)
+
+//-------------------------------------------------------------------
+// TYPEDEFS
+//-------------------------------------------------------------------
+// U0CSR - USART Control and Status Register.
+#define CSR_MODE 0x80
+#define CSR_RE 0x40
+#define CSR_SLAVE 0x20
+#define CSR_FE 0x10
+#define CSR_ERR 0x08
+#define CSR_RX_BYTE 0x04
+#define CSR_TX_BYTE 0x02
+#define CSR_ACTIVE 0x01
+
+// U0UCR - USART UART Control Register.
+#define UCR_FLUSH 0x80
+#define UCR_FLOW 0x40
+#define UCR_D9 0x20
+#define UCR_BIT9 0x10
+#define UCR_PARITY 0x08
+#define UCR_SPB 0x04
+#define UCR_STOP 0x02
+#define UCR_START 0x01
+
+#define UTX0IE 0x04
+#define U0RX_TX 0x0C
+
+#define HAL_UART_PERCFG_BIT 0x01
+
+#define HAL_UART_ISR_RX_MAX 128
+#define HAL_UART_ISR_TX_MAX HAL_UART_ISR_RX_MAX
+
+typedef struct
+{
+ uint8 rxBuf[HAL_UART_ISR_RX_MAX];
+ uint8 rxHead;
+ volatile uint8 rxTail;
+ uint8 rxShdw;
+
+ uint8 txBuf[HAL_UART_ISR_TX_MAX];
+ volatile uint8 txHead;
+ uint8 txTail;
+ uint8 txMT;
+} uartCfg_t;
+
+//-------------------------------------------------------------------
+// LOCAL VARIABLES
+//-------------------------------------------------------------------
+uartCfg_t uartCfg;
+
+//-------------------------------------------------------------------
+// @fn halUartInit
+// @brief Initialize the UART
+// @param none
+// @return none
+//-------------------------------------------------------------------
+void halUartInit(uint32 baud)
+{
+ // UART Configuration
+ PERCFG &= ~HAL_UART_PERCFG_BIT; // Set UART0 I/O location to P0.
+
+ P0SEL |= U0RX_TX; // Enable Tx and Rx peripheral functions on pins.
+ ADCCFG &= ~U0RX_TX; // Make sure ADC doesnt use this.
+ U0CSR = CSR_MODE; // Mode is UART Mode.
+ U0UCR = UCR_FLUSH; // Flush it.
+
+ // Only supporting subset of baudrate for code size - other is possible.
+ // 38400
+ //U0BAUD = 59;
+ //U0GCR = 10;
+ // 9600
+ //U0BAUD = 59;
+ //U0GCR = 8;
+ //U0BAUD = value_u0baud;
+ //U0GCR = value_u0gcr;
+
+ switch(baud)
+ {
+ case 1200 :
+ U0BAUD = 59; U0GCR = 5; break;
+ case 2400 :
+ U0BAUD = 59; U0GCR = 6; break;
+ case 4800 :
+ U0BAUD = 59; U0GCR = 7; break;
+ case 9600 :
+ U0BAUD = 59; U0GCR = 8; break;
+ case 14400 :
+ U0BAUD = 216; U0GCR = 8; break;
+ case 19200 :
+ U0BAUD = 59; U0GCR = 9; break;
+ case 28800 :
+ U0BAUD = 216; U0GCR = 9; break;
+ case 38400 :
+ U0BAUD = 59; U0GCR = 10; break;
+ case 57600 :
+ U0BAUD = 216; U0GCR = 10; break;
+ case 76800 :
+ U0BAUD = 59; U0GCR = 11; break;
+ case 115200 :
+ U0BAUD = 216; U0GCR = 11; break;
+ case 230400 :
+ U0BAUD = 216; U0GCR = 12; break;
+ default :
+ U0BAUD = 59; U0GCR = 10; break;
+ }
+
+ // 8 bits/char; no parity; 1 stop bit; stop bit hi.
+ U0UCR = UCR_STOP;
+ U0CSR |= CSR_RE;
+ URX0IE = 1;
+ U0DBUF = 0; // Prime the ISR pump.
+
+ uartCfg.rxHead = 0;
+ uartCfg.rxTail = 0;
+ uartCfg.txHead = 0;
+ uartCfg.txTail = 0;
+ uartCfg.rxShdw = 0;
+ uartCfg.txMT = 0;
+
+}
+
+//-------------------------------------------------------------------
+// @fn halUartRead
+// @brief Read a buffer from the UART
+// @param buf - valid data buffer at least 'len' bytes in size
+// len - max length number of bytes to copy to 'buf'
+// @return length of buffer that was read
+//-------------------------------------------------------------------
+uint16 halUartRead(uint8 *buf, uint16 len)
+{
+ uint16 cnt = 0;
+
+ while ((uartCfg.rxHead != uartCfg.rxTail) && (cnt < len))
+ {
+ *buf++ = uartCfg.rxBuf[uartCfg.rxHead++];
+ if (uartCfg.rxHead >= HAL_UART_ISR_RX_MAX)
+ {
+ uartCfg.rxHead = 0;
+ }
+ cnt++;
+ }
+
+ return cnt;
+}
+
+//-------------------------------------------------------------------
+// @fn halUartWrite
+// @brief Write a buffer to the UART.
+// @param buf - pointer to the buffer that will be written, not freed
+// len - length of
+// @return length of the buffer that was sent
+//-------------------------------------------------------------------
+uint16 halUartWrite(uint8 *buf, uint16 len)
+{
+ uint16 cnt;
+
+ // Accept "all-or-none" on write request.
+ if (HAL_UART_ISR_TX_AVAIL() < len)
+ {
+ return 0;
+ }
+
+ for (cnt = 0; cnt < len; cnt++)
+ {
+ uartCfg.txBuf[uartCfg.txTail] = *buf++;
+ uartCfg.txMT = 0;
+
+ if (uartCfg.txTail >= HAL_UART_ISR_TX_MAX - 1)
+ {
+ uartCfg.txTail = 0;
+ }
+ else
+ {
+ uartCfg.txTail++;
+ }
+
+ // Keep re-enabling ISR as it might be keeping up with this loop due to other ints.
+ IEN2 |= UTX0IE;
+ }
+
+ return cnt;
+}
+
+//-------------------------------------------------------------------
+// @fn halUartRxLen()
+// @brief Calculate Rx Buffer length - the number of bytes in the buffer.
+// @param none
+// @return length of current Rx Buffer
+//-------------------------------------------------------------------
+uint16 halUartRxLen(void)
+{
+ return HAL_UART_ISR_RX_AVAIL();
+}
+
+//-------------------------------------------------------------------
+// @fn halUartSuspend
+// @brief Suspend UART hardware before entering PM mode 1, 2 or 3.
+// @param None
+// @return None
+//-------------------------------------------------------------------
+void halUartSuspend(void)
+{
+ U0CSR &= ~CSR_RE;
+}
+
+//-------------------------------------------------------------------
+// @fn halUartResume
+// @brief Resume UART hardware after exiting PM mode 1, 2 or 3.
+// @param None
+// @return None
+//-------------------------------------------------------------------
+void halUartResume(void)
+{
+ U0UCR |= UCR_FLUSH;
+ U0CSR |= CSR_RE;
+}
+
+//-------------------------------------------------------------------
+// @fn halUartRxIsr
+// @brief UART Receive Interrupt
+// @param None
+// @return None
+//-------------------------------------------------------------------
+HAL_ISR_FUNCTION(halUart0RxIsr, URX0_VECTOR)
+{
+ uint8 tmp = U0DBUF;
+ uartCfg.rxBuf[uartCfg.rxTail] = tmp;
+
+ // Re-sync the shadow on any 1st byte received.
+ if (uartCfg.rxHead == uartCfg.rxTail)
+ {
+ uartCfg.rxShdw = ST0;
+ }
+
+ if (++uartCfg.rxTail >= HAL_UART_ISR_RX_MAX)
+ {
+ uartCfg.rxTail = 0;
+ }
+}
+
+//-------------------------------------------------------------------
+// @fn halUartTxIsr
+// @brief UART Transmit Interrupt
+// @param None
+// @return None
+//-------------------------------------------------------------------
+HAL_ISR_FUNCTION(halUart0TxIsr, UTX0_VECTOR)
+{
+ if (uartCfg.txHead == uartCfg.txTail)
+ {
+ IEN2 &= ~UTX0IE;
+ uartCfg.txMT = 1;
+ }
+ else
+ {
+ UTX0IF = 0;
+ U0DBUF = uartCfg.txBuf[uartCfg.txHead++];
+
+ if (uartCfg.txHead >= HAL_UART_ISR_TX_MAX)
+ {
+ uartCfg.txHead = 0;
+ }
+ }
+}
diff --git a/CC2530 BasicRF/source/components/common/hal_uart.h b/CC2530 BasicRF/source/components/common/hal_uart.h
new file mode 100644
index 0000000..1dfea8c
--- /dev/null
+++ b/CC2530 BasicRF/source/components/common/hal_uart.h
@@ -0,0 +1,35 @@
+//-------------------------------------------------------------------
+// Filename: hal_uart.h
+// Description: hal UART library header file
+//-------------------------------------------------------------------
+//------------------------------------------------------------------
+
+//-------------------------------------------------------------------
+// Initialize UART at the startup
+//-------------------------------------------------------------------
+void halUartInit(uint32 baud);
+
+//-------------------------------------------------------------------
+// Read a buffer from the UART
+//-------------------------------------------------------------------
+extern uint16 halUartRead(uint8 *pBuffer, uint16 length);
+
+//-------------------------------------------------------------------
+// Write a buff to the uart
+//-------------------------------------------------------------------
+extern uint16 halUartWrite(uint8 *pBuffer, uint16 length);
+
+//-------------------------------------------------------------------
+// Return the number of bytes in the Rx buffer
+//-------------------------------------------------------------------
+extern uint16 halUartRxLen(void);
+
+//-------------------------------------------------------------------
+// Abort UART when entering sleep mode
+//-------------------------------------------------------------------
+extern void halUartSuspend(void);
+
+//-------------------------------------------------------------------
+// Resume UART after wakeup from sleep
+//-------------------------------------------------------------------
+extern void halUartResume(void);
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/adc.c b/CC2530 BasicRF/source/components/radios/cc2530/adc.c
new file mode 100644
index 0000000..fa6874b
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/adc.c
@@ -0,0 +1,87 @@
+/******************************************************************************
+ Filename: adc.c
+
+ These functions/macros simplifies usage of the ADC.
+
+******************************************************************************/
+
+#include "adc.h"
+
+
+/******************************************************************************
+* @fn adcSampleSingle
+*
+* @brief
+* This function makes the adc sample the given channel at the given
+* resolution with the given reference.
+*
+* @param uint8 reference
+* The reference to compare the channel to be sampled.
+* uint8 resolution
+* The resolution to use during the sample (8, 10, 12 or 14 bit)
+* uint8 input
+* The channel to be sampled.
+*
+* @return int16
+* The conversion result
+*
+******************************************************************************/
+int16 adcSampleSingle(uint8 reference, uint8 resolution, uint8 channel)
+{
+ int16 value;
+
+ ADC_ENABLE_CHANNEL(channel);
+
+ ADCIF = 0;
+ ADC_SINGLE_CONVERSION(reference | resolution | channel);
+ while(!ADCIF);
+
+ value = (ADCH << 8) & 0xff00;
+ value |= ADCL;
+
+ ADC_DISABLE_CHANNEL(channel);
+
+ // The variable 'value' contains 16 bits where
+ // bit 15 is a sign bit
+ // bit [14 .. 0] contain the absolute sample value
+ // Only the r upper bits are significant, where r is the resolution
+ // Resolution:
+ // 12 -> [14 .. 3] (bitmask 0x7FF8)
+ // 10 -> [14 .. 5] (bitmask 0x7FE0)
+ // 9 -> [14 .. 6] (bitmask 0x7FC0)
+ // 7 -> [14 .. 8] (bitmask 0x7F00)
+
+ return value;
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/adc.h b/CC2530 BasicRF/source/components/radios/cc2530/adc.h
new file mode 100644
index 0000000..a6c76a4
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/adc.h
@@ -0,0 +1,113 @@
+/******************************************************************************
+ Filename: adc.h
+
+ These functions/macros simplifies usage of the ADC.
+
+ Copyright 2007 Texas Instruments, Inc.
+******************************************************************************/
+
+#ifndef _ADC_H
+#define _ADC_H
+
+/*******************************************************************************
+ * INCLUDES
+ */
+
+#include
+#include
+
+// Include chip specific IO definition file
+#if (chip == 2530 || chip == 2531)
+#include
+#endif
+
+
+/*******************************************************************************
+ * CONSTANTS AND MACROS
+ */
+
+// Macro for setting up a single conversion. If ADCCON1.STSEL = 11, using this
+// macro will also start the conversion.
+#define ADC_SINGLE_CONVERSION(settings) st( ADCCON3 = (settings); )
+
+// Macro for setting up a single conversion
+#define ADC_SEQUENCE_SETUP(settings) st( ADCCON2 = (settings); )
+
+// Where _settings_ are the following:
+// Reference voltage:
+#define ADC_REF_1_25_V 0x00 // Internal 1.25V reference
+#define ADC_REF_P0_7 0x40 // External reference on AIN7 pin
+#define ADC_REF_AVDD 0x80 // AVDD_SOC pin
+#define ADC_REF_P0_6_P0_7 0xC0 // External reference on AIN6-AIN7 differential input
+
+// Resolution (decimation rate):
+#define ADC_7_BIT 0x00 // 64 decimation rate
+#define ADC_9_BIT 0x10 // 128 decimation rate
+#define ADC_10_BIT 0x20 // 256 decimation rate
+#define ADC_12_BIT 0x30 // 512 decimation rate
+
+// Input channel:
+#define ADC_AIN0 0x00 // single ended P0_0
+#define ADC_AIN1 0x01 // single ended P0_1
+#define ADC_AIN2 0x02 // single ended P0_2
+#define ADC_AIN3 0x03 // single ended P0_3
+#define ADC_AIN4 0x04 // single ended P0_4
+#define ADC_AIN5 0x05 // single ended P0_5
+#define ADC_AIN6 0x06 // single ended P0_6
+#define ADC_AIN7 0x07 // single ended P0_7
+#define ADC_GND 0x0C // Ground
+#define ADC_TEMP_SENS 0x0E // on-chip temperature sensor
+#define ADC_VDD_3 0x0F // (vdd/3)
+
+// Macro for starting the ADC in continuous conversion mode
+#define ADC_SAMPLE_CONTINUOUS() \
+ st( ADCCON1 &= ~0x30; \
+ ADCCON1 |= 0x10; )
+
+// Macro for stopping the ADC in continuous mode
+#define ADC_STOP() st( ADCCON1 |= 0x30; )
+
+// Macro for initiating a single sample in single-conversion mode (ADCCON1.STSEL = 11).
+#define ADC_SAMPLE_SINGLE() \
+ st( ADC_STOP(); \
+ ADCCON1 |= 0x40; )
+
+// Macro for configuring the ADC to be started from T1 channel 0. (T1 ch 0 must be in compare mode!!)
+#define ADC_TRIGGER_FROM_TIMER1() \
+ st( ADC_STOP(); \
+ ADCCON1 &= ~0x10; )
+
+// Expression indicating whether a conversion is finished or not.
+#define ADC_SAMPLE_READY() st( ADCCON1 & 0x80; )
+
+// Macro for setting/clearing a channel as input of the ADC
+#define ADC_ENABLE_CHANNEL(ch) ADCCFG |= (0x01 << ch)
+#define ADC_DISABLE_CHANNEL(ch) ADCCFG &= ~(0x01 << ch)
+
+
+// Macros for configuring the ADC input:
+// Example usage:
+// IO_ADC_PORT0_PIN(0, IO_ADC_EN);
+// IO_ADC_PORT0_PIN(4, IO_ADC_DIS);
+// IO_ADC_PORT0_PIN(6, IO_ADC_EN);
+
+#define IO_ADC_PORT0_PIN(pin, adcEn) \
+ st( if (adcEn) \
+ ADCCFG |= BM( pin ); \
+ else \
+ ADCCFG &= ~BM( pin ) )
+
+// where adcEn is one of:
+#define IO_ADC_EN 1 // ADC input enabled
+#define IO_ADC_DIS 0 // ADC input disab
+
+
+/*******************************************************************************
+ * PUBLIC FUNCTIONS
+ */
+
+int16 adcSampleSingle(uint8 reference, uint8 resolution, uint8 channel);
+
+
+/*****************************************************************************/
+#endif
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/clock.c b/CC2530 BasicRF/source/components/radios/cc2530/clock.c
new file mode 100644
index 0000000..8d91f8f
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/clock.c
@@ -0,0 +1,114 @@
+/******************************************************************************
+ Filename: clock.c
+
+ This file defines clock related functions for the CC253x family
+ of RF system-on-chips from Texas Instruments.
+
+******************************************************************************/
+
+/*******************************************************************************
+ * INCLUDES
+ */
+
+#include "clock.h"
+#include "hal_defs.h"
+#include "hal_mcu.h"
+
+/*******************************************************************************
+ * PUBLIC FUNCTIONS
+ */
+
+
+/******************************************************************************
+* @fn clockSetMainSrc
+*
+* @brief Function for setting the main system clock source.
+* The function turns off the clock source that is not being used.
+* TICKSPD is set to the same frequency as the source.
+*
+* @param uint8 source (one of CLOCK_SRC_HFRC or CLOCK_SRC_XOSC)
+*
+* @return void
+*
+******************************************************************************/
+void clockSetMainSrc(uint8 source)
+{
+ register uint8 osc32k_bm = CLKCONCMD & CLKCON_OSC32K_BM;
+
+ // Source can have the following values:
+ // CLOCK_SRC_XOSC 0x00 High speed Crystal Oscillator (XOSC)
+ // CLOCK_SRC_HFRC 0x01 Low power RC Oscillator (HFRC)
+
+ SLEEPCMD &= ~SLEEP_OSC_PD_BM; // power up both oscillators
+ while (!CC2530_IS_HFRC_STABLE() || ((SLEEPSTA & SLEEP_OSC_PD_BM)!=0));// wait until the oscillator is stable
+ NOP();
+
+ if (source == CLOCK_SRC_HFRC){
+ CLKCONCMD = (osc32k_bm | CLKCON_OSC_BM | TICKSPD_DIV_2 | CLKCON_CLKSPD_BM);
+ }
+ else if (source == CLOCK_SRC_XOSC){
+ CLKCONCMD = (osc32k_bm | TICKSPD_DIV_1);
+ }
+ CC2530_WAIT_CLK_UPDATE();
+ SLEEPCMD |= SLEEP_OSC_PD_BM; // power down the unused oscillator
+}
+
+/******************************************************************************
+* @fn clockSelect32k
+*
+* @brief Function for selecting source for the 32kHz oscillator
+*
+* @param uint8 source (one of CLOCK_32K_XTAL or CLOCK_32K_RCOSC)
+*
+* @return uint8 - SUCCESS or FAILED
+*
+******************************************************************************/
+uint8 clockSelect32k(uint8 source)
+{
+ // System clock source must be high frequency RC oscillator before
+ // changing 32K source.
+ if( !(CLKCONSTA & CLKCON_OSC_BM) )
+ return FAILED;
+
+ if (source == CLOCK_32K_XTAL){
+ CLKCONCMD &= ~CLKCON_OSC32K_BM;
+ }
+ else if (source == CLOCK_32K_RCOSC){
+ CLKCONCMD |= CLKCON_OSC32K_BM;
+ }
+ CC2530_WAIT_CLK_UPDATE();
+
+ return SUCCESS;
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/clock.h b/CC2530 BasicRF/source/components/radios/cc2530/clock.h
new file mode 100644
index 0000000..8d740e0
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/clock.h
@@ -0,0 +1,108 @@
+/******************************************************************************
+ Filename: clock.h
+
+ This file defines interface for clock related functions for the
+ CC253x family of RF system-on-chips from Texas Instruments.
+
+******************************************************************************/
+#ifndef _CLOCK_H
+#define _CLOCK_H
+
+
+/*******************************************************************************
+ * INCLUDES
+ */
+
+#include
+#include
+
+// Include chip specific IO definition file
+#if (chip == 2530 || chip == 2531)
+#include
+#endif
+
+
+
+/*******************************************************************************
+ * CONSTANTS
+ */
+
+/* SEE DATA SHEET FOR DETAILS ABOUT THE FOLLOWING BIT MASKS */
+
+// Parameters for cc2530ClockSetMainSrc
+#define CLOCK_SRC_XOSC 0 // High speed Crystal Oscillator Control
+#define CLOCK_SRC_HFRC 1 // Low power RC Oscillator
+
+// Parameters for cc2530ClockSelect32k
+#define CLOCK_32K_XTAL 0 // 32.768 Hz crystal oscillator
+#define CLOCK_32K_RCOSC 1 // 32 kHz RC oscillator
+
+// Bit masks to check CLKCON register
+#define CLKCON_OSC32K_BM 0x80 // bit mask, for the slow 32k clock oscillator
+#define CLKCON_OSC_BM 0x40 // bit mask, for the system clock oscillator
+#define CLKCON_TICKSPD_BM 0x38 // bit mask, for timer ticks output setting
+#define CLKCON_CLKSPD_BM 0x01 // bit maks, for the clock speed
+
+#define TICKSPD_DIV_1 (0x00 << 3)
+#define TICKSPD_DIV_2 (0x01 << 3)
+#define TICKSPD_DIV_4 (0x02 << 3)
+#define TICKSPD_DIV_8 (0x03 << 3)
+#define TICKSPD_DIV_16 (0x04 << 3)
+#define TICKSPD_DIV_32 (0x05 << 3)
+#define TICKSPD_DIV_64 (0x06 << 3)
+#define TICKSPD_DIV_128 (0x07 << 3)
+
+// Bit masks to check SLEEPSTA register
+#define SLEEP_XOSC_STB_BM 0x40 // bit mask, check the stability of XOSC
+#define SLEEP_HFRC_STB_BM 0x20 // bit maks, check the stability of the High-frequency RC oscillator
+#define SLEEP_OSC_PD_BM 0x04 // bit mask, power down system clock oscillator(s)
+
+
+/*******************************************************************************
+ * MACROS
+ */
+
+// Macro for checking status of the high frequency RC oscillator.
+#define CC2530_IS_HFRC_STABLE(x) (SLEEPSTA & SLEEP_HFRC_STB_BM)
+
+// Macro for checking status of the crystal oscillator
+#define CC2530_IS_XOSC_STABLE(x) (SLEEPSTA & SLEEP_XOSC_STB_BM)
+
+// Macro for getting the clock division factor
+#define CC2530_GET_CLKSPD(x) (CLKCONSTA & CLKCON_CLKSPD_BM)
+
+
+// Macro for getting the timer tick division factor.
+#define CC2530_GET_TICKSPD(x) ((CLKCONSTA & CLKCON_TICKSPD_BM) >> 3)
+
+// Macro for setting the clock division factor, x value from 0b000 to 0b111
+#define CC2530_SET_TICKSPD(x) st( CLKCONCMD = ((((x) << 3) & 0x38) \
+ | (CLKCONCMD & 0xC7)); \
+ )
+
+// Macro for setting the timer tick division factor, x value from 0b000 to 0b111
+#define CC2530_SET_CLKSPD(x) st( CLKCONCMD = (((x) & 0x07) \
+ | (CLKCONCMD & 0xF8)); \
+ )
+
+// Macro for waiting for clock updates
+#define CC2530_WAIT_CLK_UPDATE() st( uint8 ____clkcon; \
+ uint8 ____clkconsta; \
+ ____clkcon = CLKCONCMD; \
+ do { \
+ ____clkconsta = CLKCONSTA; \
+ } while (____clkconsta != ____clkcon); )
+
+
+
+
+/*******************************************************************************
+ * FUNCTIONS
+ */
+
+void clockSetMainSrc(uint8 source);
+uint8 clockSelect32k(uint8 source);
+
+
+/*****************************************************************************/
+#endif
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/hal_mcu.c b/CC2530 BasicRF/source/components/radios/cc2530/hal_mcu.c
new file mode 100644
index 0000000..1e73049
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/hal_mcu.c
@@ -0,0 +1,171 @@
+/***********************************************************************************
+ Filename: hal_mcu.c
+
+ Description:
+
+***********************************************************************************/
+
+#include
+#include
+
+#include "clock.h"
+#include "hal_defs.h"
+#include "hal_assert.h"
+
+/***********************************************************************************
+* @fn halMcuInit
+*
+* @brief Set Main Clock source to XOSC
+*
+* @param none
+*
+* @return none
+*/
+void halMcuInit(void)
+{
+ // if 32k clock change fails, set system clock to HF RC and try again
+ if(clockSelect32k(CLOCK_32K_XTAL) != SUCCESS) {
+ clockSetMainSrc(CLOCK_SRC_HFRC);
+ if(clockSelect32k(CLOCK_32K_XTAL) != SUCCESS) {
+ HAL_ASSERT(FALSE);
+ }
+ }
+ clockSetMainSrc(CLOCK_SRC_XOSC);
+}
+
+/***********************************************************************************
+* @fn halMcuWaitUs
+*
+* @brief Busy wait function. Waits the specified number of microseconds. Use
+* assumptions about number of clock cycles needed for the various
+* instructions. This function assumes a 32 MHz clock.
+*
+* NB! This function is highly dependent on architecture and compiler!
+*
+* @param uint16 usec - number of microseconds delays
+*
+* @return none
+*/
+#pragma optimize=none
+void halMcuWaitUs(uint16 usec)
+{
+ usec>>= 1;
+ while(usec--)
+ {
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ NOP();
+ }
+}
+/***********************************************************************************
+* @fn halMcuWaitMs
+*
+* @brief Busy wait function. Waits the specified number of milliseconds. Use
+* assumptions about number of clock cycles needed for the various
+* instructions.
+*
+* NB! This function is highly dependent on architecture and compiler!
+*
+* @param uint16 millisec - number of milliseconds delay
+*
+* @return none
+*/
+#pragma optimize=none
+void halMcuWaitMs(uint16 msec)
+{
+ while(msec--)
+ halMcuWaitUs(1000);
+}
+
+
+/***********************************************************************************
+* @fn halMcuSetLowPowerMode
+*
+* @brief Sets the MCU in a low power mode. Will turn global interrupts on at
+* the same time as entering the LPM mode. The MCU must be waken from
+* an interrupt (status register on stack must be modified).
+*
+* NB! This function is highly dependent on architecture and compiler!
+*
+* @param uint8 mode - power mode
+*
+* @return none
+*/
+void halMcuSetLowPowerMode(uint8 mode)
+{
+ // comment: not yet implemented
+// HAL_ASSERT(FALSE);
+}
+
+
+/******************************************************************************
+* @fn halMcuReset
+*
+* @brief
+* Resets the MCU. This utilize the watchdog timer as there is no other way
+* for a software reset. The reset will not occur until ~2 ms.
+* NB: The function will not return! (hangs until reset)
+*
+* Parameters:
+*
+* @param void
+*
+* @return void
+*
+******************************************************************************/
+void halMcuReset(void)
+{
+ const uint8 WDT_INTERVAL_MSEC_2= 0x03; // after ~2 ms
+
+ WDCTL = ((WDCTL & 0xFC) | (WDT_INTERVAL_MSEC_2 & 0x03));
+ // Start watchdog
+ WDCTL &= ~0x04; // Select watchdog mode
+ WDCTL |= 0x08; // Enable timer
+ while(1); // Halt here until reset
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/hal_rf.c b/CC2530 BasicRF/source/components/radios/cc2530/hal_rf.c
new file mode 100644
index 0000000..372e9d0
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/hal_rf.c
@@ -0,0 +1,655 @@
+/***********************************************************************************
+
+ Filename: hal_rf.c
+
+ Description: CC2530 radio interface.
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_board.h"
+#include "hal_mcu.h"
+#include "hal_int.h"
+#include "hal_assert.h"
+#include "hal_rf.h"
+#include "util.h"
+
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+// Chip revision
+#define REV_A 0x01
+#define CHIPREVISION REV_A
+
+// CC2530 RSSI Offset
+#define RSSI_OFFSET 73
+#define RSSI_OFFSET_LNA_HIGHGAIN 79
+#define RSSI_OFFSET_LNA_LOWGAIN 67
+
+// Various radio settings
+#define AUTO_ACK 0x20
+#define AUTO_CRC 0x40
+
+// TXPOWER values
+#if CC2530_PG1
+#define CC2530_TXPOWER_MIN_3_DBM 0x88
+#define CC2530_TXPOWER_0_DBM 0x32
+#define CC2530_TXPOWER_4_DBM 0xF7
+#else
+#define CC2530_TXPOWER_MIN_3_DBM 0xB5
+#define CC2530_TXPOWER_0_DBM 0xD5
+#define CC2530_TXPOWER_4_DBM 0xF5
+#endif
+
+// RF interrupt flags
+#define IRQ_TXDONE 0x02
+#define IRQ_RXPKTDONE 0x40
+
+// Selected strobes
+#define ISRXON() st(RFST = 0xE3;)
+#define ISTXON() st(RFST = 0xE9;)
+#define ISTXONCCA() st(RFST = 0xEA;)
+#define ISRFOFF() st(RFST = 0xEF;)
+#define ISFLUSHRX() st(RFST = 0xEC;)
+#define ISFLUSHTX() st(RFST = 0xEE;)
+
+// CC2590-CC2591 support
+#if INCLUDE_PA==2591
+
+// Support for PA/LNA
+#define HAL_PA_LNA_INIT()
+
+// Select CC2591 RX high gain mode
+#define HAL_PA_LNA_RX_HGM() st( uint8 i; P0_7 = 1; for (i=0; i<8; i++) asm("NOP"); )
+
+// Select CC2591 RX low gain mode
+#define HAL_PA_LNA_RX_LGM() st( uint8 i; P0_7 = 0; for (i=0; i<8; i++) asm("NOP"); )
+
+// TX power lookup index
+#define HAL_RF_TXPOWER_0_DBM 0
+#define HAL_RF_TXPOWER_13_DBM 1
+#define HAL_RF_TXPOWER_16_DBM 2
+#define HAL_RF_TXPOWER_18_DBM 3
+#define HAL_RF_TXPOWER_20_DBM 4
+
+// TX power values
+#define CC2530_91_TXPOWER_0_DBM 0x25
+#define CC2530_91_TXPOWER_13_DBM 0x85
+#define CC2530_91_TXPOWER_16_DBM 0xA5
+#define CC2530_91_TXPOWER_18_DBM 0xC5
+#define CC2530_91_TXPOWER_20_DBM 0xE5
+
+#else // dummy macros when not using CC2591
+
+#define HAL_PA_LNA_INIT()
+#define HAL_PA_LNA_RX_LGM()
+#define HAL_PA_LNA_RX_HGM()
+
+#define HAL_RF_TXPOWER_MIN_3_DBM 0
+#define HAL_RF_TXPOWER_0_DBM 1
+#define HAL_RF_TXPOWER_4_DBM 2
+
+#endif
+
+/***********************************************************************************
+* GLOBAL DATA
+*/
+#if INCLUDE_PA==2591
+static const menuItem_t pPowerSettings[] =
+{
+ "0dBm", HAL_RF_TXPOWER_0_DBM,
+ "13dBm", HAL_RF_TXPOWER_13_DBM,
+ "16dBm", HAL_RF_TXPOWER_16_DBM,
+ "18dBm", HAL_RF_TXPOWER_18_DBM,
+ "20dBm", HAL_RF_TXPOWER_20_DBM
+};
+#else
+static const menuItem_t pPowerSettings[] =
+{
+ "-3dBm", HAL_RF_TXPOWER_MIN_3_DBM,
+ "0dBm", HAL_RF_TXPOWER_0_DBM,
+ "4dBm", HAL_RF_TXPOWER_4_DBM
+};
+#endif
+
+const menu_t powerMenu =
+{
+ pPowerSettings,
+ N_ITEMS(pPowerSettings)
+};
+
+/***********************************************************************************
+* LOCAL DATA
+*/
+#ifndef MRFI
+static ISR_FUNC_PTR pfISR= NULL;
+#endif
+static uint8 rssiOffset = RSSI_OFFSET;
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+static void halPaLnaInit(void);
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn halRfInit
+*
+* @brief Power up, sets default tuning settings, enables autoack, enables random
+* generator.
+*
+* @param none
+*
+* @return SUCCESS always (for interface compatibility)
+*/
+uint8 halRfInit(void)
+{
+ // Enable auto ack and auto crc
+ FRMCTRL0 |= (AUTO_ACK | AUTO_CRC);
+
+ // Recommended RX settings
+ TXFILTCFG = 0x09;
+ AGCCTRL1 = 0x15;
+ FSCAL1 = 0x00;
+
+ // Enable random generator -> Not implemented yet
+
+ // Enable CC2591 with High Gain Mode
+ halPaLnaInit();
+
+ // Enable RX interrupt
+ halRfEnableRxInterrupt();
+
+ return SUCCESS;
+}
+
+
+
+/***********************************************************************************
+* @fn halRfGetChipId
+*
+* @brief Get chip id
+*
+* @param none
+*
+* @return uint8 - result
+*/
+uint8 halRfGetChipId(void)
+{
+ return CHIPID;
+}
+
+
+/***********************************************************************************
+* @fn halRfGetChipVer
+*
+* @brief Get chip version
+*
+* @param none
+*
+* @return uint8 - result
+*/
+uint8 halRfGetChipVer(void)
+{
+ // return major revision (4 upper bits)
+ return CHVER>>4;
+}
+
+/***********************************************************************************
+* @fn halRfGetRandomByte
+*
+* @brief Return random byte
+*
+* @param none
+*
+* @return uint8 - random byte
+*/
+uint8 halRfGetRandomByte(void)
+{
+ // Not yet implemented
+ HAL_ASSERT(FALSE);
+ return 0;
+}
+
+
+/***********************************************************************************
+* @fn halRfGetRssiOffset
+*
+* @brief Return RSSI Offset
+*
+* @param none
+*
+* @return uint8 - RSSI offset
+*/
+uint8 halRfGetRssiOffset(void)
+{
+ return rssiOffset;
+}
+
+/***********************************************************************************
+* @fn halRfSetChannel
+*
+* @brief Set RF channel in the 2.4GHz band. The Channel must be in the range 11-26,
+* 11= 2005 MHz, channel spacing 5 MHz.
+*
+* @param channel - logical channel number
+*
+* @return none
+*/
+void halRfSetChannel(uint8 channel)
+{
+ FREQCTRL = (MIN_CHANNEL + (channel - MIN_CHANNEL) * CHANNEL_SPACING);
+}
+
+
+/***********************************************************************************
+* @fn halRfSetShortAddr
+*
+* @brief Write short address to chip
+*
+* @param none
+*
+* @return none
+*/
+void halRfSetShortAddr(uint16 shortAddr)
+{
+ SHORT_ADDR0 = LO_UINT16(shortAddr);
+ SHORT_ADDR1 = HI_UINT16(shortAddr);
+}
+
+
+/***********************************************************************************
+* @fn halRfSetPanId
+*
+* @brief Write PAN Id to chip
+*
+* @param none
+*
+* @return none
+*/
+void halRfSetPanId(uint16 panId)
+{
+ PAN_ID0 = LO_UINT16(panId);
+ PAN_ID1 = HI_UINT16(panId);
+}
+
+
+/***********************************************************************************
+* @fn halRfSetPower
+*
+* @brief Set TX output power
+*
+* @param uint8 power - power level: TXPOWER_MIN_4_DBM, TXPOWER_0_DBM,
+* TXPOWER_4_DBM
+*
+* @return uint8 - SUCCESS or FAILED
+*/
+uint8 halRfSetTxPower(uint8 power)
+{
+ uint8 n;
+
+ switch(power)
+ {
+#if INCLUDE_PA==2591
+ case HAL_RF_TXPOWER_0_DBM: n = CC2530_91_TXPOWER_0_DBM; break;
+ case HAL_RF_TXPOWER_13_DBM: n = CC2530_91_TXPOWER_13_DBM; break;
+ case HAL_RF_TXPOWER_16_DBM: n = CC2530_91_TXPOWER_16_DBM; break;
+ case HAL_RF_TXPOWER_18_DBM: n = CC2530_91_TXPOWER_18_DBM; break;
+ case HAL_RF_TXPOWER_20_DBM: n = CC2530_91_TXPOWER_20_DBM; break;
+#else
+ case HAL_RF_TXPOWER_MIN_3_DBM: n = CC2530_TXPOWER_MIN_3_DBM; break;
+ case HAL_RF_TXPOWER_0_DBM: n = CC2530_TXPOWER_0_DBM; break;
+ case HAL_RF_TXPOWER_4_DBM: n = CC2530_TXPOWER_4_DBM; break;
+#endif
+ default:
+ return FAILED;
+ }
+
+ // Set TX power
+ TXPOWER = n;
+
+ return SUCCESS;
+}
+
+
+/***********************************************************************************
+* @fn halRfSetGain
+*
+* @brief Set gain mode - only applicable for units with CC2590/91.
+*
+* @param uint8 - gain mode
+*
+* @return none
+*/
+void halRfSetGain(uint8 gainMode)
+{
+ if (gainMode==HAL_RF_GAIN_LOW) {
+ HAL_PA_LNA_RX_LGM();
+ rssiOffset = RSSI_OFFSET_LNA_LOWGAIN;
+ } else {
+ HAL_PA_LNA_RX_HGM();
+ rssiOffset = RSSI_OFFSET_LNA_HIGHGAIN;
+ }
+}
+
+/***********************************************************************************
+* @fn halRfWriteTxBuf
+*
+* @brief Write to TX buffer
+*
+* @param uint8* pData - buffer to write
+* uint8 length - number of bytes
+*
+* @return none
+*/
+void halRfWriteTxBuf(uint8* pData, uint8 length)
+{
+ uint8 i;
+
+ ISFLUSHTX(); // Making sure that the TX FIFO is empty.
+
+ RFIRQF1 = ~IRQ_TXDONE; // Clear TX done interrupt
+
+ // Insert data
+ for(i=0;i0) {
+ *pData++= RFD;
+ length--;
+ }
+}
+
+
+/***********************************************************************************
+* @fn halRfReadMemory
+*
+* @brief Read RF device memory
+*
+* @param uint16 addr - memory address
+* uint8* pData - data buffer. This must be allocated by caller.
+* uint8 length - number of bytes
+*
+* @return Number of bytes read
+*/
+uint8 halRfReadMemory(uint16 addr, uint8* pData, uint8 length)
+{
+ return 0;
+}
+
+
+/***********************************************************************************
+* @fn halRfWriteMemory
+*
+* @brief Write RF device memory
+*
+* @param uint16 addr - memory address
+* uint8* pData - data buffer. This must be allocated by caller.
+* uint8 length - number of bytes
+*
+* @return Number of bytes written
+*/
+uint8 halRfWriteMemory(uint16 addr, uint8* pData, uint8 length)
+{
+ return 0;
+}
+
+/***********************************************************************************
+* @fn halRfTransmit
+*
+* @brief Transmit frame with Clear Channel Assessment.
+*
+* @param none
+*
+* @return uint8 - SUCCESS or FAILED
+*/
+uint8 halRfTransmit(void)
+{
+ uint8 status;
+
+ ISTXON(); // Sending
+
+ // Waiting for transmission to finish
+ while(!(RFIRQF1 & IRQ_TXDONE) );
+
+ RFIRQF1 = ~IRQ_TXDONE;
+ status= SUCCESS;
+
+ return status;
+}
+
+
+
+/***********************************************************************************
+* @fn halRfReceiveOn
+*
+* @brief Turn receiver on
+*
+* @param none
+*
+* @return none
+*/
+void halRfReceiveOn(void)
+{
+ ISFLUSHRX(); // Making sure that the TX FIFO is empty.
+ ISRXON();
+}
+
+/***********************************************************************************
+* @fn halRfReceiveOff
+*
+* @brief Turn receiver off
+*
+* @param none
+*
+* @return none
+*/
+void halRfReceiveOff(void)
+{
+ ISRFOFF();
+ ISFLUSHRX(); // Making sure that the TX FIFO is empty.
+}
+
+
+#ifndef MRFI
+/***********************************************************************************
+* @fn halRfDisableRxInterrupt
+*
+* @brief Clear and disable RX interrupt.
+*
+* @param none
+*
+* @return none
+*/
+void halRfDisableRxInterrupt(void)
+{
+ // disable RXPKTDONE interrupt
+ RFIRQM0 &= ~BV(6);
+ // disable general RF interrupts
+ IEN2 &= ~BV(0);
+}
+
+
+/***********************************************************************************
+* @fn halRfEnableRxInterrupt
+*
+* @brief Enable RX interrupt.
+*
+* @param none
+*
+* @return none
+*/
+void halRfEnableRxInterrupt(void)
+{
+ // enable RXPKTDONE interrupt
+ RFIRQM0 |= BV(6);
+ // enable general RF interrupts
+ IEN2 |= BV(0);
+}
+
+
+/***********************************************************************************
+* @fn halRfRxInterruptConfig
+*
+* @brief Configure RX interrupt.
+*
+* @param none
+*
+* @return none
+*/
+void halRfRxInterruptConfig(ISR_FUNC_PTR pf)
+{
+ uint8 x;
+ HAL_INT_LOCK(x);
+ pfISR= pf;
+ HAL_INT_UNLOCK(x);
+}
+
+#endif
+
+/***********************************************************************************
+* @fn halRfWaitTransceiverReady
+*
+* @brief Wait until the transciever is ready (SFD inactive).
+*
+* @param none
+*
+* @return none
+*/
+void halRfWaitTransceiverReady(void)
+{
+ // Wait for SFD not active and TX_Active not active
+ while (FSMSTAT1 & (BV(1) | BV(5) ));
+}
+
+#ifndef MRFI
+/************************************************************************************
+* @fn rfIsr
+*
+* @brief Interrupt service routine that handles RFPKTDONE interrupt.
+*
+* @param none
+*
+* @return none
+*/
+HAL_ISR_FUNCTION( rfIsr, RF_VECTOR )
+{
+ uint8 x;
+
+ HAL_INT_LOCK(x);
+
+ if( RFIRQF0 & IRQ_RXPKTDONE )
+ {
+ if(pfISR){
+ (*pfISR)(); // Execute the custom ISR
+ }
+ S1CON= 0; // Clear general RF interrupt flag
+ RFIRQF0&= ~IRQ_RXPKTDONE; // Clear RXPKTDONE interrupt
+ }
+ HAL_INT_UNLOCK(x);
+}
+#endif
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+static void halPaLnaInit(void)
+{
+#if INCLUDE_PA==2591
+ // Initialize CC2591 to RX high gain mode
+ static uint8 fFirst= TRUE;
+
+ if(fFirst) {
+ AGCCTRL1 = 0x15;
+ FSCAL1 = 0x0;
+ RFC_OBS_CTRL0 = 0x68;
+ RFC_OBS_CTRL1 = 0x6A;
+ OBSSEL1 = 0xFB;
+ OBSSEL4 = 0xFC;
+ P0DIR |= 0x80;
+ halRfSetGain(HAL_RF_GAIN_HIGH);
+ }
+
+#else // do nothing
+#endif
+}
+
+
+/***********************************************************************************
+Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+IMPORTANT: Your use of this Software is limited to those specific rights
+granted under the terms of a software license agreement between the user
+who downloaded the software, his/her employer (which must be your employer)
+and Texas Instruments Incorporated (the "License"). You may not use this
+Software unless you agree to abide by the terms of the License. The License
+limits your use, and you acknowledge, that the Software may not be modified,
+copied or distributed unless embedded on a Texas Instruments microcontroller
+or used solely and exclusively in conjunction with a Texas Instruments radio
+frequency transceiver, which is integrated into your product. Other than for
+the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+works of, modify, distribute, perform, display or sell this Software and/or
+its documentation for any purpose.
+
+YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+Should you have any questions regarding your right to use this Software,
+contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/radios/cc2530/hal_rf_security.c b/CC2530 BasicRF/source/components/radios/cc2530/hal_rf_security.c
new file mode 100644
index 0000000..c7d44eb
--- /dev/null
+++ b/CC2530 BasicRF/source/components/radios/cc2530/hal_rf_security.c
@@ -0,0 +1,442 @@
+/***********************************************************************************
+
+ Filename: hal_rf_security.c
+
+ Description: CC2430/CC2530 CCM security
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_board.h"
+
+#include "hal_mcu.h"
+#include "hal_rf.h"
+#include "hal_rf_security.h"
+#include "util.h"
+#include "string.h"
+
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+
+// Staring AES operation
+#define AES_START() st (ENCCS |= 0x01;)
+
+// Setting the mode of the AES operation
+#define AES_SET_MODE(mode) st( ENCCS &= ~0x70; ENCCS |= mode; )
+
+// Starting or stopping encryption or decryption
+#define AES_SET_OPERATION(op) st( ENCCS = (ENCCS & ~0x07) | op; )
+
+// Poll the AES ready bit
+#define AES_RDY() ( ENCCS & 8)
+
+// Encryption mode
+#define AES_MODE_CBC 0x00
+#define AES_MODE_CFB 0x10
+#define AES_MODE_OFB 0x20
+#define AES_MODE_CTR 0x30
+#define AES_MODE_ECB 0x40
+#define AES_MODE_CBCMAC 0x50
+
+// Operations
+#define AES_ENCRYPT 0x00
+#define AES_DECRYPT 0x02
+#define AES_LOAD_KEY 0x04
+#define AES_LOAD_IV 0x06
+
+
+
+// Convert MIC to MIC length
+#define MIC_2_MICLEN(m) ( BV((m&3)+1) & ~3 )
+
+
+/***********************************************************************************
+* LOCAL DATA
+*/
+static uint8 nonceTx[16];
+static uint8 nonceRx[16];
+static uint8 IV[16];
+static uint8 cipherText[128];
+static uint8 buf[128];
+
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+static void halAesEncrypt(uint8 mode, uint8 *pDataIn, uint16 length, uint8 *pDataOut,
+ uint8 *pInitVector);
+static void halAesDecrypt(uint8 mode, uint8 *pDataIn, uint16 length, uint8 *pDataOut,
+ uint8 *pInitVector);
+static uint8 generateAuthData(uint8 c, uint8 *pIv, uint8 *pData, uint8 f, uint8 lm);
+
+
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+extern void halRfAppendTxBuf(uint8* pData, uint8 length);
+
+
+/***********************************************************************************
+* @fn halRfSecurityInit
+*
+* @brief Security init. Write nonces and key to chip.
+*
+* @param none
+*
+* @return none
+*/
+void halRfSecurityInit(uint8* pKey, uint8* pNonceRx, uint8* pNonceTx)
+{
+ uint8 i;
+
+ AES_SET_OPERATION(AES_LOAD_KEY);
+
+ // Starting loading of key or vector.
+ AES_START();
+
+ // Store key and nonces
+ for (i=0; i0)
+ buf[0]|= 0x40; // Adata= f > 0
+ buf[0]|= ( (lm-2) / 2 ) <<3; // M'= (lm-2) / 2;
+
+ buf[14]= 0x00;
+ buf[15]= c;
+
+ // Add authentication data
+ buf[16]= 0;
+ buf[17]= f;
+ memcpy(&buf[18],pData,f);
+
+ // .... zero padding
+ i= 18 + f;
+ l= (i & 0x0f )==0 ? i : (i&0xf0) + 0x10;
+ while(i 0xFFFF/8){
+ compareValue =0xFFFF;
+ HAL_ASSERT(FALSE);
+ }
+ else{
+ compareValue = cycles*8;
+ }
+
+ // Set compare value
+ T1CC0H = HI_UINT16(compareValue);
+ T1CC0L = LO_UINT16(compareValue);
+#ifndef CC2530_PG1
+ // Set conmpare mode with interrupt enabled
+ T1CCTL0 = 0x44;
+#endif
+
+ // clear interrupt pending flag, disable interrupt
+#ifdef CC2530_PG1
+ T1CTL &= ~0x10; // T1CTL.OVFIF = 0
+#else
+ T1STAT &= ~0x01; // T1STAT.CH1IF = 0
+#endif
+ IEN1 &= ~0x02; // IEN1.T1EN = 0
+}
+
+
+/***********************************************************************************
+* @fn halTimer32kRestart
+*
+* @brief Restart timer 1. The timer is first stopped, then restarted,
+* counting up from 0
+*
+* @param none
+*
+* @return none
+*/
+void halTimer32kRestart(void)
+{
+ T1CTL &= ~0x02; // Stop timer
+ IEN1 &= ~0x02; // Disable interrupt
+
+ T1CNTL = 0x00; // Reset counter value
+
+ T1CTL |= 0x02; // Start timer
+ IEN1 |= 0x02; // Enable interrupt
+}
+
+
+/***********************************************************************************
+* @fn halTimer32kIntConnect
+*
+* @brief Connect function to timer interrupt
+*
+* @param ISR_FUNC_PTR isr - pointer to function
+*
+* @return none
+*/
+void halTimer32kIntConnect(ISR_FUNC_PTR isr)
+{
+ istate_t key;
+ HAL_INT_LOCK(key);
+ fptr = isr;
+ HAL_INT_UNLOCK(key);
+}
+
+
+/***********************************************************************************
+* @fn halTimer32kIntEnable
+*
+* @brief Enable 32KHz timer interrupt
+*
+* @param none
+*
+* @return none
+*/
+void halTimer32kIntEnable(void)
+{
+ IEN1 |= 0x02; // IEN1.T1EN = 1
+
+ // Start timer in modulo mode
+ T1CTL |= 0x02; // T1CTL.MODE = 10
+
+}
+
+
+/***********************************************************************************
+* @fn halTimer32kIntDisable
+*
+* @brief Disable 32KHz timer interrupt
+*
+* @param none
+*
+* @return none
+*/
+void halTimer32kIntDisable(void)
+{
+ IEN1 &= ~0x02; // IEN1.T1EN = 0
+}
+
+
+/***********************************************************************************
+* @fn timer32k0_ISR
+*
+* @brief ISR framework for the 32KHz timer component
+*
+* @param none
+*
+* @return none
+*/
+
+HAL_ISR_FUNCTION(T1_ISR,T1_VECTOR)
+{
+ if (fptr != NULL)
+ {
+ (*fptr)();
+ }
+}
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/common/hal_lcd_srf05.c b/CC2530 BasicRF/source/components/targets/common/hal_lcd_srf05.c
new file mode 100644
index 0000000..4634a30
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/common/hal_lcd_srf05.c
@@ -0,0 +1,939 @@
+/***********************************************************************************
+ Filename: hal_lcd_srf05.c
+ Revised: $Date: 2010-8-31$
+ Author: $outman from feibit.com$
+
+ Description: This file contains the interface to the HAL LCD Service.
+
+ IMPORTANT: THE ORIGINAL CODE IS FROM TI, AND THE FONTS LIB AND
+ LCD REGISTER RELATED CODE WAS WRITTEN
+ BY FEIBIT ELECTRONIC TECHNOLOGY
+
+
+***********************************************************************************/
+
+/***********************************************************************************
+ * INCLUDES
+ */
+
+#include "hal_types.h"
+#include "hal_lcd.h"
+#include "hal_mcu.h"
+#include "hal_board.h"
+#include
+
+#include
+
+
+/***********************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+
+/* 30/8/2010 ++ by feibit */
+
+#define BIT0 0x01
+#define BIT1 0x02
+#define BIT2 0x04
+#define BIT3 0x08
+#define BIT4 0x10
+#define BIT5 0x20
+#define BIT6 0x40
+#define BIT7 0x80
+
+/* The ASCII fonts library, the matrix size is w*h = 8*12, created by outman from feibit.com */
+__code const uint8 ASCIITAB[]=
+{
+/* first line of the char */
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*" "=00H*/
+0x00,0x70,0xf8,0xf8,0x70,0x00,0x00,0x00, /*"!"=01H*/
+0x00,0x38,0x78,0x00,0x00,0x78,0x38,0x00, /*"""=02h*/
+0x20,0xf8,0xf8,0x20,0xf8,0xf8,0x20,0x00, /*"#"=03h*/
+0x60,0xf0,0x9c,0x9c,0x90,0x10,0x00,0x00, /*"$"=04h*/
+0x60,0x60,0x00,0x80,0xc0,0x60,0x00,0x00, /*"%"=05h*/
+0xb0,0xf8,0xc8,0xf8,0xb0,0x00,0x80,0x00, /*"&"=06h*/
+0x00,0x40,0x78,0x38,0x00,0x00,0x00,0x00, /*"'"=07h*/
+0x00,0xc0,0xe0,0x30,0x18,0x08,0x00,0x00, /*"("=08h*/
+0x00,0x08,0x18,0x30,0xe0,0xc0,0x00,0x00, /*")"=09h*/
+0x80,0xa0,0xe0,0xc0,0xc0,0xe0,0xa0,0x80, /*"*"=0Ah*/
+0x00,0x80,0x80,0xe0,0xe0,0x80,0x80,0x00, /*"+"=0Bh*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*";"=0Ch*/
+0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00, /*"-"=0Dh*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"."=0Eh*/
+0x00,0x00,0x00,0x80,0xc0,0x60,0x30,0x00, /*"/"=0Fh*/
+0xf0,0xf8,0x08,0xc8,0x68,0xf8,0xf0,0x00, /*"0"=10h*/
+0x20,0x20,0xf0,0xf8,0x00,0x00,0x00,0x00, /*"1"=11h*/
+0x30,0x38,0x08,0x88,0xf8,0x70,0x00,0x00, /*"2"=12h*/
+0x10,0x18,0x88,0x88,0xf8,0x70,0x00,0x00, /*"3"=13h*/
+0x80,0xc0,0x60,0x30,0xf8,0xf8,0x00,0x00, /*"4"=14h*/
+0xf8,0xf8,0x88,0x88,0x88,0x08,0x00,0x00, /*"5"=15h*/
+0xe0,0xf0,0x98,0x88,0x88,0x00,0x00,0x00, /*"6"=16h*/
+0x38,0x38,0x08,0x08,0x88,0xf8,0x78,0x00, /*"7"=17h*/
+0x70,0xf8,0xc8,0x88,0xf8,0x70,0x00,0x00, /*"8"=18h*/
+0x70,0xf8,0x88,0x88,0xf8,0xf0,0x00,0x00, /*"9"=19h*/
+0x00,0x00,0x60,0x60,0x60,0x00,0x00,0x00, /*":"=1Ah*/
+0x00,0x00,0x60,0x60,0x60,0x00,0x00,0x00, /*";"=1Bh*/
+0x80,0xc0,0x60,0x30,0x18,0x08,0x00,0x00, /*"<"=1Ch*/
+0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x00, /*"="=1Dh*/
+0x00,0x08,0x18,0x30,0x60,0xc0,0x80,0x00, /*">"=1Eh*/
+0x10,0x18,0x88,0xc8,0x78,0x30,0x00,0x00, /*"?"=1Fh*/
+0xf0,0xf8,0x08,0xc8,0xc8,0xf8,0xf0,0x00, /*"@"=20h*/
+0xe0,0xf0,0x18,0x18,0xf0,0xe0,0x00,0x00, /*"A"=21h*/
+0x08,0xf8,0xf8,0x88,0x88,0xf8,0x70,0x00, /*"B"=22h*/
+0xe0,0xf0,0x18,0x08,0x08,0x38,0x30,0x00, /*"C"=23h*/
+0x08,0xf8,0xf8,0x08,0x18,0xf0,0xe0,0x00, /*"D"=24h*/
+0x08,0xf8,0xf8,0x88,0x88,0xc8,0x18,0x00, /*"E"=25h*/
+0x08,0xf8,0xf8,0x88,0x88,0xd8,0x38,0x00, /*"F"=26h*/
+0xe0,0xf0,0x18,0x08,0x08,0x38,0x30,0x00, /*"G"=27h*/
+0xf8,0xf8,0x80,0x80,0xf8,0xf8,0x00,0x00, /*"h"=28h*/
+0x00,0x08,0xf8,0xf8,0x08,0x00,0x00,0x00, /*"I"=29h*/
+0x00,0x00,0x00,0x08,0xf8,0xf8,0x08,0x00, /*"J"=2Ah*/
+0x08,0xf8,0xf8,0x80,0xe0,0x78,0x18,0x00, /*"K"=2Bh*/
+0x08,0xf8,0xf8,0x08,0x00,0x00,0x00,0x00, /*"L"=2Ch*/
+0xf8,0xf8,0x70,0xe0,0x70,0xf8,0xf8,0x00, /*"M"=2Dh*/
+0xf8,0xf8,0xe0,0xc0,0x80,0xf8,0xf8,0x00, /*"N"=2Eh*/
+0xe0,0xf0,0x18,0x08,0x18,0xf0,0xe0,0x00, /*"O"=2Fh*/
+0x08,0xf8,0xf8,0x88,0x88,0xf8,0x70,0x00, /*"P"=30h*/
+0xe0,0xf0,0x18,0x08,0x18,0xf0,0xe0,0x00, /*"Q"=31h*/
+0x08,0xf8,0xf8,0x88,0x88,0xf8,0x70,0x00, /*"R"=32h*/
+0x70,0xf8,0x88,0x88,0x38,0x30,0x00,0x00, /*"S"=33h*/
+0x18,0x08,0xf8,0xf8,0x08,0x18,0x00,0x00, /*"T"=34h*/
+0xf8,0xf8,0x00,0x00,0xf8,0xf8,0x00,0x00, /*"U"=35h*/
+0xf8,0xf8,0x00,0x00,0xf8,0xf8,0x00,0x00, /*"V"=36h*/
+0xf8,0xf8,0x00,0x80,0x00,0xf8,0xf8,0x00, /*"W"=37h*/
+0x38,0x78,0xc0,0xc0,0x78,0x38,0x00,0x00, /*"X"=38h*/
+0x78,0xf8,0x80,0x80,0xf8,0x78,0x00,0x00, /*"Y"=39h*/
+0x38,0x18,0x88,0xe8,0x78,0x18,0x18,0x00, /*"Z"=3Ah*/
+0x00,0x00,0xf8,0xf8,0x08,0x08,0x00,0x00, /*"["=3Bh*/
+0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00, /*"\"=3Ch*/
+0x00,0x00,0x08,0x08,0xf8,0xf8,0x00,0x00, /*"]"=3Dh*/
+0x20,0x30,0x18,0x0c,0x18,0x30,0x20,0x00, /*"^"=3Eh*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"_"=3Fh*/
+0x00,0x00,0x0c,0x1c,0x10,0x00,0x00,0x00, /*"`"=40h*/
+0x00,0x40,0x40,0x40,0xc0,0x80,0x00,0x00, /*"a"=41h*/
+0x08,0xf8,0xf8,0x40,0x40,0xc0,0x80,0x00, /*"b"=42h*/
+0x80,0xc0,0x40,0x40,0xc0,0x80,0x00,0x00, /*"c"=43h*/
+0x80,0xc0,0x40,0x48,0xf8,0xf8,0x00,0x00, /*"d"=44h*/
+0x80,0xc0,0x40,0x40,0xc0,0x80,0x00,0x00, /*"e"=45h*/
+0x80,0xf0,0xf8,0x88,0x98,0x10,0x00,0x00, /*"f"=46h*/
+0x80,0xc0,0x40,0x40,0x80,0xc0,0x40,0x00, /*"g"=47h*/
+0x08,0xf8,0xf8,0x80,0x40,0xc0,0x80,0x00, /*"h"=48h*/
+0x00,0x40,0x40,0xd8,0xd8,0x00,0x00,0x00, /*"i"=49h*/
+0x00,0x00,0x40,0x40,0xd8,0xd8,0x00,0x00, /*"j"=4Ah*/
+0x08,0xf8,0xf8,0x00,0x80,0xc0,0x40,0x00, /*"k"=4Bh*/
+0x00,0x08,0x08,0xf8,0xf8,0x00,0x00,0x00, /*"l"=4Ch*/
+0xc0,0xc0,0x40,0xc0,0x40,0xc0,0x80,0x00, /*"m"=4Dh*/
+0xc0,0xc0,0x40,0x40,0xc0,0x80,0x00,0x00, /*"n"=4Eh*/
+0x80,0xc0,0x40,0x40,0xc0,0x80,0x00,0x00, /*"o'=4Fh*/
+0x40,0xc0,0x80,0x40,0x40,0xc0,0x80,0x00, /*"p"=50h*/
+0x80,0xc0,0x40,0x40,0x80,0xc0,0x40,0x00, /*"q"=51h*/
+0x40,0xc0,0xc0,0x00,0xc0,0xc0,0x80,0x00, /*"r"=52h*/
+0x80,0xc0,0x40,0x40,0xc0,0x80,0x00,0x00, /*"s"=53h*/
+0x40,0xe0,0xf0,0x40,0x40,0x40,0x00,0x00, /*"t"=54h*/
+0xc0,0xc0,0x00,0x00,0xc0,0xc0,0x00,0x00, /*"u"=55h*/
+0xc0,0xc0,0x00,0x00,0xc0,0xc0,0x00,0x00, /*"v"=56h*/
+0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0,0x00, /*"w"=57h*/
+0x40,0xc0,0x80,0x00,0x80,0xc0,0x40,0x00, /*"x"=58h*/
+0x00,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0x00, /*"y"=59h*/
+0xc0,0x40,0x40,0x40,0xc0,0xc0,0x00,0x00, /*"z"=5Ah*/
+0x80,0xc0,0x70,0x38,0x08,0x08,0x00,0x00, /*"{"=5Bh*/
+0x00,0x00,0x00,0x78,0x78,0x00,0x00,0x00, /*"|"=5Ch*/
+0x08,0x08,0x38,0x70,0xc0,0x80,0x00,0x00, /*"}"=5Dh*/
+0x30,0x38,0x08,0x18,0x30,0x20,0x38,0x08, /*"~"=5Fh*/
+0x00,0x80,0xc0,0x60,0xc0,0x80,0x00,0x00, /*" "=0x60*/
+
+
+/* second line of the char */
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*" "=00H*/
+0x00,0x00,0x0d,0x0d,0x00,0x00,0x00,0x00, /*"!"=01H*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"""=02h*/
+0x02,0x0f,0x0f,0x02,0x0f,0x0f,0x02,0x00, /*"#"=03h*/
+0x04,0x04,0x1c,0x1c,0x07,0x03,0x00,0x00, /*"$"=04h*/
+0x0c,0x06,0x03,0x01,0x0c,0x0c,0x00,0x00, /*"%"=05h*/
+0x07,0x0f,0x08,0x0d,0x07,0x0f,0x09,0x00, /*"&"=06h*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"'"=07h*/
+0x00,0x01,0x03,0x06,0x0c,0x08,0x00,0x00, /*"("=08h*/
+0x00,0x08,0x0c,0x06,0x03,0x01,0x00,0x00, /*")"=09h*/
+0x00,0x02,0x03,0x01,0x01,0x03,0x02,0x00, /*"*"=0Ah*/
+0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00, /*"+"=0Bh*/
+0x00,0x10,0x1c,0x0c,0x0c,0x00,0x00,0x00, /*";"=0Ch*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"-"=0Dh*/
+0x00,0x00,0x0c,0x0c,0x0c,0x00,0x00,0x00, /*"."=0Eh*/
+0x0c,0x06,0x03,0x01,0x00,0x00,0x00,0x00, /*"/"=0Fh*/
+0x07,0x0f,0x0b,0x09,0x08,0x0f,0x07,0x00, /*"0"=10h*/
+0x08,0x08,0x0f,0x0f,0x08,0x08,0x00,0x00, /*"1"=11h*/
+0x0c,0x0e,0x0b,0x09,0x0c,0x0c,0x00,0x00, /*"2"=12h*/
+0x04,0x0c,0x08,0x08,0x0f,0x07,0x00,0x00, /*"3"=13h*/
+0x01,0x01,0x01,0x09,0x0f,0x0f,0x09,0x00, /*"4"=14h*/
+0x04,0x0c,0x08,0x08,0x0f,0x07,0x00,0x00, /*"5"=15h*/
+0x07,0x0f,0x08,0x08,0x0f,0x07,0x00,0x00, /*"6"=16h*/
+0x00,0x00,0x0e,0x0f,0x01,0x00,0x00,0x00, /*"7"=17h*/
+0x07,0x0f,0x08,0x09,0x0f,0x07,0x00,0x00, /*"8"=18h*/
+0x00,0x08,0x0c,0x0f,0x03,0x00,0x00,0x00, /*"9"=19h*/
+0x00,0x00,0x06,0x06,0x06,0x00,0x00,0x00, /*":"=1Ah*/
+0x00,0x00,0x16,0x1e,0x0e,0x00,0x00,0x00, /*";"=1Bh*/
+0x00,0x01,0x03,0x06,0x0c,0x08,0x00,0x00, /*"<"=1Ch*/
+0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00, /*"="=1Dh*/
+0x00,0x08,0x0c,0x06,0x03,0x01,0x00,0x00, /*">"=1Eh*/
+0x00,0x00,0x0d,0x0d,0x00,0x00,0x00,0x00, /*"?"=1Fh*/
+0x07,0x0f,0x08,0x09,0x09,0x09,0x01,0x00, /*"@"=20h*/
+0x0f,0x0f,0x01,0x01,0x0f,0x0f,0x00,0x00, /*"A"=21h*/
+0x08,0x0f,0x0f,0x08,0x08,0x0f,0x07,0x00, /*"B"=22h*/
+0x03,0x07,0x0c,0x08,0x08,0x0e,0x06,0x00, /*"C"=23h*/
+0x08,0x0f,0x0f,0x08,0x0c,0x07,0x03,0x00, /*"D"=24h*/
+0x08,0x0f,0x0f,0x08,0x08,0x09,0x0c,0x00, /*"E"=25h*/
+0x08,0x0f,0x0f,0x08,0x00,0x01,0x00,0x00, /*"F"=26h*/
+0x03,0x07,0x0c,0x08,0x09,0x0f,0x0f,0x00, /*"G"=27h*/
+0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00,0x00, /*"h"=28h*/
+0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00, /*"I"=29h*/
+0x07,0x0f,0x08,0x08,0x0f,0x07,0x00,0x00, /*"J"=2Ah*/
+0x08,0x0f,0x0f,0x00,0x03,0x0f,0x0c,0x00, /*"K"=2Bh*/
+0x08,0x0f,0x0f,0x08,0x08,0x0e,0x0f,0x00, /*"L"=2Ch*/
+0x0f,0x0f,0x00,0x00,0x00,0x0f,0x0f,0x00, /*"M"=2Dh*/
+0x0f,0x0f,0x00,0x01,0x03,0x0f,0x0f,0x00, /*"N"=2Eh*/
+0x03,0x07,0x0c,0x08,0x0c,0x07,0x03,0x00, /*"O"=2Fh*/
+0x08,0x0f,0x0f,0x08,0x00,0x00,0x00,0x00, /*"P"=30h*/
+0x03,0x07,0x04,0x16,0x1f,0x1f,0x13,0x00, /*"Q"=31h*/
+0x08,0x0f,0x0f,0x00,0x01,0x0f,0x0e,0x00, /*"R"=32h*/
+0x06,0x0e,0x08,0x09,0x0f,0x06,0x00,0x00, /*"S"=33h*/
+0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00, /*"T"=34h*/
+0x07,0x0f,0x08,0x08,0x0f,0x07,0x00,0x00, /*"U"=35h*/
+0x03,0x07,0x0c,0x0c,0x07,0x03,0x00,0x00, /*"V"=36h*/
+0x01,0x0f,0x0e,0x01,0x0e,0x0f,0x01,0x00, /*"W"=37h*/
+0x0e,0x0f,0x01,0x01,0x0f,0x0e,0x00,0x00, /*"X"=38h*/
+0x00,0x08,0x0f,0x0f,0x08,0x00,0x00,0x00, /*"Y"=39h*/
+0x0c,0x0f,0x0b,0x08,0x08,0x0c,0x0e,0x00, /*"Z"=3Ah*/
+0x00,0x00,0x0f,0x0f,0x08,0x08,0x00,0x00, /*"["=3Bh*/
+0x00,0x00,0x00,0x01,0x03,0x06,0x0c,0x00, /*"\"=3Ch*/
+0x00,0x00,0x08,0x08,0x0f,0x0f,0x00,0x00, /*"]"=3Dh*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"^"=3Eh*/
+0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, /*"_"=3Fh*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"`"=40h*/
+0x06,0x0f,0x09,0x09,0x07,0x0f,0x08,0x00, /*"a"=41h*/
+0x08,0x0f,0x07,0x08,0x08,0x0f,0x07,0x00, /*"b"=42h*/
+0x07,0x0f,0x08,0x08,0x0c,0x04,0x00,0x00, /*"c"=43h*/
+0x07,0x0f,0x08,0x08,0x07,0x0f,0x08,0x00, /*"d"=44h*/
+0x07,0x0f,0x09,0x09,0x0d,0x05,0x00,0x00, /*"e"=45h*/
+0x08,0x0f,0x0f,0x08,0x00,0x00,0x00,0x00, /*"f"=46h*/
+0x13,0x37,0x24,0x24,0x3f,0x1f,0x00,0x00, /*"g"=47h*/
+0x08,0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00, /*"h"=48h*/
+0x00,0x08,0x08,0x0f,0x0f,0x08,0x08,0x00, /*"i"=49h*/
+0x18,0x38,0x20,0x20,0x3f,0x1f,0x00,0x00, /*"j"=4Ah*/
+0x08,0x0f,0x0f,0x01,0x03,0x0e,0x0c,0x00, /*"k"=4Bh*/
+0x00,0x08,0x08,0x0f,0x0f,0x08,0x08,0x00, /*"l"=4Ch*/
+0x0f,0x0f,0x00,0x07,0x00,0x0f,0x0f,0x00, /*"m"=4Dh*/
+0x0f,0x0f,0x00,0x00,0x0f,0x0f,0x00,0x00, /*"n"=4Eh*/
+0x07,0x0f,0x08,0x08,0x0f,0x07,0x00,0x00, /*"o'=4Fh*/
+0x20,0x3f,0x3f,0x28,0x08,0x0f,0x07,0x00, /*"p"=50h*/
+0x07,0x0f,0x08,0x28,0x3f,0x3f,0x80,0x00, /*"q"=51h*/
+0x08,0x0f,0x0f,0x09,0x00,0x01,0x01,0x00, /*"r"=52h*/
+0x04,0x0d,0x09,0x0a,0x0e,0x04,0x00,0x00, /*"s"=53h*/
+0x00,0x07,0x0f,0x08,0x0c,0x04,0x00,0x00, /*"t"=54h*/
+0x07,0x0f,0x08,0x08,0x07,0x0f,0x08,0x00, /*"u"=55h*/
+0x03,0x07,0x0c,0x0c,0x07,0x03,0x00,0x00, /*"v"=56h*/
+0x03,0x0f,0x0c,0x03,0x0c,0x0f,0x03,0x00, /*"w"=57h*/
+0x08,0x0c,0x07,0x03,0x07,0x0c,0x08,0x00, /*"x"=58h*/
+0x20,0x23,0x27,0x34,0x1c,0x0f,0x03,0x00, /*"y"=59h*/
+0x0c,0x0e,0x0a,0x09,0x09,0x0c,0x00,0x00, /*"z"=5Ah*/
+0x00,0x01,0x07,0x0e,0x08,0x08,0x00,0x00, /*"{"=5Bh*/
+0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x00, /*"|"=5Ch*/
+0x08,0x08,0x0e,0x07,0x01,0x00,0x00,0x00, /*"}"=5Dh*/
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*"~"=5Fh*/
+0x07,0x07,0x04,0x04,0x04,0x07,0x07,0x00, /*" "=0x60*/
+};
+//__code const uint8 ASCIITAB_DZK[]=
+//{
+//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*""=00H*/
+//0x00,0x30,0x78,0x78,0x78,0x30,0x30,0x00,0x30,0x30,0x00,0x00,/*"!"=01H*/
+//0x00,0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,/*"""=02h*/
+//0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,/*"#"=03h*/
+//0x00,0x30,0x30,0x7c,0xc0,0xc0,0x78,0x0c,0x0c,0xf8,0x30,0x30,/*"$"=04h*/
+//0x00,0x00,0x00,0x00,0xc4,0xcc,0x18,0x30,0x60,0xcc,0x8c,0x00,/*"%"=05h*/
+//0x00,0x00,0x70,0xd8,0xd8,0x70,0xfa,0xde,0xcc,0xdc,0x76,0x00,/*"&"=06h*/
+//0x00,0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,/*"'"=07h*/
+//0x00,0x00,0x0c,0x18,0x30,0x60,0x60,0x60,0x30,0x18,0x0c,0x00,/*"("=08h*/
+//0x00,0x00,0x60,0x30,0x18,0x0c,0x0c,0x0c,0x18,0x30,0x60,0x00,/*")"=09h*/
+//0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,/*"*"=0Ah*/
+//0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,/*"+"=0Bh*/
+//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x60,/*";"=0Ch*/
+//0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,/*"-"=0Dh*/
+//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x00,/*"."=0Eh*/
+//0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,/*"/"=0Fh*/
+//0x00,0x00,0x7c,0xc6,0xce,0xde,0xd6,0xf6,0xe6,0xc6,0x7c,0x00,/*"0"=10h*/
+//0x00,0x00,0x10,0x30,0xf0,0x30,0x30,0x30,0x30,0x30,0xfc,0x00,/*"1"=11h*/
+//0x00,0x00,0x78,0xcc,0xcc,0x0c,0x18,0x30,0x60,0xcc,0xfc,0x00,/*"2"=12h*/
+//0x00,0x00,0x78,0xcc,0x0c,0x0c,0x38,0x0c,0x0c,0xcc,0x78,0x00,/*"3"=13h*/
+//0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x1e,0x00,/*"4"=14h*/
+//0x00,0x00,0xfc,0xc0,0xc0,0xc0,0xf8,0x0c,0x0c,0xcc,0x78,0x00,/*"5"=15h*/
+//0x00,0x00,0x38,0x60,0xc0,0xc0,0xf8,0xcc,0xcc,0xcc,0x78,0x00,/*"6"=16h*/
+//0x00,0x00,0xfe,0xc6,0xc6,0x06,0x0c,0x18,0x30,0x30,0x30,0x00,/*"7"=17h*/
+//0x00,0x00,0x78,0xcc,0xcc,0xec,0x78,0xdc,0xcc,0xcc,0x78,0x00,/*"8"=18h*/
+//0x00,0x00,0x78,0xcc,0xcc,0xcc,0x7c,0x18,0x18,0x30,0x70,0x00,/*"9"=19h*/
+//0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x00,0x00,/*":"=1Ah*/
+//0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x18,0x30,/*";"=1Bh*/
+//0x00,0x00,0x0c,0x18,0x30,0x60,0xc0,0x60,0x30,0x18,0x0c,0x00,/*"<"=1Ch*/
+//0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00,0x00,/*"="=1Dh*/
+//0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,/*">"=1Eh*/
+//0x00,0x00,0x78,0xcc,0x0c,0x18,0x30,0x30,0x00,0x30,0x30,0x00,/*"?"=1Fh*/
+//0x00,0x00,0x7c,0xc6,0xc6,0xde,0xde,0xde,0xc0,0xc0,0x7c,0x00,/*"@"=20h*/
+//0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x00,/*"A"=21h*/
+//0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,/*"B"=22h*/
+//0x00,0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00,/*"C"=23h*/
+//0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,/*"D"=24h*/
+//0x00,0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00,/*"E"=25h*/
+//0x00,0x00,0xfe,0x66,0x62,0x64,0x7c,0x64,0x60,0x60,0xf0,0x00,/*"F"=26h*/
+//0x00,0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xce,0xc6,0x66,0x3e,0x00,/*"G"=27h*/
+//0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0xcc,0x00,/*"h"=28h*/
+//0x00,0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,/*"I"=29h*/
+//0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,/*"J"=2Ah*/
+//0x00,0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00,/*"K"=2Bh*/
+//0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x62,0x66,0x66,0xfe,0x00,/*"L"=2Ch*/
+//0x00,0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,/*"M"=2Dh*/
+//0x00,0x00,0xc6,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0x00,/*"N"=2Eh*/
+//0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00,/*"O"=2Fh*/
+//0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0xf0,0x00,/*"P"=30h*/
+//0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xce,0xde,0x7c,0x0c,0x1e,/*"Q"=31h*/
+//0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0xe6,0x00,/*"R"=32h*/
+//0x00,0x00,0x78,0xcc,0xcc,0xc0,0x70,0x18,0xcc,0xcc,0x78,0x00,/*"S"=33h*/
+//0x00,0x00,0xfc,0xb4,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,/*"T"=34h*/
+//0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x00,/*"U"=35h*/
+//0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00,/*"V"=36h*/
+//0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xd6,0x6c,0x6c,0x6c,0x00,/*"W"=37h*/
+//0x00,0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00,/*"X"=38h*/
+//0x00,0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x30,0x30,0x78,0x00,/*"Y"=39h*/
+//0x00,0x00,0xfe,0xce,0x98,0x18,0x30,0x60,0x62,0xc6,0xfe,0x00,/*"Z"=3Ah*/
+//0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,/*"["=3Bh*/
+//0x00,0x00,0x00,0x80,0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00,/*"\"=3Ch*/
+//0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,/*"]"=3Dh*/
+//0x00,0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"^"=3Eh*/
+//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,/*"_"=3Fh*/
+//0x00,0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"`"=40h*/
+//0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00,/*"a"=41h*/
+//0x00,0x00,0xe0,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0xdc,0x00,/*"b"=42h*/
+//0x00,0x00,0x00,0x00,0x00,0x78,0xcc,0xc0,0xc0,0xcc,0x78,0x00,/*"c"=43h*/
+//0x00,0x00,0x1c,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,/*"d"=44h*/
+//0x00,0x00,0x00,0x00,0x00,0x78,0xcc,0xfc,0xc0,0xcc,0x78,0x00,/*"e"=45h*/
+//0x00,0x00,0x38,0x6c,0x60,0x60,0xf8,0x60,0x60,0x60,0xf0,0x00,/*"f"=46h*/
+//0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,/*"g"=47h*/
+//0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0xe6,0x00,/*"h"=48h*/
+//0x00,0x00,0x18,0x18,0x00,0x78,0x18,0x18,0x18,0x18,0x7e,0x00,/*"i"=49h*/
+//0x00,0x00,0x0c,0x0c,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,/*"j"=4Ah*/
+//0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x6c,0x66,0xe6,0x00,/*"k"=4Bh*/
+//0x00,0x00,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,/*"l"=4Ch*/
+//0x00,0x00,0x00,0x00,0x00,0xfc,0xd6,0xd6,0xd6,0xd6,0xc6,0x00,/*"m"=4Dh*/
+//0x00,0x00,0x00,0x00,0x00,0xf8,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,/*"n"=4Eh*/
+//0x00,0x00,0x00,0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,/*"o'=4Fh*/
+//0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x7c,0x60,/*"p"=50h*/
+//0xf0,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,/*"q"=51h*/
+//0x00,0x00,0x00,0x00,0x00,0xec,0x6e,0x76,0x60,0x60,0xf0,0x00,/*"r"=52h*/
+//0x00,0x00,0x00,0x00,0x00,0x78,0xcc,0x60,0x18,0xcc,0x78,0x00,/*"s"=53h*/
+//0x00,0x00,0x00,0x20,0x60,0xfc,0x60,0x60,0x60,0x6c,0x38,0x00,/*"t"=54h*/
+//0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,/*"u"=55h*/
+//0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00,/*"v"=56h*/
+//0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xd6,0xd6,0x6c,0x6c,0x00,/*"w"=57h*/
+//0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00,/*"x"=58h*/
+//0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3c,0x0c,0x18,/*"y"=59h*/
+//0x00,0x00,0x00,0x00,0x00,0xfc,0x8c,0x18,0x60,0xc4,0xfc,0x00,/*"z"=5Ah*/
+//0x00,0x00,0x1c,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x1c,0x00,/*"{"=5Bh*/
+//0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,/*"|"=5Ch*/
+//0x00,0x00,0xe0,0x30,0x30,0x18,0x0c,0x18,0x30,0x30,0xe0,0x00,/*"}"=5Dh*/
+//0x00,0x00,0x73,0xda,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+//0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0x00,0x00,/*"~"=5Fh*/
+//};
+
+// LCD lines
+#define LCD_LINE_COUNT 4
+#define LCD_LINE_LENGTH 16
+
+#define HAL_CONFIG_IO_OUTPUT(port, pin, val) HAL_CONFIG_IO_OUTPUT_PREP(port, pin, val)
+#define HAL_CONFIG_IO_OUTPUT_PREP(port, pin, val) st( P##port##SEL &= ~BV(pin); \
+ P##port##_##pin## = val; \
+ P##port##DIR |= BV(pin); )
+
+
+/***********************************************************************************
+ * LOCAL VARIABLES
+ */
+static char XDATA pLcdLineBuffer[LCD_LINE_LENGTH];
+
+/***********************************************************************************
+ * LOCAL FUNCTIONS
+ */
+static void HalLcd_HW_Control(uint8 command);
+static void HalLcd_HW_Write(uint8 ch);
+static void lcdWriteLine(uint8 line, const char *pText);
+static void halLcd_ConfigIO(void);
+static void SET_DDRAM_ADDR(uint8 x, uint8 y);
+static void halLcdWriteChar_first(uint8 line, uint8 col, char text);
+static void halLcdWriteChar_second(uint8 line, uint8 col, char text);
+//static uint8 HalLcd_Convert_DZK(uint8 index, uint16 addr);
+
+/***********************************************************************************
+ * @fn HalLcd_HW_Control
+ *
+ * @brief Send command to display
+ *
+ * @param uint8 command
+ *
+ * @return none
+ */
+static void HalLcd_HW_Control(uint8 command)
+{
+ LCD_SPI_BEGIN();
+ LCD_DO_CONTROL();
+ LCD_SPI_TX(command);
+ LCD_SPI_WAIT_RXRDY();
+ LCD_SPI_END();
+}
+
+/***********************************************************************************
+ * @fn HalLcd_HW_Write
+ *
+ * @brief Write character to display
+ *
+ * @param uint8 ch - character to display
+ *
+ * @return none
+ */
+static void HalLcd_HW_Write(uint8 ch)
+{
+ LCD_SPI_BEGIN();
+ LCD_DO_WRITE();
+ LCD_SPI_TX(ch);
+ LCD_SPI_WAIT_RXRDY();
+ LCD_SPI_END();
+}
+
+
+/***********************************************************************************
+ * @fn lcdWriteLine
+ *
+ * @brief Write line on display
+ *
+ * @param uint8 line - display line
+ * char *pText - text buffer to write
+ *
+ * @return none
+ */
+//static void lcdWriteLine(uint8 line, const char XDATA *pText)
+//{
+// uint8 count;
+// uint8 totalLength = (uint8)strlen( (char *)pText );
+//
+// /* Write the content first */
+// for (count=0; count 7)
+// {
+// return return_val;
+// }
+//
+// for (j = 0; j < 6; j++)
+// {
+// temp = ASCIITAB_DZK[addr + j];
+// temp = temp & mask;
+// temp = temp >> (7 - index);
+// if (temp)
+// {
+// return_val |= mask_array[7-j];
+// }
+// else
+// {
+// return_val &= ~mask_array[7-j];
+// }
+// }
+//
+// return return_val;
+//}
+
+
+/* 31/8/2010 ++ by feibit */
+/**************************************************************************************************
+ * @fn halLcd_ConfigIO
+ *
+ * @brief Configure IO lines needed for LCD control.
+ *
+ * @param None
+ *
+ * @return None
+ **************************************************************************************************/
+static void halLcd_ConfigIO(void)
+{
+ /* GPIO configuration */
+ HAL_CONFIG_IO_OUTPUT(HAL_LCD_MODE_PORT, HAL_LCD_MODE_PIN, 1);
+// HAL_CONFIG_IO_OUTPUT(HAL_LCD_RESET_PORT, HAL_LCD_RESET_PIN, 1);
+ HAL_CONFIG_IO_OUTPUT(HAL_LCD_CS_PORT, HAL_LCD_CS_PIN, 1);
+ HAL_CONFIG_IO_OUTPUT(HAL_LCD_BK_PORT, HAL_LCD_BK_PIN, 0);
+
+}
+
+static void SET_DDRAM_ADDR(uint8 x, uint8 y)
+{
+ HalLcd_HW_Control(y|0xb0);
+ HalLcd_HW_Control((x >> 4)|0x10);
+ HalLcd_HW_Control(x&0x0f);
+}
+
+/***********************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+
+ /***********************************************************************************
+ * @fn halLcdInit
+ *
+ * @brief Initalise LCD
+ *
+ * @param none
+ *
+ * @return none
+ */
+void halLcdInit(void)
+{
+ // Initialize I/O
+ halLcd_ConfigIO();
+
+ // Perform the initialization sequence
+ HalLcd_HW_Control(0xaf); //¿ªÏÔʾ
+ HalLcd_HW_Control(0x40); //ÏÔʾÆðʼÐÐΪ0
+ HalLcd_HW_Control(0xa0); //RAMÁеØÖ·ÓëÁÐÇý¶¯Í¬Ë³Ðò
+ HalLcd_HW_Control(0xa6); //ÕýÏòÏÔʾ
+ HalLcd_HW_Control(0xa4); //ÏÔʾȫÁÁ¹¦ÄܹرÕ
+ HalLcd_HW_Control(0xa2); //LCDƫѹ±È1/9
+ HalLcd_HW_Control(0xc8); //ÐÐÇý¶¯·½ÏòΪ·´Ïò
+ HalLcd_HW_Control(0x2f); //ÆôÓÃÄÚ²¿LCDÇý¶¯µçÔ´
+ HalLcd_HW_Control(0xf8); //Éýѹµç·ÉèÖÃÖ¸Áî´úÂë
+ HalLcd_HW_Control(0x00); //±¶Ñ¹ÉèÖÃΪ4X
+
+ /* set contrast */
+ halLcdSetContrast(0x38);
+
+ // Clear the display
+ halLcdClear();
+}
+
+/***********************************************************************************
+ * @fn halLcdClear
+ *
+ * @brief Clear all lines on display
+ *
+ * @param none
+ *
+ * @return none
+ */
+void halLcdClear(void)
+{
+ uint8 i,j;
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 132; j++)
+ {
+ SET_DDRAM_ADDR(j,i);
+ HalLcd_HW_Write(0);
+ }
+ }
+}
+
+/***********************************************************************************
+ * @fn halLcdSetContrast
+ *
+ * @brief Set display contrast
+ *
+ * @param uint8 value - contrast value
+ *
+ * @return none
+ */
+void halLcdSetContrast(uint8 value)
+{
+ HalLcd_HW_Control(0x81);
+ HalLcd_HW_Control(value);
+}
+
+/***********************************************************************************
+ * @fn halLcdGetLineLength
+ *
+ * @brief Get max number of characters on each line
+ *
+ * @param nono
+ *
+ * @return uint8 - number of characters on a line
+ */
+uint8 halLcdGetLineLength(void)
+{
+ return LCD_LINE_LENGTH;
+}
+
+/***********************************************************************************
+ * @fn halLcdGetNumLines
+ *
+ * @brief Get number of lines on display
+ *
+ * @param nono
+ *
+ * @return uint8 - number of characters on a line
+ */
+uint8 halLcdGetNumLines(void)
+{
+ return LCD_LINE_COUNT;
+}
+
+/***********************************************************************************
+ * @fn halLcdWriteChar
+ *
+ * @brief Write single character
+ *
+ * @param uint8 line - display line
+ * uint8 col - column
+ * char text - character to display
+ *
+ * @return none
+ */
+void halLcdWriteChar(uint8 line, uint8 col, char text)
+{
+ halLcdWriteChar_first(line,col,text);
+ halLcdWriteChar_second(line,col,text);
+}
+//{
+// uint8 j;
+// uint16 addr;
+//
+// if (col < LCD_LINE_LENGTH && line <= HAL_LCD_LINE_4)
+// {
+//
+// //write first line
+// SET_DDRAM_ADDR(col * 8, (line - 1) * 2);
+// text = text - 0x20;
+// addr = text *8; //*8
+//
+// for (j = 0; j < 8; j++)
+// {
+// HalLcd_HW_Write(ASCIITAB[addr + j]);
+// }
+//
+// //write second line
+// SET_DDRAM_ADDR(col * 8, (line - 1) * 2 + 1);
+// addr = (text + 96) *8; //*8
+//
+// for (j = 0; j < 8; j++)
+// {
+// HalLcd_HW_Write(ASCIITAB[addr + j]);
+// }
+//
+// }
+// else
+// {
+// return;
+// }
+//}
+
+static void halLcdWriteChar_first(uint8 line, uint8 col, char text)
+{
+ uint8 j;
+ uint16 addr;
+
+ if (col < LCD_LINE_LENGTH && line <= HAL_LCD_LINE_4)
+ {
+
+ //write first line
+ SET_DDRAM_ADDR(col * 8, (line - 1) * 2);
+ addr = (text - 0x20) << 3; //*8
+
+ for (j = 0; j < 8; j++)
+ {
+ HalLcd_HW_Write(ASCIITAB[addr + j]);
+ }
+
+ }
+ else
+ {
+ return;
+ }
+}
+
+static void halLcdWriteChar_second(uint8 line, uint8 col, char text)
+{
+ uint8 j;
+ uint16 addr;
+
+ if (col < LCD_LINE_LENGTH && line <= HAL_LCD_LINE_4)
+ {
+
+ //write second line
+ SET_DDRAM_ADDR(col * 8, (line - 1) * 2 + 1);
+ addr = (text + 0x40) << 3; //(text - 0x20 + 0x60)*8
+
+ for (j = 0; j < 8; j++)
+ {
+ HalLcd_HW_Write(ASCIITAB[addr + j]);
+ }
+
+
+ }
+ else
+ {
+ return;
+ }
+}
+/***********************************************************************************
+ * @fn halLcdWriteLine
+ *
+ * @brief Write line on display
+ *
+ * @param uint8 line - display line
+ * char *pLine2 - pointer to text buffer to write
+ *
+ * @return none
+ */
+void halLcdWriteLine(uint8 line, const char XDATA *pLine)
+{
+ uint8 n;
+ if (pLine) {
+ for (n = 0; n < LCD_LINE_LENGTH; n++) {
+ if (*pLine) {
+ pLcdLineBuffer[n] = *(pLine++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ lcdWriteLine(line, pLcdLineBuffer);
+ }
+}
+
+/***********************************************************************************
+ * @fn halLcdWriteLines
+ *
+ * @brief Write lines on display
+ *
+ * @param char *pLine1 - pointer to text buffer for line 1
+ * char *pLine2 - pointer to text buffer for line 2
+ * char *pLine3 - pointer to text buffer for line 3
+ *
+ * @return none
+ */
+void halLcdWriteLines(const char XDATA *pLine1, const char XDATA *pLine2,
+ const char XDATA *pLine3)
+{
+ if (pLine1) halLcdWriteLine(1, pLine1);
+ if (pLine2) halLcdWriteLine(2, pLine2);
+ if (pLine3) halLcdWriteLine(3, pLine3);
+}
+
+/***********************************************************************************
+ * @fn halLcdDisplayValue
+ *
+ * @brief Display value on display with optional text on right and left side
+ *
+ * @param uint8 line
+ * char *pLeft
+ * int32 value
+ * char *pRight
+ *
+ * @return none
+ */
+void halLcdDisplayValue(uint8 line, char XDATA *pLeft, int32 value,
+ char XDATA *pRight)
+{
+ uint8 n;
+ char *pValue = convInt32ToText(value);
+ for (n = 0; n < LCD_LINE_LENGTH; n++) {
+ if (pLeft && *pLeft) {
+ pLcdLineBuffer[n] = *(pLeft++);
+ } else if (*pValue) {
+ pLcdLineBuffer[n] = *(pValue++);
+ } else if (pRight && *pRight) {
+ pLcdLineBuffer[n] = *(pRight++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ lcdWriteLine(line, pLcdLineBuffer);
+}
+
+/***********************************************************************************
+ * @fn halLcdDisplayCounters
+ *
+ * @brief Display counter values with text on display
+ *
+ * @param uint8 line - display line
+ * int32 lValue - left value
+ * char lChar - left text
+ * int32 rValue - right value
+ * char rChar - right text
+ *
+ * @return none
+ */
+void halLcdDisplayCounters(uint8 line, int32 lValue, char lChar,
+ int32 rValue, char rChar)
+{
+ uint8 n;
+ char *pCounter;
+
+ // Left part
+ pLcdLineBuffer[0] = lChar;
+ pLcdLineBuffer[1] = '=';
+ pCounter = convInt32ToText(lValue);
+ for (n = 2; n < 8; n++) {
+ if (*pCounter) {
+ pLcdLineBuffer[n] = *(pCounter++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ pLcdLineBuffer[8] = rChar;
+ pLcdLineBuffer[9] = '=';
+ pCounter = convInt32ToText(rValue);
+ for (n = 10; n < 16; n++) {
+ if (*pCounter) {
+ pLcdLineBuffer[n] = *(pCounter++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ lcdWriteLine(line, pLcdLineBuffer);
+}
+
+static const char hex[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
+/***********************************************************************************
+ * @fn halLcdDisplayUint16
+ *
+ * @brief Write a 16 bit value on the specified line on the LCD
+ *
+ * @param uint16 value - value to display
+ * uint8 radix - must be HAL_LCD_RADIX_DEC
+ * uint8 line - line on display
+ *
+ * @return none
+ */
+void halLcdDisplayUint16(uint8 line, uint8 radix, uint16 value)
+{
+
+ if (radix == HAL_LCD_RADIX_DEC) {
+ uint8 n = 0;
+ char *pValue = convInt32ToText((uint32)value);
+ while (*pValue)
+ halLcdWriteChar(line, n++, *(pValue++));
+ }
+ else if (radix == HAL_LCD_RADIX_HEX) {
+ halLcdWriteChar(line, 0, '0');
+ halLcdWriteChar(line, 1, 'x');
+ halLcdWriteChar(line, 2, hex[(value & 0xF000) >> 12]);
+ halLcdWriteChar(line, 3, hex[(value & 0x0F00) >> 8]);
+ halLcdWriteChar(line, 4, hex[(value & 0x00F0) >> 4]);
+ halLcdWriteChar(line, 5, hex[(value & 0x000F)]);
+ }
+}
+
+
+/***********************************************************************************
+ * @fn halLcdClearAllSpecChars
+ *
+ * @brief Clear special characters
+ *
+ * @param none
+ *
+ * @return none
+ */
+void halLcdClearAllSpecChars(void)
+{
+// uint8 n;
+// SET_GCRAM_CHAR(0);
+// for (n = 0; n < (8 * 8); n++) {
+// HalLcd_HW_Write(0x00);
+// }
+}
+
+/***********************************************************************************
+ * @fn halLcdCreateSpecChar
+ *
+ * @brief Create special character
+ *
+ * @param uint8 index
+ * const char *p5x8Spec
+ *
+ * @return none
+ */
+void halLcdCreateSpecChar(uint8 index, const char XDATA *p5x8Spec)
+{
+// uint8 n;
+// SET_GCRAM_CHAR(index);
+// for (n = 0; n < 8; n++) {
+// HalLcd_HW_Write(p5x8Spec[n]);
+// }
+}
+
+/***********************************************************************************
+ * @fn halLcdWriteSpecChar
+ *
+ * @brief Write special character
+ *
+ * @param uint8 line - display line
+ * uint8 col - column
+ * uint8 index - index of spec character
+ *
+ * @return none
+ */
+void halLcdWriteSpecChar(uint8 line, uint8 col, uint8 index)
+{
+// SET_DDRAM_ADDR((line - 1) * LCD_LINE_LENGTH + col);
+// HalLcd_HW_Write(index);
+}
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_assert.h b/CC2530 BasicRF/source/components/targets/interface/hal_assert.h
new file mode 100644
index 0000000..0298829
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_assert.h
@@ -0,0 +1,55 @@
+
+/***********************************************************************************
+ Filename: hal_assert.h
+
+ Description: Assert functionality header file
+
+***********************************************************************************/
+
+#ifndef HAL_ASSERT_H
+#define HAL_ASSERT_H
+
+#include "hal_defs.h"
+
+/***********************************************************************************
+* MACROS
+*/
+#define HAL_ASSERT(expr) st( if (!( expr )) halAssertHandler(); )
+/***********************************************************************************
+* FUNCTIONS
+*/
+void halAssertHandler(void);
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_button.h b/CC2530 BasicRF/source/components/targets/interface/hal_button.h
new file mode 100644
index 0000000..8bac570
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_button.h
@@ -0,0 +1,76 @@
+/***********************************************************************************
+ Filename: hal_button.h
+
+ Description: HAL button control header file
+
+***********************************************************************************/
+
+#ifndef HAL_BUTTON_H
+#define HAL_BUTTON_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/******************************************************************************
+ * INCLUDES
+ */
+#include "hal_types.h"
+
+
+/******************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+enum {
+ HAL_BUTTON_NONE = 0,
+ HAL_BUTTON_1,
+ HAL_BUTTON_2
+};
+
+
+/******************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+void halButtonInit(void);
+uint8 halButtonPushed(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_digio.h b/CC2530 BasicRF/source/components/targets/interface/hal_digio.h
new file mode 100644
index 0000000..3a356e3
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_digio.h
@@ -0,0 +1,102 @@
+/******************************************************************************
+ Filename: hal_digio.h
+
+ Description: HAL digital IO functionality
+
+******************************************************************************/
+
+#ifndef HAL_DIGIO_H
+#define HAL_DIGIO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************
+ * INCLUDES
+ */
+#include
+
+/******************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+enum {
+ HAL_DIGIO_INPUT,
+ HAL_DIGIO_OUTPUT
+};
+
+enum {
+ HAL_DIGIO_INT_FALLING_EDGE,
+ HAL_DIGIO_INT_RISING_EDGE
+};
+
+#define HAL_DIGIO_OK 0
+#define HAL_DIGIO_ERROR (~0)
+
+/******************************************************************************
+ * TYPEDEFS
+ */
+
+typedef struct {
+ uint8 port; // port number
+ uint8 pin; // pin number
+ uint8 pin_bm; // pin bitmask
+ uint8 dir; // direction (input or output)
+ uint8 initval; // initial value
+} digioConfig;
+
+
+/******************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+uint8 halDigioConfig(const digioConfig* p);
+uint8 halDigioClear(const digioConfig* p);
+uint8 halDigioToggle(const digioConfig* p);
+uint8 halDigioSet(const digioConfig* p);
+uint8 halDigioGet(const digioConfig* p);
+
+uint8 halDigioIntConnect(const digioConfig *p, ISR_FUNC_PTR func);
+uint8 halDigioIntEnable(const digioConfig *p);
+uint8 halDigioIntDisable(const digioConfig *p);
+uint8 halDigioIntClear(const digioConfig *p);
+uint8 halDigioIntSetEdge(const digioConfig *p, uint8 edge);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_int.h b/CC2530 BasicRF/source/components/targets/interface/hal_int.h
new file mode 100644
index 0000000..b675aa1
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_int.h
@@ -0,0 +1,125 @@
+/******************************************************************************
+ Filename: hal_int.h
+
+ Description: HAL interrupt control header file
+
+******************************************************************************/
+
+
+#ifndef HAL_INT_H
+#define HAL_INT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************
+ * INCLUDES
+ */
+#include "hal_types.h"
+
+
+/******************************************************************************
+ * MACROS
+ */
+
+#if (defined __ICC430__) || defined(__MSP430__)
+
+// Use the macros below to reduce function call overhead for common
+// global interrupt control functions
+
+
+#if (defined __ICC430__)
+#define HAL_INT_ON(x) st( __enable_interrupt(); )
+#define HAL_INT_OFF(x) st( __disable_interrupt(); )
+#define HAL_INT_LOCK(x) st( (x) = __get_interrupt_state(); \
+ __disable_interrupt(); )
+#define HAL_INT_UNLOCK(x) st( __set_interrupt_state(x); )
+#endif
+
+#if (defined __MSP430__)
+#define HAL_INT_ON(x) st( _enable_interrupts(); )
+#define HAL_INT_OFF(x) st( _disable_interrupts(); )
+#define HAL_INT_LOCK(x) st( (x) = _get_SR_register(); \
+ _disable_interrupts(); )
+#define HAL_INT_UNLOCK(x) st( _enable_interrupts(); /*_bis_SR_register(x);*/ )
+#endif
+
+#elif defined __ICC8051__
+
+#define HAL_INT_ON(x) st( EA = 1; )
+#define HAL_INT_OFF(x) st( EA = 0; )
+#define HAL_INT_LOCK(x) st( (x) = EA; EA = 0; )
+#define HAL_INT_UNLOCK(x) st( EA = (x); )
+
+typedef unsigned short istate_t;
+
+#elif defined WIN32
+
+#define HAL_INT_ON()
+#define HAL_INT_OFF()
+#define HAL_INT_LOCK(x) st ((x)= 1; )
+#define HAL_INT_UNLOCK(x)
+
+#elif defined __KEIL__
+
+#define HAL_INT_ON(x) st( EA = 1; )
+#define HAL_INT_OFF(x) st( EA = 0; )
+#define HAL_INT_LOCK(x) st( (x) = EA; EA = 0; )
+#define HAL_INT_UNLOCK(x) st( EA = (x); )
+
+
+
+#else
+#error "Unsupported compiler"
+#endif
+
+
+/******************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+
+void halIntOn(void);
+void halIntOff(void);
+uint16 halIntLock(void);
+void halIntUnlock(uint16 key);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_joystick.h b/CC2530 BasicRF/source/components/targets/interface/hal_joystick.h
new file mode 100644
index 0000000..dd5f269
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_joystick.h
@@ -0,0 +1,81 @@
+/***********************************************************************************
+ Filename: hal_joystick.h
+
+ Description: HAL joystick control header file
+
+***********************************************************************************/
+
+#ifndef HAL_JOYSTICK_H
+#define HAL_JOYSTICK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+
+/***********************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+enum {
+ HAL_JOYSTICK_EVT_UP,
+ HAL_JOYSTICK_EVT_DOWN,
+ HAL_JOYSTICK_EVT_LEFT,
+ HAL_JOYSTICK_EVT_RIGHT,
+ HAL_JOYSTICK_EVT_CENTER,
+ HAL_JOYSTICK_EVT_PUSHED,
+ HAL_JOYSTICK_EVT_MAX,
+ HAL_JOYSTICK_EVT_INVALID
+};
+
+/***********************************************************************************
+ * GLOBAL FUNCTIONS and MACROS
+ */
+
+void halJoystickInit(void);
+uint8 halJoystickIntConnect(uint8 event, ISR_FUNC_PTR func);
+uint8 halJoystickIntEnable(uint8 event);
+void halJoystickIntDisable(void);
+uint8 halJoystickPushed(void);
+uint8 halJoystickGetDir(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_lcd.h b/CC2530 BasicRF/source/components/targets/interface/hal_lcd.h
new file mode 100644
index 0000000..66073cd
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_lcd.h
@@ -0,0 +1,118 @@
+/***********************************************************************************
+ Filename: hal_lcd.h
+
+ Description: hal lcd library header file
+
+***********************************************************************************/
+
+#ifndef HAL_LCD_H
+#define HAL_LCD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+
+
+/***********************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+
+enum {
+ HAL_LCD_RADIX_DEC,
+ HAL_LCD_RADIX_HEX
+};
+
+enum {
+ HAL_LCD_LINE_1 = 1,
+ HAL_LCD_LINE_2,
+ HAL_LCD_LINE_3,
+ /* 5/7/2010 ++ by outman from feibit */
+ HAL_LCD_LINE_4
+};
+
+/* LCD Control lines */
+#define HAL_LCD_MODE_PORT 0
+#define HAL_LCD_MODE_PIN 0
+
+#define HAL_LCD_RESET_PORT 1
+#define HAL_LCD_RESET_PIN 1
+
+#define HAL_LCD_CS_PORT 1
+#define HAL_LCD_CS_PIN 2
+
+/* LCD SPI lines */
+#define HAL_LCD_CLK_PORT 1
+#define HAL_LCD_CLK_PIN 5
+
+#define HAL_LCD_MOSI_PORT 1
+#define HAL_LCD_MOSI_PIN 6
+
+/*No output data comes from LCD 30/8/2010 ++ by feibit */
+//#define HAL_LCD_MISO_PORT 1
+//#define HAL_LCD_MISO_PIN 7
+
+/* LCD backlight control pin */
+#define HAL_LCD_BK_PORT 0
+#define HAL_LCD_BK_PIN 7
+/***********************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+
+void halLcdInit(void);
+void halLcdClear(void);
+//void halLcdClearLine(uint8 line);
+void halLcdSetContrast(uint8 value);
+uint8 halLcdGetLineLength(void);
+uint8 halLcdGetNumLines(void);
+
+void halLcdWriteChar(uint8 line, uint8 col, char text);
+void halLcdWriteLine(uint8 line, const char XDATA *text);
+void halLcdWriteLines(const char XDATA *line1, const char XDATA *line2, const char XDATA *line3);
+
+void halLcdClearAllSpecChars(void);
+void halLcdCreateSpecChar(uint8 index, const char XDATA *p5x8Spec);
+void halLcdWriteSpecChar(uint8 line, uint8 col, uint8 index);
+
+#ifdef __cplusplus
+}
+#endif
+
+/**********************************************************************************/
+#endif
+
+/***********************************************************************************
+ Copyright 2007-2009 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_led.h b/CC2530 BasicRF/source/components/targets/interface/hal_led.h
new file mode 100644
index 0000000..82b6f67
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_led.h
@@ -0,0 +1,66 @@
+/***********************************************************************************
+ Filename: hal_led.h
+
+ Description: hal led library header file
+
+***********************************************************************************/
+
+#ifndef HAL_LED_H
+#define HAL_LED_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+
+/***********************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+void halLedInit(void);
+void halLedSet(uint8 led_id);
+void halLedClear(uint8 led_id);
+void halLedToggle(uint8 led_id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_mcu.h b/CC2530 BasicRF/source/components/targets/interface/hal_mcu.h
new file mode 100644
index 0000000..58d89a8
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_mcu.h
@@ -0,0 +1,90 @@
+/***********************************************************************************
+ Filename: hal_mcu.h
+
+ Description: hal mcu library header file
+
+***********************************************************************************/
+
+#ifndef HAL_MCU_H
+#define HAL_MCU_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include
+
+
+/***********************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+enum { // Input values to halMcuSetLowPowerMode()
+ HAL_MCU_LPM_0,
+ HAL_MCU_LPM_1,
+ HAL_MCU_LPM_2,
+ HAL_MCU_LPM_3,
+ HAL_MCU_LPM_4
+};
+
+
+enum { // Return values of halMcuGetResetCause()
+ HAL_MCU_RESET_CAUSE_POR,
+ HAL_MCU_RESET_CAUSE_EXTERNAL,
+ HAL_MCU_RESET_CAUSE_WATCHDOG
+};
+
+
+/***********************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+
+void halMcuInit(void);
+void halMcuWaitUs(uint16 usec);
+void halMcuWaitMs(uint16 msec);
+void halMcuSetLowPowerMode(uint8 mode);
+void halMcuReset(void);
+uint8 halMcuGetResetCause(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/**********************************************************************************/
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_rf.h b/CC2530 BasicRF/source/components/targets/interface/hal_rf.h
new file mode 100644
index 0000000..419ea92
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_rf.h
@@ -0,0 +1,120 @@
+/***********************************************************************************
+
+ Filename: hal_rf.h
+
+ Description: HAL radio interface header file
+
+***********************************************************************************/
+
+
+#ifndef HAL_RF_H
+#define HAL_RF_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include
+
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+// Chip ID's
+#define HAL_RF_CHIP_ID_CC1100 0x00
+#define HAL_RF_CHIP_ID_CC1110 0x01
+#define HAL_RF_CHIP_ID_CC1111 0x11
+#define HAL_RF_CHIP_ID_CC2420 0x02
+#define HAL_RF_CHIP_ID_CC2500 0x80
+#define HAL_RF_CHIP_ID_CC2510 0x81
+#define HAL_RF_CHIP_ID_CC2511 0x91
+#define HAL_RF_CHIP_ID_CC2550 0x82
+#define HAL_RF_CHIP_ID_CC2520 0x84
+#define HAL_RF_CHIP_ID_CC2430 0x85
+#define HAL_RF_CHIP_ID_CC2431 0x89
+#define HAL_RF_CHIP_ID_CC2530 0xA5
+#define HAL_RF_CHIP_ID_CC2531 0xB5
+#define HAL_RF_CHIP_ID_CC2540 0x8D
+
+// CC2590/91 gain modes
+#define HAL_RF_GAIN_LOW 0
+#define HAL_RF_GAIN_HIGH 1
+
+// IEEE 802.15.4 defined constants (2.4 GHz logical channels)
+#define MIN_CHANNEL 11 // 2405 MHz
+#define MAX_CHANNEL 26 // 2480 MHz
+#define CHANNEL_SPACING 5 // MHz
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+// Generic RF interface
+uint8 halRfInit(void);
+uint8 halRfSetTxPower(uint8 power);
+uint8 halRfTransmit(void);
+void halRfSetGain(uint8 gainMode); // With CC2590/91 only
+
+uint8 halRfGetChipId(void);
+uint8 halRfGetChipVer(void);
+uint8 halRfGetRandomByte(void);
+uint8 halRfGetRssiOffset(void);
+
+void halRfWriteTxBuf(uint8* pData, uint8 length);
+void halRfReadRxBuf(uint8* pData, uint8 length);
+void halRfWaitTransceiverReady(void);
+uint8 halRfReadMemory(uint16 addr, uint8* pData, uint8 length);
+uint8 halRfWriteMemory(uint16 addr, uint8* pData, uint8 length);
+
+void halRfReceiveOn(void);
+void halRfReceiveOff(void);
+void halRfDisableRxInterrupt(void);
+void halRfEnableRxInterrupt(void);
+void halRfRxInterruptConfig(ISR_FUNC_PTR pfISR);
+
+
+
+// IEEE 802.15.4 specific interface
+void halRfSetChannel(uint8 channel);
+void halRfSetShortAddr(uint16 shortAddr);
+void halRfSetPanId(uint16 PanId);
+
+
+#endif
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_rf_security.h b/CC2530 BasicRF/source/components/targets/interface/hal_rf_security.h
new file mode 100644
index 0000000..12320ed
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_rf_security.h
@@ -0,0 +1,75 @@
+/***********************************************************************************
+
+ Filename: hal_rf_security.h
+
+ Description: HAL radio interface header file for security operations.
+
+***********************************************************************************/
+
+#ifndef HAL_RF_SECURITY_H
+#define HAL_RF_SECURITY_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+// IEEE 802.15.4 security (AES-128)
+#define KEY_LENGTH 16
+#define NONCE_LENGTH 16
+
+#define SECURITY_CONTROL 0x06 // MIC-64
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+// CCM security interface, IEEE 802.15.4
+void halRfSecurityInit(uint8* key, uint8* nonceRx, uint8* nonceTx);
+uint8 halRfReadRxBufSecure(uint8* pData, uint8 length, uint8 encrLength, uint8 authLength, uint8 m);
+void halRfWriteTxBufSecure(uint8* pData, uint8 length, uint8 encrLength, uint8 authLength, uint8 m);
+void halRfIncNonceTx(void);
+
+
+#endif
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_rf_util.h b/CC2530 BasicRF/source/components/targets/interface/hal_rf_util.h
new file mode 100644
index 0000000..48faba8
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_rf_util.h
@@ -0,0 +1,52 @@
+/*********************************************************************
+ Filename: hal_util_rf.h
+
+ Description:
+
+ Notes:
+
+ Copyright (c) 2006 by Texas Instruments, Inc.
+ All Rights Reserved. Permission to use, reproduce, copy, prepare
+ derivative works, modify, distribute, perform, display or sell this
+ software and/or its documentation for any purpose is prohibited
+ without the express written consent of Texas Instruments, Inc.
+*********************************************************************/
+#ifndef UTIL_RF
+#define UTIL_RF
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*********************************************************************
+ * INCLUDES
+ */
+
+
+
+/*********************************************************************
+ * CONSTANTS
+ */
+
+
+
+
+/*********************************************************************
+ * TYPEDEFS
+ */
+
+
+
+/*********************************************************************
+ * PUBLIC FUNCTIONS
+ */
+int8 halSampleED(uint8 channel, uint16 sampleTime);
+void halSetRxScanMode(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_timer_32k.h b/CC2530 BasicRF/source/components/targets/interface/hal_timer_32k.h
new file mode 100644
index 0000000..55dfe38
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_timer_32k.h
@@ -0,0 +1,74 @@
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+/***********************************************************************************
+ Filename: hal_timer_32k.h
+
+ Description: hal 32KHz timer library header file
+
+***********************************************************************************/
+
+#ifndef HAL_TIMER_H
+#define HAL_TIMER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+
+/***********************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+#define TIMER_32K_CLK_FREQ 32768
+
+/***********************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+void halTimer32kInit(uint16 cycles);
+void halTimer32kRestart(void);
+void halTimer32kIntConnect(ISR_FUNC_PTR isr);
+void halTimer32kIntEnable(void);
+void halTimer32kIntDisable(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/**********************************************************************************/
+#endif
+
diff --git a/CC2530 BasicRF/source/components/targets/interface/hal_uart.h b/CC2530 BasicRF/source/components/targets/interface/hal_uart.h
new file mode 100644
index 0000000..4de955c
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/interface/hal_uart.h
@@ -0,0 +1,94 @@
+/***********************************************************************************
+ Filename: hal_uart.h
+
+ Description: hal UART library header file
+
+***********************************************************************************/
+
+#ifndef HAL_UART_H
+#define HAL_UART_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+
+/***********************************************************************************
+ * CONSTANTS AND DEFINES
+ */
+/* Serial Port Baudrate Settings */
+#define HAL_UART_BAUDRATE_4800 0x01
+#define HAL_UART_BAUDRATE_9600 0x02
+#define HAL_UART_BAUDRATE_19200 0x03
+#define HAL_UART_BAUDRATE_38400 0x04
+#define HAL_UART_BAUDRATE_57600 0x05
+#define HAL_UART_BAUDRATE_115200 0x06
+
+/* Stop Bits */
+#define HAL_UART_ONE_STOP_BIT 0x01
+#define HAL_UART_TWO_STOP_BITS 0x02
+
+/* Parity settings */
+#define HAL_UART_NO_PARITY 0x04
+#define HAL_UART_EVEN_PARITY 0x08
+#define HAL_UART_ODD_PARITY 0x10
+
+/* Number of bits in data field */
+#define HAL_UART_7_BIT_DATA 0x20
+#define HAL_UART_8_BIT_DATA 0x40
+
+/***********************************************************************************
+ * GLOBAL FUNCTIONS
+ */
+void halUartInit(uint8 baudrate, uint8 options);
+uint16 halUartWrite(const uint8* buf, uint16 length);
+uint16 halUartRead(uint8* buf, uint16 length);
+uint16 halUartGetNumRxBytes(void);
+void halUartEnableRxFlow(uint8 enable);
+uint16 halUartBufferedWrite(const uint8* buf, uint16 length);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/**********************************************************************************/
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_assert.c b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_assert.c
new file mode 100644
index 0000000..c587f71
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_assert.c
@@ -0,0 +1,74 @@
+/***********************************************************************************
+ Filename: hal_assert.c
+
+ Description: Assert functionality
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_assert.h"
+#include "hal_led.h"
+#include "hal_mcu.h"
+#include "hal_defs.h"
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn halAssertHandler
+*
+* @brief Logic to handle an assert.
+*
+* @param none
+*
+* @return none
+***********************************************************************************
+*/
+void halAssertHandler(void)
+{
+ // execute code that handles asserts
+ // blink all leds
+ while(TRUE){
+ halLedToggle(1);
+ halLedToggle(2);
+ halLedToggle(3);
+ halLedToggle(4);
+ halMcuWaitMs(50);
+ }
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_board.c b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_board.c
new file mode 100644
index 0000000..43dd62b
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_board.c
@@ -0,0 +1,199 @@
+/***********************************************************************************
+ Filename: hal_board.c
+
+ Description: HAL board peripherals library for the
+ SmartRF05EB + CC2430EM/CC2531EM/CC2510/CC1110 platforms
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_defs.h"
+#include "hal_digio.h"
+#include "hal_int.h"
+#include "hal_mcu.h"
+#include "hal_board.h"
+#include "hal_lcd.h"
+#include "hal_joystick.h"
+#include "clock.h"
+#include "hal_uart.h" //ʼ»¯´®¿Ú0µÄ²¨ÌØÂÊΪ38400£¨½ÓRouter£©
+
+
+// comment: should this be here?
+#define SPI_CLOCK_POL_LO 0x00
+#define SPI_CLOCK_POL_HI 0x80
+#define SPI_CLOCK_PHA_0 0x00
+#define SPI_CLOCK_PHA_1 0x40
+#define SPI_TRANSFER_MSB_FIRST 0x20
+#define SPI_TRANSFER_MSB_LAST 0x00
+
+/***********************************************************************************
+* LOCAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* GLOBAL VARIABLES
+*/
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn halBoardInit
+*
+* @brief Set up board. Initialize MCU, configure I/O pins and user interfaces
+*
+* @param none
+*
+* @return none
+*/
+
+void halBoardInit(void)
+{
+ halMcuInit();
+
+ // LEDs
+#ifdef SRF05EB_VERSION_1_3
+ // SmartRF05EB rev 1.3 has only one accessible LED
+ MCU_IO_DIR_OUTPUT(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN);
+ HAL_LED_CLR_1();
+#else
+ MCU_IO_DIR_OUTPUT(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN);
+ HAL_LED_CLR_1();
+ MCU_IO_DIR_OUTPUT(HAL_BOARD_IO_LED_2_PORT, HAL_BOARD_IO_LED_2_PIN);
+ HAL_LED_CLR_2();
+ MCU_IO_DIR_OUTPUT(HAL_BOARD_IO_LED_3_PORT, HAL_BOARD_IO_LED_3_PIN);
+ HAL_LED_CLR_3();
+ MCU_IO_DIR_OUTPUT(HAL_BOARD_IO_LED_4_PORT, HAL_BOARD_IO_LED_4_PIN);
+ HAL_LED_CLR_4();
+#endif
+
+ // Buttons
+ MCU_IO_INPUT(HAL_BOARD_IO_BTN_1_PORT, HAL_BOARD_IO_BTN_1_PIN, MCU_IO_TRISTATE);
+
+ // Joystick push input
+ MCU_IO_INPUT(HAL_BOARD_IO_JOY_MOVE_PORT, HAL_BOARD_IO_JOY_MOVE_PIN, \
+ MCU_IO_TRISTATE);
+
+ // Analog input
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_JOYSTICK_ADC_PORT, HAL_BOARD_IO_JOYSTICK_ADC_PIN);
+
+
+ halLcdSpiInit();
+ halLcdInit();
+ halUartInit(38400); //³õʼ»¯´®¿Ú0µÄ²¨ÌØÂÊΪ38400£¨½ÓRouter£©
+
+ halIntOn();
+}
+
+
+/***********************************************************************************
+* @fn halLcdSpiInit
+*
+* @brief Initalise LCD SPI interface
+*
+* @param none
+*
+* @return none
+*/
+void halLcdSpiInit(void)
+{
+ register uint8 baud_exponent;
+ register uint8 baud_mantissa;
+
+
+ // Set SPI on UART 1 alternative 2
+ PERCFG |= 0x02;
+
+ // Use SPI on USART 1 alternative 2
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_SPI_MISO_PORT, HAL_BOARD_IO_SPI_MISO_PIN);
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_SPI_MOSI_PORT, HAL_BOARD_IO_SPI_MOSI_PIN);
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_SPI_CLK_PORT, HAL_BOARD_IO_SPI_CLK_PIN);
+
+ // Set SPI speed to 1 MHz (3 MHz is max on CC2511)
+# if (chip==2430 || chip==2431)
+ baud_exponent = 15 + CC2430_GET_CLKSPD();
+#elif (chip==2530 || chip==2531)
+ baud_exponent = 15 + CC2530_GET_CLKSPD();
+#elif (chip==2510 || chip==1110)
+ baud_exponent = 15 + CLKSPD_GET();
+#endif
+ baud_mantissa = 83;
+
+ // Configure peripheral
+ U1UCR = 0x80; // Flush and goto IDLE state. 8-N-1.
+ U1CSR = 0x00; // SPI mode, master.
+ U1GCR = SPI_TRANSFER_MSB_FIRST | SPI_CLOCK_PHA_0 | SPI_CLOCK_POL_LO | baud_exponent;
+ U1BAUD = baud_mantissa;
+}
+
+/***********************************************************************************
+* @fn halLcdSpiEn
+*
+* @brief Enable LCD SPI interface
+*
+* @param none
+*
+* @return none
+*/
+void halLcdSpiEna(void)
+{
+ // Use SPI on USART 1 alternative 2
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_SPI_MISO_PORT, HAL_BOARD_IO_SPI_MISO_PIN);
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_SPI_MOSI_PORT, HAL_BOARD_IO_SPI_MOSI_PIN);
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_SPI_CLK_PORT, HAL_BOARD_IO_SPI_CLK_PIN);
+}
+
+/***********************************************************************************
+* @fn halLcdSpiDis
+*
+* @brief Disable LCD SPI interface (set pins to input, except CS)
+*
+* @param none
+*
+* @return none
+*/
+void halLcdSpiDis(void)
+{
+ MCU_IO_INPUT(HAL_BOARD_IO_SPI_MISO_PORT, HAL_BOARD_IO_SPI_MISO_PIN, MCU_IO_TRISTATE);
+ MCU_IO_INPUT(HAL_BOARD_IO_SPI_MOSI_PORT, HAL_BOARD_IO_SPI_MOSI_PIN, MCU_IO_TRISTATE);
+ MCU_IO_INPUT(HAL_BOARD_IO_SPI_CLK_PORT, HAL_BOARD_IO_SPI_CLK_PIN, MCU_IO_TRISTATE);
+}
+
+
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_board.h b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_board.h
new file mode 100644
index 0000000..2c8fd0e
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_board.h
@@ -0,0 +1,196 @@
+/***********************************************************************************
+
+ Filename: hal_board.h
+
+ Description: SmartRF05 board with CCxxxxEM.
+
+***********************************************************************************/
+
+#ifndef HAL_BOARD_H
+#define HAL_BOARD_H
+
+#if (chip==2430)
+#include "ioCC2430.h"
+#elif (chip==2431)
+#include "ioCC2431.h"
+#elif (chip==2530 || chip==2531)
+#include "ioCC2530.h"
+#elif (chip==2510)
+#include "ioCC2510.h"
+#elif (chip==2511)
+#include "ioCC2511.h"
+#elif (chip==1110)
+#include "ioCC1110.h"
+#elif (chip==1111)
+#include "ioCC1111.h"
+#else
+#error "Chip not supported!"
+#endif
+
+#include "hal_cc8051.h"
+#include "hal_defs.h"
+#include "hal_mcu.h"
+
+/***********************************************************************************
+ * CONSTANTS
+ */
+
+// Board properties
+#define BOARD_NAME "SRF05EB"
+#define NUM_LEDS 4
+#define NUM_BUTTONS 2
+#define NUM_JSTKS 1
+#define NUM_POTS 1
+
+// Clock
+#if (chip==2430) || (chip==2431) || (chip==2530) || (chip==2531)
+#define BSP_CONFIG_CLOCK_MHZ 32
+#elif (chip==2510) || (chip==1110)
+#define BSP_CONFIG_CLOCK_MHZ 26
+#endif
+
+// SPI
+#define HAL_BOARD_IO_SPI_MISO_PORT 1
+#define HAL_BOARD_IO_SPI_MISO_PIN 7
+#define HAL_BOARD_IO_SPI_MOSI_PORT 1
+#define HAL_BOARD_IO_SPI_MOSI_PIN 6
+#define HAL_BOARD_IO_SPI_CLK_PORT 1
+#define HAL_BOARD_IO_SPI_CLK_PIN 5
+#define HAL_BOARD_IO_EM_CS_PORT 1
+#define HAL_BOARD_IO_EM_CS_PIN 4
+
+// LCD
+#define HAL_BOARD_IO_LCD_CS_PORT 1
+#define HAL_BOARD_IO_LCD_CS_PIN 2
+#define HAL_BOARD_IO_LCD_MODE_PORT 0
+#define HAL_BOARD_IO_LCD_MODE_PIN 0
+
+// LEDs
+#define HAL_BOARD_IO_LED_1_PORT 1 // Green
+#define HAL_BOARD_IO_LED_1_PIN 0
+#define HAL_BOARD_IO_LED_2_PORT 1 // Red
+#define HAL_BOARD_IO_LED_2_PIN 1
+#define HAL_BOARD_IO_LED_3_PORT 1 // Yellow
+#define HAL_BOARD_IO_LED_3_PIN 3
+#define HAL_BOARD_IO_LED_4_PORT 1 // Orange
+#define HAL_BOARD_IO_LED_4_PIN 4
+
+
+// Buttons
+#define HAL_BOARD_IO_BTN_1_PORT 1 // Button S1
+#define HAL_BOARD_IO_BTN_1_PIN 2
+
+// Potmeter
+#define HAL_POTMETER_ADC_PORT 0
+#define HAL_POTMETER_ADC_CH 7
+
+// Joystick
+#define HAL_BOARD_IO_JOYSTICK_ADC_PORT 0
+#define HAL_BOARD_IO_JOYSTICK_ADC_PIN 6
+#define HAL_BOARD_IO_JOY_MOVE_PORT 2
+#define HAL_BOARD_IO_JOY_MOVE_PIN 0
+
+// UART
+#define HAL_BOARD_IO_UART_RTS_PORT 0
+#define HAL_BOARD_IO_UART_RTS_PIN 5
+
+
+// Debounce
+#define HAL_DEBOUNCE(expr) { int i; for (i=0; i<500; i++) { if (!(expr)) i = 0; } }
+
+/***********************************************************************************
+ * MACROS
+ */
+
+// LED
+
+#ifdef SRF05EB_VERSION_1_3
+// SmartRF05EB rev 1.3 has only one accessible LED
+#define HAL_LED_SET_1() MCU_IO_SET_HIGH(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN)
+#define HAL_LED_SET_2()
+#define HAL_LED_SET_3()
+#define HAL_LED_SET_4()
+
+#define HAL_LED_CLR_1() MCU_IO_SET_LOW(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN)
+#define HAL_LED_CLR_2()
+#define HAL_LED_CLR_3()
+#define HAL_LED_CLR_4()
+
+#define HAL_LED_TGL_1() MCU_IO_TGL(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN)
+#define HAL_LED_TGL_2()
+#define HAL_LED_TGL_3()
+#define HAL_LED_TGL_4()
+
+#else
+// SmartRF05EB rev 1.7 and later has four LEDs available
+#define HAL_LED_SET_1() MCU_IO_SET_HIGH(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN)
+#define HAL_LED_SET_2() MCU_IO_SET_HIGH(HAL_BOARD_IO_LED_2_PORT, HAL_BOARD_IO_LED_2_PIN)
+#define HAL_LED_SET_3() MCU_IO_SET_HIGH(HAL_BOARD_IO_LED_3_PORT, HAL_BOARD_IO_LED_3_PIN)
+#define HAL_LED_SET_4() MCU_IO_SET_HIGH(HAL_BOARD_IO_LED_4_PORT, HAL_BOARD_IO_LED_4_PIN)
+
+#define HAL_LED_CLR_1() MCU_IO_SET_LOW(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN)
+#define HAL_LED_CLR_2() MCU_IO_SET_LOW(HAL_BOARD_IO_LED_2_PORT, HAL_BOARD_IO_LED_2_PIN)
+#define HAL_LED_CLR_3() MCU_IO_SET_LOW(HAL_BOARD_IO_LED_3_PORT, HAL_BOARD_IO_LED_3_PIN)
+#define HAL_LED_CLR_4() MCU_IO_SET_LOW(HAL_BOARD_IO_LED_4_PORT, HAL_BOARD_IO_LED_4_PIN)
+
+#define HAL_LED_TGL_1() MCU_IO_TGL(HAL_BOARD_IO_LED_1_PORT, HAL_BOARD_IO_LED_1_PIN)
+#define HAL_LED_TGL_2() MCU_IO_TGL(HAL_BOARD_IO_LED_2_PORT, HAL_BOARD_IO_LED_2_PIN)
+#define HAL_LED_TGL_3() MCU_IO_TGL(HAL_BOARD_IO_LED_3_PORT, HAL_BOARD_IO_LED_3_PIN)
+#define HAL_LED_TGL_4() MCU_IO_TGL(HAL_BOARD_IO_LED_4_PORT, HAL_BOARD_IO_LED_4_PIN)
+#endif
+
+// Buttons
+#ifdef SRF05EB_VERSION_1_3
+#define HAL_BUTTON_1_PUSHED() (!MCU_IO_GET(HAL_BOARD_IO_BTN_1_PORT, \
+ HAL_BOARD_IO_BTN_1_PIN))
+#else
+#define HAL_BUTTON_1_PUSHED() (MCU_IO_GET(HAL_BOARD_IO_BTN_1_PORT, \
+ HAL_BOARD_IO_BTN_1_PIN))
+#endif
+
+// Joystick
+#define HAL_JOYSTICK_LEVEL() (MCU_IO_GET(HAL_BOARD_IO_JOYSTICK_ADC_PORT, \
+ HAL_BOARD_IO_JOYSTICK_ADC_CH_PIN)
+
+#define HAL_JOYSTICK_UP() ( halJoystickGetDir()==HAL_JOYSTICK_EVT_UP )
+#define HAL_JOYSTICK_DOWN() ( halJoystickGetDir()==HAL_JOYSTICK_EVT_DOWN )
+#define HAL_JOYSTICK_LEFT() ( halJoystickGetDir()==HAL_JOYSTICK_EVT_LEFT )
+#define HAL_JOYSTICK_RIGHT() ( halJoystickGetDir()==HAL_JOYSTICK_EVT_RIGHT )
+
+// UART RTS
+#define HAL_RTS_SET() MCU_IO_SET_HIGH(HAL_BOARD_IO_UART_RTS_PORT, \
+ HAL_BOARD_IO_UART_RTS_PIN)
+#define HAL_RTS_CLR() MCU_IO_SET_LOW(HAL_BOARD_IO_UART_RTS_PORT, \
+ HAL_BOARD_IO_UART_RTS_PIN)
+#define HAL_RTS_DIR_OUT() MCU_IO_OUTPUT(HAL_BOARD_IO_UART_RTS_PORT, \
+ HAL_BOARD_IO_UART_RTS_PIN, 1)
+
+
+// LCD SPI interface control
+#define LCD_SPI_BEGIN() MCU_IO_SET_LOW(HAL_BOARD_IO_LCD_CS_PORT, HAL_BOARD_IO_LCD_CS_PIN)
+#define LCD_SPI_TX(x) st( U1CSR &= ~0x02; U1DBUF = x; )
+#define LCD_SPI_RX() U1DBUF
+#define LCD_SPI_WAIT_RXRDY() st( while((U1CSR & 0x02) != 0x02); )
+#define LCD_SPI_END() st( NOP(); NOP(); NOP(); NOP(); \
+ MCU_IO_SET_HIGH(HAL_BOARD_IO_LCD_CS_PORT, HAL_BOARD_IO_LCD_CS_PIN); )
+
+// LCD pin control
+#define LCD_DO_WRITE() MCU_IO_SET_HIGH(HAL_BOARD_IO_LCD_MODE_PORT, HAL_BOARD_IO_LCD_MODE_PIN)
+#define LCD_DO_CONTROL() MCU_IO_SET_LOW(HAL_BOARD_IO_LCD_MODE_PORT, HAL_BOARD_IO_LCD_MODE_PIN)
+
+// Port initialization
+#define LCD_CTRL_INIT_PORTS() st( MCU_IO_OUTPUT(HAL_BOARD_IO_LCD_CS_PORT, HAL_BOARD_IO_LCD_CS_PIN, 1); \
+ MCU_IO_OUTPUT(HAL_BOARD_IO_LCD_MODE_PORT, HAL_BOARD_IO_LCD_MODE_PIN, 1); )
+
+// HAL processing not required for this board
+#define HAL_PROCESS()
+
+/***********************************************************************************
+ * FUNCTION PROTOTYPES
+ */
+void halBoardInit(void);
+void halLcdSpiInit(void);
+void halLcdSpiEna(void);
+void halLcdSpiDis(void);
+
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_button.c b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_button.c
new file mode 100644
index 0000000..3ca090f
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_button.c
@@ -0,0 +1,79 @@
+/***********************************************************************************
+ Filename: hal_button.c
+
+ Description: HAL button implementation for CCSoC + SmartRF05EB
+
+ Copyright 2007 Texas Instruments, Inc.
+***********************************************************************************/
+#include "hal_types.h"
+#include "hal_board.h"
+#include "hal_button.h"
+#include "hal_cc8051.h"
+
+
+/******************************************************************************
+* @fn halButtonInit
+*
+* @brief
+* Initializes the button functionality
+*
+* Parameters:
+*
+* @param void
+*
+* @return void
+*
+******************************************************************************/
+void halButtonInit(void)
+{
+ // Button push input
+ MCU_IO_INPUT(HAL_BOARD_IO_BTN_1_PORT, HAL_BOARD_IO_BTN_1_PIN, MCU_IO_TRISTATE);
+}
+
+
+/******************************************************************************
+* @fn halButtonPushed
+*
+* @brief
+* This function detects if 'S1' is being pushed. The function
+* implements software debounce. Return true only if previuosly called
+* with button not pushed. Return true only once each time the button
+* is pressed.
+*
+* Parameters:
+*
+* @param void
+*
+* @return uint8
+* 1: Button is being pushed
+* 0: Button is not being pushed
+*
+******************************************************************************/
+uint8 halButtonPushed(void)
+{
+ extern volatile uint8 led4State;
+
+ uint8 v= HAL_BUTTON_NONE;
+
+#ifdef SRF05EB_VERSION_1_3
+ if (HAL_BUTTON_1_PUSHED()) {
+ HAL_DEBOUNCE(!HAL_BUTTON_1_PUSHED());
+ v= HAL_BUTTON_1;
+ }
+
+#else
+
+ // Need to set direction because the button is shared with LED4 on SmartRF05EB rev 1.7+
+ MCU_IO_INPUT(HAL_BOARD_IO_BTN_1_PORT, HAL_BOARD_IO_BTN_1_PIN, MCU_IO_TRISTATE);
+
+ if (HAL_BUTTON_1_PUSHED()) {
+ HAL_DEBOUNCE(!HAL_BUTTON_1_PUSHED());
+ v= HAL_BUTTON_1;
+ }
+
+ // Restore for use with LED
+ MCU_IO_OUTPUT(HAL_BOARD_IO_LED_4_PORT, HAL_BOARD_IO_LED_4_PIN, led4State);
+#endif
+
+ return v;
+}
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_digio.c b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_digio.c
new file mode 100644
index 0000000..7fc4573
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_digio.c
@@ -0,0 +1,562 @@
+
+/***********************************************************************************
+ Filename: hal_digio.c
+
+ Description: HAL digital IO functionality
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_defs.h"
+#include "hal_board.h"
+#include "hal_int.h"
+#include "hal_digio.h"
+
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+static ISR_FUNC_PTR port0_isr_tbl[8] = {0};
+static ISR_FUNC_PTR port1_isr_tbl[8] = {0};
+static ISR_FUNC_PTR port2_isr_tbl[5] = {0};
+
+
+/* Find a better place for this! */
+#if chip==2430 || chip==2431
+#define PICTL_PADSC_BM 0x40
+#define PICTL_P2IEN_BM 0x20
+#define PICTL_P0IENH_BM 0x10
+#define PICTL_P0IENL_BM 0x08
+#define PICTL_P2ICON_BM 0x04
+#define PICTL_P1ICON_BM 0x02
+#define PICTL_P0ICON_BM 0x01
+#elif chip==2530 || chip==2531
+#define PICTL_PADSC_BM 0x80
+#define PICTL_P2IEN_BM 0x40
+#define PICTL_P0IENH_BM 0x20
+#define PICTL_P0IENL_BM 0x10
+#define PICTL_P2ICON_BM 0x08
+#define PICTL_P1ICONH_BM 0x04
+#define PICTL_P1ICONL_BM 0x02
+#define PICTL_P1ICON_BM 0x06 // Combined - for compatibility
+#define PICTL_P0ICON_BM 0x01
+#endif
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn halDigioConfig
+*
+* @brief Configure the pin as specified by p.
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+
+//comment: find better way of doing this. SFR registers can not be accessed by pointers, therefore code is different from MSP430 code
+// comment: currently support only P0 and P1
+uint8 halDigioConfig(const digioConfig* p)
+{
+ // register volatile uint8* dir;
+ register const uint8 bitmask = p->pin_bm;
+
+ // Sanity check
+ if ((bitmask == 0) || (bitmask != (uint8)BV(p->pin)))
+ {
+ return(HAL_DIGIO_ERROR);
+ }
+
+ switch(p->port)
+ {
+ case 0: P0SEL &= ~bitmask;
+ if (p->dir == HAL_DIGIO_OUTPUT)
+ {
+ if (p->initval == 1)
+ {
+ P0 |= bitmask;
+ }
+ else
+ {
+ P0 &= ~bitmask;
+ }
+ P0DIR |= bitmask;
+ }
+ else // input
+ {
+ P0DIR &= ~bitmask;
+ }
+ break;
+ case 1: P1SEL &= ~bitmask;
+ if (p->dir == HAL_DIGIO_OUTPUT)
+ {
+ if (p->initval == 1)
+ {
+ P1 |= bitmask;
+ }
+ else
+ {
+ P1 &= ~bitmask;
+ }
+ P1DIR |= bitmask;
+ }
+ else // input
+ {
+ P1DIR &= ~bitmask;
+ }
+ break;
+ case 2: P2SEL &= ~bitmask;
+ if (p->dir == HAL_DIGIO_OUTPUT)
+ {
+ if (p->initval == 1)
+ {
+ P2 |= bitmask;
+ }
+ else
+ {
+ P2 &= ~bitmask;
+ }
+ P2DIR |= bitmask;
+ }
+ else // input
+ {
+ P2DIR &= ~bitmask;
+ }
+ break;
+ //case 1: P1SEL &= ~bitmask; out = &P1OUT; dir = &P1DIR; break;
+ //case 2: P2SEL &= ~bitmask; out = &P2OUT; dir = &P2DIR; break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ return(HAL_DIGIO_OK);
+}
+
+
+/***********************************************************************************
+* @fn halDigioSet
+*
+* @brief Set output pin
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioSet(const digioConfig* p)
+{
+ if (p->dir == HAL_DIGIO_OUTPUT)
+ {
+ switch (p->port)
+ {
+ case 0: P0 |= p->pin_bm; break;
+ case 1: P1 |= p->pin_bm; break;
+ case 2: P2 |= p->pin_bm; break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ return(HAL_DIGIO_OK);
+ }
+ return(HAL_DIGIO_ERROR);
+}
+
+
+/***********************************************************************************
+* @fn halDigioClear
+*
+* @brief Clear output pin
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioClear(const digioConfig* p)
+{
+ if (p->dir == HAL_DIGIO_OUTPUT)
+ {
+ switch (p->port)
+ {
+ case 0: P0 &= ~p->pin_bm; break;
+ case 1: P1 &= ~p->pin_bm; break;
+ case 2: P2 &= ~p->pin_bm; break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ return(HAL_DIGIO_OK);
+ }
+ return(HAL_DIGIO_ERROR);
+}
+
+
+/***********************************************************************************
+* @fn halDigioToggle
+*
+* @brief Toggle output pin
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioToggle(const digioConfig* p)
+{
+ if (p->dir == HAL_DIGIO_OUTPUT)
+ {
+ switch (p->port)
+ {
+ case 0: P0 ^= p->pin_bm; break;
+ case 1: P1 ^= p->pin_bm; break;
+ case 2: P2 ^= p->pin_bm; break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ return(HAL_DIGIO_OK);
+ }
+ return(HAL_DIGIO_ERROR);
+}
+
+
+/***********************************************************************************
+* @fn halDigioGet
+*
+* @brief Get value on input pin
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioGet(const digioConfig* p)
+{
+ if (p->dir == HAL_DIGIO_INPUT)
+ {
+ switch (p->port)
+ {
+ case 0: return (P0 & p->pin_bm ? 1 : 0);
+ case 1: return (P1 & p->pin_bm ? 1 : 0);
+ case 2: return (P2 & p->pin_bm ? 1 : 0);
+ default: break;
+ }
+ }
+ return(HAL_DIGIO_ERROR);
+}
+
+
+/***********************************************************************************
+* @fn halDigioIntConnect
+*
+* @brief Connect function to IO interrupt
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+* ISR_FUNC_PTR func - pointer to function
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioIntConnect(const digioConfig *p, ISR_FUNC_PTR func)
+{
+ istate_t key;
+ HAL_INT_LOCK(key);
+ switch (p->port)
+ {
+ case 0: port0_isr_tbl[p->pin] = func; break;
+ case 1: port1_isr_tbl[p->pin] = func; break;
+ case 2: port2_isr_tbl[p->pin] = func; break;
+ default: HAL_INT_UNLOCK(key); return(HAL_DIGIO_ERROR);
+ }
+ halDigioIntClear(p);
+ HAL_INT_UNLOCK(key);
+ return(HAL_DIGIO_OK);
+}
+
+
+/***********************************************************************************
+* @fn halDigioIntEnable
+*
+* @brief Enable interrupt on IO pin
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioIntEnable(const digioConfig *p)
+{
+ switch (p->port)
+ {
+#if chip==2430 || chip==2431
+ case 0:
+ P0IE = 1; // set P0IE bit
+ if (p->pin < 4) {
+ PICTL |= PICTL_P0IENL_BM; // set P0IENL
+ }
+ else {
+ PICTL |= PICTL_P0IENH_BM; // set P0IENH
+ }
+ break;
+ case 1:
+ IEN2 |= 0x10; // set P1IE bit
+ P1IEN |= p->pin_bm;
+ break;
+ case 2:
+ IEN2 |= 0x02;
+ PICTL |= PICTL_P2IEN_BM; // Set P2IEN
+ break;
+ default:
+ return(HAL_DIGIO_ERROR);
+ }
+#elif chip==2530 || chip==2531
+ case 0:
+ P0IE = 1; // set P0IE bit
+ P0IEN |= p->pin_bm;
+ break;
+ case 1:
+ IEN2 |= 0x10; // set P1IE bit
+ P1IEN |= p->pin_bm;
+ break;
+ case 2:
+ IEN2 |= 0x02; // set P2IE bit
+ P2IEN |= p->pin_bm;
+ break;
+ default:
+ return(HAL_DIGIO_ERROR);
+ }
+#endif
+ return(HAL_DIGIO_OK);
+}
+
+
+/***********************************************************************************
+* @fn halDigioIntDisable
+*
+* @brief Disable interrupt on IO pin
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioIntDisable(const digioConfig *p)
+{
+ switch (p->port)
+ {
+#if chip==2430 || chip==2431
+ case 0:
+ if (p->pin < 4) {
+ PICTL &= ~PICTL_P0IENL_BM; // clear P0IENL
+ }
+ else {
+ PICTL &= ~PICTL_P0IENH_BM; // clear P0IENH
+ }
+ break;
+ case 1:
+ P1IEN &= ~p->pin_bm;
+ break;
+ case 2:
+ PICTL &= ~PICTL_P2IEN_BM; // Clear P2IEN
+ break;
+ default:
+ return(HAL_DIGIO_ERROR);
+ }
+#elif chip==2530 || chip==2531
+ case 0:
+ P0IEN &= ~p->pin_bm;
+ break;
+ case 1:
+ P1IEN &= ~p->pin_bm;
+ break;
+ case 2:
+ P2IEN &= ~p->pin_bm;
+ break;
+ default:
+ return(HAL_DIGIO_ERROR);
+ }
+#endif
+ return(HAL_DIGIO_OK);
+}
+
+
+/***********************************************************************************
+* @fn halDigioIntClear
+*
+* @brief Clear interrupt flag
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+uint8 halDigioIntClear(const digioConfig *p)
+{
+ switch (p->port)
+ {
+ case 0: P0IFG &= ~p->pin_bm; break;
+ case 1: P1IFG &= ~p->pin_bm; break;
+ case 2: P2IFG &= ~p->pin_bm; break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ return(HAL_DIGIO_OK);
+}
+
+
+/***********************************************************************************
+* @fn halDigioIntSetEdge
+*
+* @brief Set edge for IO interrupt
+*
+* @param digioConfig* p - pointer to configuration structure for IO pin
+* edge - HAL_DIGIO_INT_FALLING_EDGE or HAL_DIGIO_INT_RISING_EDGE
+*
+* @return uint8 - HAL_DIGIO_ERROR or HAL_DIGIO_OK
+*/
+
+// Comment: all pins on port are configured at same time
+uint8 halDigioIntSetEdge(const digioConfig *p, uint8 edge)
+{
+ switch(edge)
+ {
+ case HAL_DIGIO_INT_FALLING_EDGE:
+ switch(p->port)
+ {
+ case 0: PICTL |= PICTL_P0ICON_BM; // set P0ICON high
+ break;
+ case 1: PICTL |= PICTL_P1ICON_BM; // set P1ICON high
+ break;
+ case 2: PICTL |= PICTL_P2ICON_BM; // set P2ICON high
+ break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ break;
+
+ case HAL_DIGIO_INT_RISING_EDGE:
+ switch(p->port)
+ {
+ case 0: PICTL &= ~PICTL_P0ICON_BM; // set P0ICON low
+ break;
+ case 1: PICTL &= ~PICTL_P1ICON_BM; // set P0ICON low
+ break;
+ case 2: PICTL &= ~PICTL_P2ICON_BM; // set P0ICON low
+ break;
+ default: return(HAL_DIGIO_ERROR);
+ }
+ break;
+
+ default:
+ return(HAL_DIGIO_ERROR);
+ }
+ return(HAL_DIGIO_OK);
+}
+
+
+/***********************************************************************************
+* @fn port0_ISR
+*
+* @brief ISR framework for P0 digio interrupt
+*
+* @param none
+*
+* @return none
+*/
+HAL_ISR_FUNCTION(port0_ISR,P0INT_VECTOR)
+{
+ register uint8 i;
+ P0IF = 0;
+ if (P0IFG)
+ {
+ for (i = 0; i < 8; i++)
+ {
+ register const uint8 pinmask = 1 << i;
+ if (P0IFG & pinmask) {
+ if (port0_isr_tbl[i] != 0) {
+ (*port0_isr_tbl[i])();
+ }
+ P0IFG &= ~pinmask;
+ }
+ }
+ //__low_power_mode_off_on_exit();
+ }
+}
+
+/***********************************************************************************
+* @fn port1_ISR
+*
+* @brief ISR framework for P0 digio interrupt
+*
+* @param none
+*
+* @return none
+*/
+HAL_ISR_FUNCTION(port1_ISR,P1INT_VECTOR)
+{
+ register uint8 i;
+ P1IF = 0;
+ if (P1IFG)
+ {
+ for (i = 0; i < 8; i++)
+ {
+ register const uint8 pinmask = 1 << i;
+ if (P1IFG & pinmask) {
+ if (port1_isr_tbl[i] != 0) {
+ (*port1_isr_tbl[i])();
+ }
+ P1IFG &= ~pinmask;
+ }
+ }
+ //__low_power_mode_off_on_exit();
+ }
+}
+
+/***********************************************************************************
+* @fn port2_ISR
+*
+* @brief ISR framework for P2 digio interrupt
+*
+* @param none
+*
+* @return none
+*/
+HAL_ISR_FUNCTION(port2_ISR,P2INT_VECTOR)
+{
+ register uint8 i;
+ P2IF = 0;
+ if (P2IFG)
+ {
+ for (i = 0; i < 5; i++)
+ {
+ register const uint8 pinmask = 1 << i;
+ if (P2IFG & pinmask) {
+ if (port2_isr_tbl[i] != 0) {
+ (*port2_isr_tbl[i])();
+ }
+ P2IFG &= ~pinmask;
+ }
+ }
+ //__low_power_mode_off_on_exit();
+ }
+}
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_joystick.c b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_joystick.c
new file mode 100644
index 0000000..7906e4b
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_joystick.c
@@ -0,0 +1,330 @@
+/************************************************************************************
+ Filename: hal_joystick.c
+
+ Description: HAL joystick control implementation file
+
+ Copyright 2007 Texas Instruments, Inc.
+************************************************************************************/
+
+/************************************************************************************
+ * INCLUDES
+ */
+#include
+#include
+#include
+#include "hal_digio.h"
+#include "hal_int.h"
+
+
+/***********************************************************************************
+* DEFINTIONs
+*/
+#define xJOYSTICK_ISR
+
+/***********************************************************************************
+* CONSTANTS
+*/
+#define JOYSTICK_UP_BM BM(HAL_BOARD_IO_JOY_UP_PIN)
+#define JOYSTICK_DOWN_BM BM(HAL_BOARD_IO_JOY_DN_PIN)
+#define JOYSTICK_LEFT_BM BM(HAL_BOARD_IO_JOY_LT_PIN)
+#define JOYSTICK_RIGHT_BM BM(HAL_BOARD_IO_JOY_RT_PIN)
+
+
+#define HAL_BOARD_IO_JOYSTICK_ADC_CH HAL_BOARD_IO_JOYSTICK_ADC_PIN
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+#ifdef JOYSTICK_ISR
+static const digioConfig pinJoystickMove = {HAL_BOARD_IO_JOY_MOVE_PORT,
+ HAL_BOARD_IO_JOY_MOVE_PIN,
+ BV(HAL_BOARD_IO_JOY_MOVE_PIN),
+ HAL_DIGIO_INPUT, 0};
+static void halJoystickMoveISR(void);
+static ISR_FUNC_PTR joystick_isr_tbl[HAL_JOYSTICK_EVT_MAX] = {0};
+#endif
+
+/************************************************************************************
+* @fn halJoystickInit
+*
+* @brief Initializes the joystick functionality
+*
+* @param void
+*
+* @return void
+*
+************************************************************************************/
+void halJoystickInit(void)
+{
+ // Joystick push input
+ MCU_IO_INPUT(HAL_BOARD_IO_JOY_MOVE_PORT, HAL_BOARD_IO_JOY_MOVE_PIN, \
+ MCU_IO_TRISTATE);
+
+ // Analog input
+ MCU_IO_PERIPHERAL(HAL_BOARD_IO_JOYSTICK_ADC_PORT, HAL_BOARD_IO_JOYSTICK_ADC_PIN);
+
+#ifdef JOYSTICK_ISR
+ halDigioConfig(&pinJoystickMove);
+ halDigioIntSetEdge(&pinJoystickMove, HAL_DIGIO_INT_RISING_EDGE);
+ halDigioIntConnect(&pinJoystickMove, &halJoystickMoveISR);
+#endif
+}
+
+#ifdef JOYSTICK_ISR
+/***********************************************************************************
+* @fn halJoystickIntConnect
+*
+* @brief Connect isr for joystick move interrupt. The parameter event tells for
+* which joystick direction this isr should be called.
+*
+* @param event - Joystick direction
+* func - Pointer to function to connect
+*
+* @return none
+*/
+uint8 halJoystickIntConnect(uint8 event, ISR_FUNC_PTR func)
+{
+ istate_t key;
+ HAL_INT_LOCK(key);
+ switch(event) {
+ case HAL_JOYSTICK_EVT_UP:
+ joystick_isr_tbl[HAL_JOYSTICK_EVT_UP] = func;
+ break;
+ case HAL_JOYSTICK_EVT_DOWN:
+ joystick_isr_tbl[HAL_JOYSTICK_EVT_DOWN] = func;
+ break;
+ case HAL_JOYSTICK_EVT_LEFT:
+ joystick_isr_tbl[HAL_JOYSTICK_EVT_LEFT] = func;
+ break;
+ case HAL_JOYSTICK_EVT_RIGHT:
+ joystick_isr_tbl[HAL_JOYSTICK_EVT_RIGHT] = func;
+ break;
+ case HAL_JOYSTICK_EVT_PUSHED:
+ joystick_isr_tbl[HAL_JOYSTICK_EVT_PUSHED] = func;
+ break;
+ default:
+ HAL_INT_UNLOCK(key); return FAILED;
+ }
+ HAL_INT_UNLOCK(key);
+ return SUCCESS;
+}
+
+/***********************************************************************************
+* @fn halJoystickIntEnable
+*
+* @brief Enable joystick move interrupt
+*
+* @param event - Joystick direction
+*
+* @return none
+*/
+uint8 halJoystickIntEnable(uint8 event)
+{
+ // Ignore event parameter
+ halDigioIntEnable(&pinJoystickMove);
+ return SUCCESS;
+}
+
+
+/***********************************************************************************
+* @fn halJoystickIntDisable
+*
+* @brief Disable joystick move interrupt
+*
+* @param none
+*
+* @return none
+*/
+void halJoystickIntDisable(void)
+{
+ halDigioIntDisable(&pinJoystickMove);
+}
+
+/***********************************************************************************
+* @fn halJoystickIntClear
+*
+* @brief Clear pending joystick interrupts
+*
+* @param event - Joystick direction
+*
+* @return none
+*/
+void halJoystickIntClear(void)
+{
+ halDigioIntClear(&pinJoystickMove);
+}
+#endif
+
+
+/************************************************************************************
+* @fn halJoystickPushed
+*
+* @brief
+* This function detects if the joystick is being pushed. The function
+* implements software debounce. Return true only if previuosly called
+* with joystick not pushed. Return true only once each time the joystick
+* is pressed.
+*
+* Parameters:
+*
+* @param void
+*
+* @return uint8
+* 1: Button is being pushed
+* 0: Button is not being pushed
+*
+******************************************************************************/
+uint8 halJoystickPushed(void)
+{
+ uint8 value, active;
+ uint8 i;
+ static uint8 prevValue = 0;
+ uint16 adcValue;
+
+ // Criterion for button pushed:
+ // 3 times joystick active and in center position
+ value = 1;
+ for (i=0; i<3; i++) {
+ active = MCU_IO_GET(HAL_BOARD_IO_JOY_MOVE_PORT, HAL_BOARD_IO_JOY_MOVE_PIN);
+ adcValue = adcSampleSingle(ADC_REF_AVDD, ADC_9_BIT, \
+ HAL_BOARD_IO_JOYSTICK_ADC_CH);
+ // Only use 7 out of the 9 bits
+ adcValue = (adcValue & 0x7FC0) >> 8;
+ if (! active || adcValue < 0x54) {
+ // Joystick not active or not in center position
+ value = 0;
+ break;
+ }
+ halMcuWaitUs(3);
+ }
+
+ if (value){
+ if (!prevValue){
+ value = prevValue = 1;
+ halMcuWaitMs(100);
+
+ }
+ else {
+ value = 0;
+ }
+ }
+ else{
+ prevValue = 0;
+ }
+
+ return value;
+}
+
+/******************************************************************************
+* @fn halJoystickGetDir
+*
+* @brief
+* This function utilizes the ADC to give an indication of the current
+* position of the joystick. Current support is for 90 degrees
+* positioning only.
+*
+* The joystick control is encoded as an analog voltage. Keep on reading
+* the ADC until two consecutive key decisions are the same.
+*
+* Meassured values from the ADC:
+* -------------------------------------------
+* |Direction | Voltage | Value | Range |
+* -------------------------------------------
+* |UP | 0.31 V | 0x0D | 0x00-0x27 |
+* |DOWN | 1.16 V | 0x31 | 0x28-0x3B |
+* |LEFT | 1.62 V | 0x45 | 0x3C-0x49 |
+* |RIGHT | 1.81 V | 0x4D | 0x4A-0x53 |
+* |CENTER | 2.12 V | 0x5A | 0x54- |
+* -------------------------------------------
+*
+* Parameters:
+*
+* @param void
+*
+* @return uint8
+* DOWN: Joystick direction is down (270 degrees)
+* LEFT: Joystick direction is left (180 degrees)
+* RIGHT: Joystick direction is right (0 degrees)
+* UP: Joystick direction is up (90 degrees)
+* CENTER: Joystick direction is centred (passive position)
+*
+******************************************************************************/
+uint8 halJoystickGetDir(void)
+{
+ uint16 adcValue;
+ uint8 direction, directionOld;
+
+ do {
+ directionOld = direction;
+
+ adcValue = adcSampleSingle(ADC_REF_AVDD, ADC_9_BIT, \
+ HAL_BOARD_IO_JOYSTICK_ADC_CH);
+
+ // Only use 7 out of the 9 bits
+ adcValue = (adcValue & 0x7FC0) >> 8;
+
+ if (adcValue < 0x28) {
+ direction = HAL_JOYSTICK_EVT_UP;
+ } else if (adcValue < 0x3C) {
+ direction = HAL_JOYSTICK_EVT_DOWN;
+ } else if (adcValue < 0x4A) {
+ direction = HAL_JOYSTICK_EVT_LEFT;
+ } else if (adcValue < 0x54) {
+ direction = HAL_JOYSTICK_EVT_RIGHT;
+ } else {
+ direction = HAL_JOYSTICK_EVT_CENTER;
+ }
+
+ } while(direction != directionOld);
+
+ return direction;
+}
+
+#ifdef JOYSTICK_ISR
+/***********************************************************************************
+* @fn halJoystickMoveISR
+*
+* @brief Interrupt service routine for joystick move interrupt
+*
+* @param none
+*
+* @return none
+*/
+static void halJoystickMoveISR(void)
+{
+ uint8 direction = halJoystickGetDir();
+
+ switch(direction)
+ {
+ case HAL_JOYSTICK_EVT_DOWN:
+ if (joystick_isr_tbl[HAL_JOYSTICK_EVT_DOWN]){
+ (*joystick_isr_tbl[HAL_JOYSTICK_EVT_DOWN])();
+ }
+ break;
+ case HAL_JOYSTICK_EVT_LEFT:
+ if (joystick_isr_tbl[HAL_JOYSTICK_EVT_LEFT]){
+ (*joystick_isr_tbl[HAL_JOYSTICK_EVT_LEFT])();
+ }
+ break;
+ case HAL_JOYSTICK_EVT_RIGHT:
+ if (joystick_isr_tbl[HAL_JOYSTICK_EVT_RIGHT]){
+ (*joystick_isr_tbl[HAL_JOYSTICK_EVT_RIGHT])();
+ }
+ break;
+ case HAL_JOYSTICK_EVT_UP:
+ if (joystick_isr_tbl[HAL_JOYSTICK_EVT_UP]){
+ (*joystick_isr_tbl[HAL_JOYSTICK_EVT_UP])();
+ }
+ break;
+ case HAL_JOYSTICK_EVT_CENTER:
+ // Interrupt while in center means joystick is pushed
+ if (joystick_isr_tbl[HAL_JOYSTICK_EVT_PUSHED]){
+ (*joystick_isr_tbl[HAL_JOYSTICK_EVT_PUSHED])();
+ }
+ break;
+ default:
+ // no action
+ break;
+ }
+}
+#endif
diff --git a/CC2530 BasicRF/source/components/targets/srf05_soc/hal_led.c b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_led.c
new file mode 100644
index 0000000..e430f33
--- /dev/null
+++ b/CC2530 BasicRF/source/components/targets/srf05_soc/hal_led.c
@@ -0,0 +1,123 @@
+
+/***********************************************************************************
+ Filename: hal_led.c
+
+ Description: hal led library
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_led.h"
+#include "hal_board.h"
+
+/***********************************************************************************
+* GLOBAL VARIABLES
+*/
+// Stores state of led 4
+volatile uint8 led4State=0;
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn halLedSet
+*
+* @brief Turn LED on.
+*
+* @param uint8 id - led to set
+*
+* @return none
+*/
+void halLedSet(uint8 id)
+{
+ switch (id)
+ {
+ case 1: HAL_LED_SET_1(); break;
+ case 2: HAL_LED_SET_2(); break;
+ case 3: HAL_LED_SET_3(); break;
+ case 4: HAL_LED_SET_4(); led4State=1; break;
+
+ default: break;
+ }
+}
+
+
+/***********************************************************************************
+* @fn halLedClear
+*
+* @brief Turn LED off.
+*
+* @param uint8 id - led to clear
+*
+* @return none
+*/
+void halLedClear(uint8 id)
+{
+ switch (id)
+ {
+ case 1: HAL_LED_CLR_1(); break;
+ case 2: HAL_LED_CLR_2(); break;
+ case 3: HAL_LED_CLR_3(); break;
+ case 4: HAL_LED_CLR_4(); led4State=0; break;
+ default: break;
+ }
+}
+
+
+/***********************************************************************************
+* @fn halLedToggle
+*
+* @brief Change state of LED. If on, turn it off. Else turn on.
+*
+* @param uint8 id - led to toggle
+*
+* @return none
+*/
+void halLedToggle(uint8 id)
+{
+ switch (id)
+ {
+ case 1: HAL_LED_TGL_1(); break;
+ case 2: HAL_LED_TGL_2(); break;
+ case 3: HAL_LED_TGL_3(); break;
+ case 4: HAL_LED_TGL_4(); led4State ^= 1; break;
+ default: break;
+ }
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/utils/util.c b/CC2530 BasicRF/source/components/utils/util.c
new file mode 100644
index 0000000..cab5696
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util.c
@@ -0,0 +1,188 @@
+/***********************************************************************************
+
+ Filename: util.c
+
+ Description: Utility library
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+
+#include "util.h"
+#include "hal_defs.h"
+#include "hal_rf.h"
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn utilChipIdToStr
+*
+* @brief Converts a chip ID to a text string.
+*
+* @param uint8 chipID
+*
+* @return none
+*/
+const char* utilChipIdToStr(uint8 chipID)
+{
+ const char* szId;
+
+ switch(chipID) {
+ case HAL_RF_CHIP_ID_CC2420:
+ szId= "2420";
+ break;
+ case HAL_RF_CHIP_ID_CC2430:
+ szId= "2430";
+ break;
+ case HAL_RF_CHIP_ID_CC2431:
+ szId= "2431";
+ break;
+ case HAL_RF_CHIP_ID_CC2520:
+ szId= "2520";
+ break;
+ case HAL_RF_CHIP_ID_CC2530:
+ szId= "2530";
+ break;
+ case HAL_RF_CHIP_ID_CC2531:
+ szId= "2531";
+ break;
+ case HAL_RF_CHIP_ID_CC2510:
+ szId= "2510";
+ break;
+ case HAL_RF_CHIP_ID_CC2511:
+ szId= "2511";
+ break;
+ case HAL_RF_CHIP_ID_CC1110:
+ szId= "1110";
+ break;
+ case HAL_RF_CHIP_ID_CC1111:
+ szId= "1111";
+ break;
+ default:
+ szId= "----";
+ };
+
+ return szId;
+}
+
+/***********************************************************************************
+* @fn convInt32ToText
+*
+* @brief Converts 32 bit int to text
+*
+* @param int32 value
+*
+* @return char* - pointer to text buffer which is a file scope allocated array
+*/
+char* convInt32ToText(int32 value)
+{
+ static char pValueToTextBuffer[12];
+ char *pLast;
+ char *pFirst;
+ char last;
+ uint8 negative;
+
+ pLast = pValueToTextBuffer;
+
+ // Record the sign of the value
+ negative = (value < 0);
+ value = ABS(value);
+
+ // Print the value in the reverse order
+ do {
+ *(pLast++) = '0' + (uint8)(value % 10);
+ value /= 10;
+ } while (value);
+
+ // Add the '-' when the number is negative, and terminate the string
+ if (negative) *(pLast++) = '-';
+ *(pLast--) = 0x00;
+
+ // Now reverse the string
+ pFirst = pValueToTextBuffer;
+ while (pLast > pFirst) {
+ last = *pLast;
+ *(pLast--) = *pFirst;
+ *(pFirst++) = last;
+ }
+
+ return pValueToTextBuffer;
+}
+
+#ifndef WIN32
+/***********************************************************************************
+* @fn min
+*
+* @brief Return minimum of two values
+*
+* @param uint8 v1 - value 1
+* uint8 v2 - value 2
+*
+* @return uint8 - minimum of two values
+*/
+uint8 min(uint8 v1, uint8 v2)
+{
+ if(v1 < v2)
+ return v1;
+ else return v2;
+}
+
+/***********************************************************************************
+* @fn utilReverseBuf
+*
+* @brief reverse buffer
+*
+* @param uint8 pBuf - pointer to buffer
+* uint8 length - length of buffer
+*
+* @return void
+*/
+void utilReverseBuf(uint8* pBuf, uint8 length)
+{
+ uint8 temp;
+ uint8* pBufLast = (pBuf + length - 1);
+
+ while(pBufLast > pBuf){
+ temp = *pBuf;
+ *pBuf++ = *pBufLast;
+ *pBufLast-- = temp;
+ }
+}
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/utils/util.h b/CC2530 BasicRF/source/components/utils/util.h
new file mode 100644
index 0000000..dca4ca0
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util.h
@@ -0,0 +1,85 @@
+/***********************************************************************************
+
+ Filename: util.h
+
+ Description: Utility library header file
+
+***********************************************************************************/
+
+#ifndef UTIL_H
+#define UTIL_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+
+typedef struct {
+ const char* szDescr; // Textual description
+ const uint8 value; // Value
+} menuItem_t;
+
+typedef struct {
+ const menuItem_t* pMenuItems;
+ const uint8 nItems;
+} menu_t;
+
+
+
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+
+// Number of elements in an array
+#define N_ITEMS(arr) sizeof(arr)/sizeof(arr[0])
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+char* convInt32ToText(int32 value);
+const char* utilChipIdToStr(uint8 chipID);
+
+#ifndef WIN32
+uint8 min(uint8 v1, uint8 v2);
+void utilReverseBuf(uint8* pBuf, uint8 length);
+#endif
+
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/utils/util_buffer.c b/CC2530 BasicRF/source/components/utils/util_buffer.c
new file mode 100644
index 0000000..4fc2a07
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util_buffer.c
@@ -0,0 +1,202 @@
+/***********************************************************************************
+ Filename: util_buffer.c
+
+ Description: Ringbuffer implementation.
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "util_buffer.h"
+#include "hal_board.h"
+#include "hal_int.h"
+#include "hal_assert.h"
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+/***********************************************************************************
+* @fn bufInit
+*
+* @brief Initialise a ringbuffer. The buffer must be allocated by the
+* application.
+*
+* @param pBuf - pointer to the ringbuffer
+*
+* @return none
+*/
+void bufInit(ringBuf_t *pBuf)
+{
+ uint16 s;
+
+ // Critical section start
+ s = halIntLock();
+
+ pBuf->nBytes= 0;
+ pBuf->iHead= 0;
+ pBuf->iTail= 0;
+
+ // Critical section end
+ halIntUnlock(s);
+}
+
+
+/***********************************************************************************
+* @fn bufPut
+*
+* @brief Add bytes to the buffer.
+*
+* @param pBuf - pointer to the ringbuffer
+* pData - pointer to data to be appended to the buffer
+* nBytes - number of bytes
+*
+* @return Number of bytes copied to the buffer
+*/
+uint8 bufPut(ringBuf_t *pBuf, const uint8 *pData, uint8 nBytes)
+{
+ uint8 i;
+ uint16 s;
+
+ // Critical section start
+ s = halIntLock();
+
+ if (pBuf->nBytes+nBytes < BUF_SIZE) {
+
+ i= 0;
+ while(ipData[pBuf->iTail]= pData[i];
+ pBuf->iTail++;
+ if (pBuf->iTail==BUF_SIZE)
+ pBuf->iTail= 0;
+ i++;
+ }
+ pBuf->nBytes+= i;
+ } else {
+ i= 0;
+ }
+
+ // Critical section end
+ halIntUnlock(s);
+
+ return i;
+}
+
+
+/***********************************************************************************
+* @fn bufGet
+*
+* @brief Extract bytes from the buffer.
+*
+* @param pBuf - pointer to the ringbuffer
+* pData - pointer to data to be extracted
+* nBytes - number of bytes
+*
+* @return Bytes actually returned
+*/
+uint8 bufGet(ringBuf_t *pBuf, uint8 *pData, uint8 nBytes)
+{
+ uint8 i;
+ uint16 s;
+
+ // Critical section start
+ s = halIntLock();
+
+ i= 0;
+ while(inBytes) {
+ pData[i]= pBuf->pData[pBuf->iHead];
+ pBuf->iHead++;
+ if (pBuf->iHead==BUF_SIZE)
+ pBuf->iHead= 0;
+ i++;
+ }
+ pBuf->nBytes-= i;
+
+ // Critical section end
+ halIntUnlock(s);
+ return i;
+}
+
+
+/***********************************************************************************
+* @fn bufPeek
+*
+* @brief Read bytes from the buffer but leave them in the queue.
+*
+* @param pBuf - pointer to the ringbuffer
+* pData - pointer to data to be extracted
+* nBytes - number of bytes
+*
+* @return Bytes actually returned
+*/
+uint8 bufPeek(ringBuf_t *pBuf, uint8 *pData, uint8 nBytes)
+{
+ uint8 i,j;
+ uint16 s;
+
+ // Critical section start
+ s = halIntLock();
+
+ i= 0;
+ j= pBuf->iHead;
+ while(inBytes) {
+ pData[i]= pBuf->pData[j];
+ j++;
+ if (j==BUF_SIZE)
+ j= 0;
+ i++;
+ }
+
+ // Critical section end
+ halIntUnlock(s);
+ return i;
+}
+
+
+/***********************************************************************************
+* @fn bufNumBytes
+*
+* @brief Return the byte count for the ring buffer.
+*
+* @param pBuf- pointer to the buffer
+*
+* @return Number of bytes present.
+*/
+uint8 bufNumBytes(ringBuf_t *pBuf)
+{
+ return pBuf->nBytes;
+}
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
diff --git a/CC2530 BasicRF/source/components/utils/util_buffer.h b/CC2530 BasicRF/source/components/utils/util_buffer.h
new file mode 100644
index 0000000..a0c6574
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util_buffer.h
@@ -0,0 +1,88 @@
+/***********************************************************************************
+
+ Filename: util_buffer.h
+
+ Description: Ringbuffer interface
+
+***********************************************************************************/
+#ifndef UTIL_BUFFER_H
+#define UTIL_BUFFER_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+#ifndef BUF_SIZE
+#ifdef WIN32
+#define BUF_SIZE 256
+#else
+#define BUF_SIZE 64
+#endif
+#endif
+
+#if (BUF_SIZE > 256)
+#error "Buffer size too big"
+#endif
+
+/***********************************************************************************
+* TYPEDEFS
+*/
+typedef struct {
+ volatile uint8 pData[BUF_SIZE];
+ volatile uint8 nBytes;
+ volatile uint8 iHead;
+ volatile uint8 iTail;
+} ringBuf_t;
+
+/***********************************************************************************
+* MACROS
+*/
+#define bufFlush(pBuf) bufInit(pBuf)
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+void bufInit(ringBuf_t *pBuf);
+uint8 bufPut(ringBuf_t *pBuf, const uint8 *pData, uint8 n);
+uint8 bufGet(ringBuf_t *pBuf, uint8 *pData, uint8 n);
+uint8 bufPeek(ringBuf_t *pBuf, uint8 *pData, uint8 nBytes);
+uint8 bufNumBytes(ringBuf_t *pBuf);
+
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
diff --git a/CC2530 BasicRF/source/components/utils/util_lcd.c b/CC2530 BasicRF/source/components/utils/util_lcd.c
new file mode 100644
index 0000000..ab5ec55
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util_lcd.c
@@ -0,0 +1,423 @@
+/***********************************************************************************
+
+ Filename: util_lcd.c
+
+ Description: Utility library for LCD control
+
+***********************************************************************************/
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_board.h"
+#include "hal_lcd.h"
+#include "hal_joystick.h"
+#include "hal_button.h"
+#include "hal_assert.h"
+
+#include "util_lcd.h"
+#include "hal_rf.h"
+#include "string.h"
+
+
+#ifndef LCD_NOT_SUPPORTED
+
+/***********************************************************************************
+* LOCAL VARIABLES
+*/
+// Logo
+#if !defined(SRF04EB) && !defined(ASSY_EXP4618_CC2420)
+
+// For SRF05EB only
+#define SRF05EB
+
+static const char symbol1[8] = {0x03, 0x07, 0x0E, 0x0E, 0x1C, 0x19, 0x1B, 0x1B};
+static const char symbol2[8] = {0x1B, 0x1B, 0x19, 0x1C, 0x0E, 0x0E, 0x07, 0x03};
+static const char symbol3[8] = {0x18, 0x1E, 0x07, 0x03, 0x18, 0x1C, 0x06, 0x00};
+static const char symbol4[8] = {0x00, 0x06, 0x1C, 0x18, 0x03, 0x07, 0x1E, 0x18};
+
+const char ppBarGraphChar[8][8] = {
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F },
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F },
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F },
+ { 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F },
+ { 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F },
+ { 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F },
+ { 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F },
+ { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F },
+};
+#endif
+
+static char pLcdLineBuffer[16];
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+
+#ifdef ASSY_EXP4618_CC2420
+extern void halLcdWriteLine7Seg(const char *text);
+#endif
+
+
+/***********************************************************************************
+* @fn utilLcdMenuSelect
+*
+* @brief Show a horisontally scrolled text menu on the LCD. Text lines given in
+* an array is shown in line 2 of the LCD, these lines are browsable.
+* The menu is navigated by using the joystick left and right, and press
+* S1 button to select an option. The function then returns the element number
+* in the given menu list that was chosen by the user.
+*
+* @param ppMenu - pointer to list of texts to display for menu options
+* nMenuItems - number of menu options
+*
+* @return uint8 - index to which of the menu items that was chosen
+*/
+uint8 utilMenuSelect(const menu_t* pMenu)
+{
+ uint8 index;
+ uint8 updateLCD;
+ #ifdef SRF04EB
+ char pLcdLine2[30] = " ";
+ #endif
+
+ index= 0;
+ updateLCD= TRUE; // Force update first time
+
+ while (halButtonPushed()!=HAL_BUTTON_1) {
+ // Joystick input: Reset = UP, Decr = LEFT, Incr = RIGHT
+ if (halJoystickGetDir()==HAL_JOYSTICK_EVT_RIGHT) {
+ index++;
+ index %= pMenu->nItems;
+ updateLCD = TRUE;
+ } else if (halJoystickGetDir()==HAL_JOYSTICK_EVT_LEFT) {
+ if(index == 0)
+ index = pMenu->nItems-1;
+ else
+ index--;
+
+ updateLCD = TRUE;
+ }
+
+ if(updateLCD) {
+ // Display the updated value and arrows
+ #ifdef SRF04EB
+ // Make space for left arrow at left end of display
+ strncpy(&(pLcdLine2[1]), (char*)pMenu->pMenuItems[index].szDescr, halLcdGetLineLength()-2);
+ halLcdWriteLine(HAL_LCD_LINE_2, pLcdLine2);
+ halLcdWriteChar(HAL_LCD_LINE_2, 0, '<');
+ halLcdWriteChar(HAL_LCD_LINE_2, halLcdGetLineLength()-1, '>');
+ #elif defined(ASSY_EXP4618_CC2420)
+ halLcdWriteLine7Seg((char*)pMenu->pMenuItems[index].szDescr);
+ #else
+ halLcdWriteLine(HAL_LCD_LINE_2, (char*)pMenu->pMenuItems[index].szDescr);
+ halLcdWriteChar(HAL_LCD_LINE_3, 0, '<');
+ halLcdWriteChar(HAL_LCD_LINE_3, halLcdGetLineLength()-1, '>');
+ #endif
+
+ updateLCD = FALSE;
+ HAL_DEBOUNCE(halJoystickGetDir()==HAL_JOYSTICK_EVT_CENTER);
+ }
+ }
+
+ return pMenu->pMenuItems[index].value;
+}
+
+
+
+
+/***********************************************************************************
+* @fn utilPrintLogo
+*
+* @brief Prints splash screen and logo
+*
+* @param szAppName - String with name of application. Length of string must be
+ no longer than (LCD_LINE_LENGTH - 5)
+*
+* @return none
+*/
+void utilPrintLogo(char* szAppName)
+{
+ char lcdLine1[] = " CCxxxx ( )";
+ char lcdLine2[30]=" "; // Support up to 30 characters LCD line length
+ uint8 lcdLineLength = halLcdGetLineLength();
+
+ strncpy(&lcdLine1[5],utilChipIdToStr(halRfGetChipId()),4);
+ lcdLine1[11] = (char)halRfGetChipVer() + '0';
+
+ if( (strlen(szAppName)+strlen(lcdLine2)) <= lcdLineLength ) {
+ strcat(lcdLine2, szAppName);
+ }
+ #ifdef SRF04EB
+ halLcdWriteLine(HAL_LCD_LINE_1, lcdLine1);
+ halLcdWriteLine(HAL_LCD_LINE_2, lcdLine2);
+
+ #elif defined(ASSY_EXP4618_CC2420)
+ halLcdWriteLine7Seg(lcdLine1+3); // Only the chip name
+
+ #else // SRF05EB
+ halLcdCreateSpecChar(0, symbol1);
+ halLcdCreateSpecChar(1, symbol2);
+ halLcdCreateSpecChar(2, symbol3);
+ halLcdCreateSpecChar(3, symbol4);
+ halLcdWriteLine(HAL_LCD_LINE_1, lcdLine1);
+ halLcdWriteLine(HAL_LCD_LINE_2, lcdLine2);
+ halLcdWriteLine(HAL_LCD_LINE_3, " TI LPW");
+ halLcdWriteSpecChar(HAL_LCD_LINE_1, 0, 0);
+ halLcdWriteSpecChar(HAL_LCD_LINE_2, 0, 1);
+ halLcdWriteSpecChar(HAL_LCD_LINE_1, 1, 2);
+ halLcdWriteSpecChar(HAL_LCD_LINE_2, 1, 3);
+ #endif
+}
+
+
+/***********************************************************************************
+* @fn utilPrintText
+*
+* @brief Prints a text string across all lines of the display. Newlines
+* cause continuation on the next line.
+*
+* @param pTxt - text to display
+*
+* @param n - number of characters to print
+*
+* @return 0
+*/
+void utilPrintText(uint8* pTxt, uint8 n)
+{
+ uint8 li[3];
+ uint8 i, iLine, nChars, nLines;
+
+ // Display properties
+ nLines= halLcdGetNumLines();
+ nChars= nLines*halLcdGetLineLength();
+
+ // Split string on newlines
+ i= 0;
+ iLine= 0;
+ li[0]= 0;
+ li[1]= 0xff;
+ li[2]= 0xff;
+
+ while(i= min + 8) {
+ halLcdWriteSpecChar(line, col, 7);
+ } else {
+ halLcdWriteSpecChar(line, col, value - min - 1);
+ }
+}
+#endif
+
+
+/***********************************************************************************
+ * @fn utilLcdDisplayValue
+ *
+ * @brief Display value on display with optional text on right and left side
+ *
+ * @param uint8 line
+ * char *pLeft
+ * int32 value
+ * char *pRight
+ *
+ * @return none
+ */
+void utilLcdDisplayValue(uint8 line, char XDATA *pLeft, int32 value, char XDATA *pRight)
+{
+ char *pValue;
+ uint8 n;
+ uint8 nChars;
+
+ nChars= halLcdGetLineLength();
+ pValue = convInt32ToText(value);
+
+ for (n = 0; n < nChars; n++) {
+ if (pLeft && *pLeft) {
+ pLcdLineBuffer[n] = *(pLeft++);
+ } else if (*pValue) {
+ pLcdLineBuffer[n] = *(pValue++);
+ } else if (pRight && *pRight) {
+ pLcdLineBuffer[n] = *(pRight++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ halLcdWriteLine(line, pLcdLineBuffer);
+}
+
+
+
+/***********************************************************************************
+ * @fn utilLcdDisplayCounters
+ *
+ * @brief Display counter values with text on display
+ *
+ * @param uint8 line - display line
+ * int32 lValue - left value
+ * char lChar - left text
+ * int32 rValue - right value
+ * char rChar - right text
+ *
+ * @return none
+ */
+void utilLcdDisplayCounters(uint8 line, int32 lValue, char lChar, int32 rValue, char rChar)
+{
+ uint8 n;
+ char *pCounter;
+ uint8 nChars;
+
+ nChars= halLcdGetLineLength();
+
+ // Left part
+ pLcdLineBuffer[0] = lChar;
+ pLcdLineBuffer[1] = '=';
+ pCounter = convInt32ToText(lValue);
+ for (n = 2; n < 8; n++) {
+ if (*pCounter) {
+ pLcdLineBuffer[n] = *(pCounter++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ pLcdLineBuffer[8] = rChar;
+ pLcdLineBuffer[9] = '=';
+ pCounter = convInt32ToText(rValue);
+ for (n = 10; n < nChars; n++) {
+ if (*pCounter) {
+ pLcdLineBuffer[n] = *(pCounter++);
+ } else {
+ pLcdLineBuffer[n] = ' ';
+ }
+ }
+ halLcdWriteLine(line, pLcdLineBuffer);
+}
+
+
+
+static const char hex[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
+/***********************************************************************************
+ * @fn utilLcdDisplayUint16
+ *
+ * @brief Write a 16 bit value on the specified line on the LCD
+ *
+ * @param uint8 line - line on display
+ * uint8 radix - HAL_LCD_RADIX_DEC or HAL_LCD_RADIX_HEX
+ * uint16 value - value to display
+ *
+ * @return none
+ */
+void utilLcdDisplayUint16(uint8 line, uint8 radix, uint16 value)
+{
+
+ if (radix == HAL_LCD_RADIX_DEC)
+ {
+ uint8 n = 0;
+ uint8 c = 5;
+ char *pValue = convInt32ToText((uint32)value);
+ while (pValue[n]) n++;
+ while (n-- && c)
+ halLcdWriteChar(line, --c, pValue[n]);
+ while (c)
+ halLcdWriteChar(line, --c, ' ');
+ }
+ else if (radix == HAL_LCD_RADIX_HEX)
+ {
+ halLcdWriteChar(line, 0, '0');
+ halLcdWriteChar(line, 1, 'x');
+ halLcdWriteChar(line, 2, hex[(value & 0xF000) >> 12]);
+ halLcdWriteChar(line, 3, hex[(value & 0x0F00) >> 8]);
+ halLcdWriteChar(line, 4, hex[(value & 0x00F0) >> 4]);
+ halLcdWriteChar(line, 5, hex[(value & 0x000F)]);
+ }
+}
+
+#else
+
+void utilPrintText(uint8* pTxt, uint8 n) { }
+
+#endif
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
diff --git a/CC2530 BasicRF/source/components/utils/util_lcd.h b/CC2530 BasicRF/source/components/utils/util_lcd.h
new file mode 100644
index 0000000..c2aac80
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util_lcd.h
@@ -0,0 +1,76 @@
+/***********************************************************************************
+
+ Filename: util_lcd.h
+
+ Description: Utility library header file for LCD control
+
+***********************************************************************************/
+
+#ifndef UTIL_LCD_H
+#define UTIL_LCD_H
+
+/***********************************************************************************
+* INCLUDES
+*/
+#include "hal_types.h"
+#include "hal_lcd.h"
+#include "util.h"
+
+
+
+/***********************************************************************************
+* CONSTANTS AND DEFINES
+*/
+#define utilPrintStr(s) utilPrintText(s,sizeof(s))
+
+
+/***********************************************************************************
+* GLOBAL FUNCTIONS
+*/
+uint8 utilMenuSelect(const menu_t* pMenu);
+void utilPrintLogo(char* szAppName);
+void utilPrintText(uint8* pTxt, uint8 n);
+void utilLoadBarGraph(void);
+void utilDisplayBarGraph(uint8 line, uint8 col, uint8 min, uint8 value);
+void utilLcdDisplayValue(uint8 line, char XDATA *pLeft, int32 value, char XDATA *pRight);
+void utilLcdDisplayCounters(uint8 line, int32 lValue, char lChar, int32 rValue, char rChar);
+void utilLcdDisplayUint16(uint8 line, uint8 radix, uint16 value);
+
+
+
+#endif
+
+
+/***********************************************************************************
+ Copyright 2007 Texas Instruments Incorporated. All rights reserved.
+
+ IMPORTANT: Your use of this Software is limited to those specific rights
+ granted under the terms of a software license agreement between the user
+ who downloaded the software, his/her employer (which must be your employer)
+ and Texas Instruments Incorporated (the "License"). You may not use this
+ Software unless you agree to abide by the terms of the License. The License
+ limits your use, and you acknowledge, that the Software may not be modified,
+ copied or distributed unless embedded on a Texas Instruments microcontroller
+ or used solely and exclusively in conjunction with a Texas Instruments radio
+ frequency transceiver, which is integrated into your product. Other than for
+ the foregoing purpose, you may not use, reproduce, copy, prepare derivative
+ works of, modify, distribute, perform, display or sell this Software and/or
+ its documentation for any purpose.
+
+ YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
+ PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
+ NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
+ TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
+ NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
+ LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+ INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
+ OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
+ OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+ (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+
+ Should you have any questions regarding your right to use this Software,
+ contact Texas Instruments Incorporated at www.TI.com.
+***********************************************************************************/
+
+
diff --git a/CC2530 BasicRF/source/components/utils/util_menu.h b/CC2530 BasicRF/source/components/utils/util_menu.h
new file mode 100644
index 0000000..0c7af4c
--- /dev/null
+++ b/CC2530 BasicRF/source/components/utils/util_menu.h
@@ -0,0 +1,73 @@
+/*********************************************************************
+
+ Filename: util_menu.h
+
+ Description: UART based one-key menu.
+
+*********************************************************************/
+
+#ifndef UTIL_MENU_H
+#define UTIL_MENU_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*********************************************************************
+ * INCLUDES
+ */
+
+
+#include "hal_types.h"
+
+
+/*********************************************************************
+ * CONSTANTS
+ */
+
+#define MENU_ID_APP 0
+
+#define MENU_ID_ROOT 1
+#define MENU_ID_NWK 2
+#define MENU_ID_HAL 3
+#define N_MAX_MENUES 4
+
+
+/*********************************************************************
+ * TYPEDEFS
+ */
+
+typedef struct {
+ uint8 cmd; // Single key user command
+ const char FAR *szDecsr;// Textual description
+ void (*pfCmd)(void); // Function; 0 arguments
+} MenuItem;
+
+
+typedef struct _menuItem {
+ struct _menuItem *pParent;
+ const char FAR *szPrompt;
+ MenuItem FAR *pFirst;
+} Menu;
+
+/*********************************************************************
+ * PUBLIC FUNCTIONS
+ */
+
+void menuInit(void);
+void menuInstall(uint8 iMenuID, MenuItem FAR *pMenuHandle, const char FAR *szPr);
+uint8 menuCmdExec(uint8 *pBuf, uint8 nBytes);
+void menuPrint(void);
+void menuPrintPrompt(void);
+void menuPrintItem(MenuItem FAR *p);
+uint8 menuIsInstalled(uint8 iMenuID);
+void menuSelect(uint8 iMenuID);
+MenuItem FAR *menuFindItem(Menu *pMenu, uint8 cmd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/README.en.md b/README.en.md
deleted file mode 100644
index e28af88..0000000
--- a/README.en.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# CC2530Projects
-
-#### Description
-CC2530实è®é¡¹ç›®
-
-#### Software Architecture
-Software architecture description
-
-#### Installation
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Instructions
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Contribution
-
-1. Fork the repository
-2. Create Feat_xxx branch
-3. Commit your code
-4. Create Pull Request
-
-
-#### Gitee Feature
-
-1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
-2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
-3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
-4. The most valuable open source project [GVP](https://gitee.com/gvp)
-5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
-6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
diff --git a/README.md b/README.md
index d245771..3b28cb2 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,22 @@
# CC2530Projects
#### 介�
-CC2530实è®é¡¹ç›®
+本项目包å�«CC2530实è®ç¨‹åº�代ç �。
-#### 软件架构
-软件架构说明
+#### 文件说明
+* 01. CC2530BasicRF A/Bæ�¿ä¹‹é—´æ— 线开关ç�¯å®žéªŒ
+* 02. show_password 通过点亮ä¸�å�Œé¡ºåº�的四个ç�¯,分别显示 C639 这四ä½�密ç �
+* 03. task002 é€šè¿‡æŒ‰é”®ä¸æ–å®žçŽ°å½“è¿žç»æŒ‰ä¸‹5次的时候改å�˜LED状æ€�
+* 04. task004 é€šè¿‡æŒ‰é”®ä¸æ–å’Œå®šæ—¶å™¨ä¸æ–实现按键改å�˜LEDé—ªçƒ�周期,分别由快到慢å†�到熄ç�
+* 05. task005 通过串�与上�机进行通信,�隔固定时间��一次数�
+* 06. task006 呼��
+* 07. task007 四个LED�时闪�
+* 08. task008 对SW1进行上é”�/è§£é”�功能:通过判æ–SW1点击状æ€�进行LEDé—ªçƒ�或者SW1上é”�/è§£é”�。
+* 09. homework 点击SW1改�LED状�
+* 10. task010 ä¸€é˜¶æ®µè€ƒæ ¸ï¼šé€šè¿‡SW1对æµ�æ°´ç�¯è¿›è¡Œæ“�作,当按下SW1æ—¶æš‚å�œæµ�æ°´ç�¯å¹¶ä¿�æŒ�当å‰�状æ€�,当å†�次按下时在上次ä¿�å˜çжæ€�开始继ç»å�‘下执行。
-#### 安装教程
-1. xxxx
-2. xxxx
-3. xxxx
+#### 个人�客
+1. Asryn's blog [inik.cc](https://inik.cc)
-#### 使用说明
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### �与贡献
-
-1. Fork 本仓库
-2. 新建 Feat_xxx 分支
-3. æ��交代ç �
-4. 新建 Pull Request
-
-
-#### 特技
-
-1. 使用 Readme\_XXX.md æ�¥æ”¯æŒ�ä¸�å�Œçš„è¯è¨€ï¼Œä¾‹å¦‚ Readme\_en.md, Readme\_zh.md
-2. Gitee 官方�客 [blog.gitee.com](https://blog.gitee.com)
-3. ä½ å�¯ä»¥ [https://gitee.com/explore](https://gitee.com/explore) 这个地å�€æ�¥äº†è§£ Gitee 上的优秀开æº�项目
-4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开�项目,是综�评定出的优秀开�项目
-5. Gitee 官方�供的使用手册 [https://gitee.com/help](https://gitee.com/help)
-6. Gitee å°�é�¢äººç‰©æ˜¯ä¸€æ¡£ç”¨æ�¥å±•示 Gitee 会员风采的æ �ç›® [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
diff --git a/homework/Debug/Exe/homework.d51 b/homework/Debug/Exe/homework.d51
new file mode 100644
index 0000000..3533bc7
Binary files /dev/null and b/homework/Debug/Exe/homework.d51 differ
diff --git a/homework/Debug/Obj/code.pbi b/homework/Debug/Obj/code.pbi
new file mode 100644
index 0000000..c3d2394
--- /dev/null
+++ b/homework/Debug/Obj/code.pbi
@@ -0,0 +1,22 @@
+This is an internal working file generated by the Source Browser.
+23:04 03s
+E:\CC2530Projects1\homework\source\code.c
+E:\CC2530Projects1\homework\source\code.c
+-o
+E:\CC2530Projects1\homework\Debug\Obj\
+-e
+--no_cse
+--no_unroll
+--no_inline
+--no_code_motion
+--no_tbaa
+--debug
+--core=plain
+--dptr=16,1
+--data_model=large
+--code_model=banked
+--calling_convention=xdata_reentrant
+--place_constants=data
+--nr_virtual_regs
+8
+-Ol
diff --git a/homework/Debug/Obj/code.r51 b/homework/Debug/Obj/code.r51
new file mode 100644
index 0000000..c228fbf
Binary files /dev/null and b/homework/Debug/Obj/code.r51 differ
diff --git a/homework/Debug/Obj/homework.pbd b/homework/Debug/Obj/homework.pbd
new file mode 100644
index 0000000..3f1377e
--- /dev/null
+++ b/homework/Debug/Obj/homework.pbd
@@ -0,0 +1,3 @@
+This is an internal working file generated by the Source Browser.
+23:04 03s
+E:\CC2530Projects1\homework\Debug\Obj\code.pbi
diff --git a/homework/homework.dep b/homework/homework.dep
new file mode 100644
index 0000000..400517e
--- /dev/null
+++ b/homework/homework.dep
@@ -0,0 +1,86 @@
+
+
+
+ 2
+ 716600212
+
+ Debug
+
+ $TOOLKIT_DIR$\config\devices\Texas Instruments\lnk51ew_CC2530F256_banked.xcl
+ $TOOLKIT_DIR$\inc\ioCC2530.h
+ $PROJ_DIR$\Debug\Exe\homework.hex
+ $TOOLKIT_DIR$\lib\clib\cl-pli-blxd-1e16x01.r51
+ $PROJ_DIR$\Debug\Exe\homework.d51
+ $PROJ_DIR$\Debug\Obj\homework.pbd
+ $PROJ_DIR$\Debug\Obj\code.pbi
+ $PROJ_DIR$\source\code.c
+ $PROJ_DIR$\Debug\Obj\code.r51
+
+
+ [ROOT_NODE]
+
+
+ XLINK
+ 4 2
+
+
+
+
+ $PROJ_DIR$\Debug\Exe\homework.d51
+
+
+ XLINK
+ 2
+
+
+
+
+ XLINK
+ 0 8 3
+
+
+
+
+ $PROJ_DIR$\Debug\Obj\homework.pbd
+
+
+ BILINK
+ 6
+
+
+
+
+ $PROJ_DIR$\source\code.c
+
+
+ ICC8051
+ 8
+
+
+ BICOMP
+ 6
+
+
+
+
+ ICC8051
+ 1
+
+
+ BICOMP
+ 1
+
+
+
+
+
+ Release
+
+
+ [MULTI_TOOL]
+ XLINK
+
+
+
+
+
diff --git a/homework/homework.ewd b/homework/homework.ewd
new file mode 100644
index 0000000..1b92d1e
--- /dev/null
+++ b/homework/homework.ewd
@@ -0,0 +1,1281 @@
+
+
+
+ 2
+
+ Debug
+
+ 8051
+
+ 1
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 1
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+ Release
+
+ 8051
+
+ 0
+
+ C-SPY
+ 2
+
+ 8
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _3RD_ID
+ 1
+
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+ CHIPCON_ID
+ 2
+
+ 3
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FS2_ID
+ 1
+
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+ INFINEON_ID
+ 1
+
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NS_ID
+ 1
+
+ 0
+ 1
+ 0
+
+
+
+
+
+
+ ROM_ID
+ 1
+
+ 2
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AD2_ID
+ 2
+
+ 6
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CYGNAL_ID
+ 1
+
+ 1
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SIM_ID
+ 1
+
+ 2
+ 1
+ 0
+
+
+
+
+
+
+
+
+ $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin
+ 0
+
+
+ $EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin
+ 1
+
+
+ $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin
+ 1
+
+
+
+
+
+
diff --git a/homework/homework.ewp b/homework/homework.ewp
new file mode 100644
index 0000000..74307ae
--- /dev/null
+++ b/homework/homework.ewp
@@ -0,0 +1,2072 @@
+
+
+
+ 2
+
+ Debug
+
+ 8051
+
+ 1
+
+ General
+ 1
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 1
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ Release
+
+ 8051
+
+ 0
+
+ General
+ 1
+
+ 5
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ICC8051
+ 4
+
+ 9
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A8051
+ 2
+
+ 5
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CUSTOM
+ 3
+
+
+
+
+
+
+ BICOMP
+ 0
+
+
+
+ BUILDACTION
+ 1
+
+
+
+
+
+
+ XLINK
+ 3
+
+ 17
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XAR
+ 1
+
+ 0
+ 1
+ 0
+
+
+
+
+
+
+
+ BILINK
+ 0
+
+
+
+
+ $PROJ_DIR$\source\code.c
+
+
+
+
diff --git a/homework/homework.eww b/homework/homework.eww
new file mode 100644
index 0000000..2d96d00
--- /dev/null
+++ b/homework/homework.eww
@@ -0,0 +1,10 @@
+
+
+
+
+ $WS_DIR$\homework.ewp
+
+
+
+
+
diff --git a/homework/settings/homework.cspy.bat b/homework/settings/homework.cspy.bat
new file mode 100644
index 0000000..daf32e5
--- /dev/null
+++ b/homework/settings/homework.cspy.bat
@@ -0,0 +1,15 @@
+@REM This batch file has been generated by the IAR Embedded Workbench
+@REM C-SPY Debugger, as an aid to preparing a command line for running
+@REM the cspybat command line utility using the appropriate settings.
+@REM
+@REM You can launch cspybat by typing the name of this batch file followed
+@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
+@REM Note that this file is generated every time a new debug session
+@REM is initialized, so you may want to move or rename the file before
+@REM making changes.
+@REM
+
+
+"D:\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051proc.dll" "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051sim.dll" %1 --plugin "D:\IAR Systems\Embedded Workbench 6.0\8051\bin\8051bat.dll" --backend -B "--proc_core" "plain" "--proc_code_model" "banked" "--proc_nr_virtual_regs" "8" "--proc_pdata_bank_reg_addr" "0x93" "--proc_dptr_nr_of" "1" "--proc_codebank_reg" "0x9F" "--proc_codebank_start" "0x8000" "--proc_codebank_end" "0xFFFF" "--proc_codebank_mask" "0xFF" "--proc_data_model" "large" "-p" "D:\IAR Systems\Embedded Workbench 6.0\8051\config\devices\Texas Instruments\ioCC2530F256.ddf" "--proc_driver" "sim"
+
+
diff --git a/homework/settings/homework.dbgdt b/homework/settings/homework.dbgdt
new file mode 100644
index 0000000..3ce538d
--- /dev/null
+++ b/homework/settings/homework.dbgdt
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+ 20
+ 1477
+
+
+ 20
+ 1107
+ 295
+ 73
+
+
+
+ 124
+ 27
+ 27
+ 27
+
+
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+ TabID-28728-16617
+ Debug Log
+ Debug-Log
+
+
+
+ TabID-28205-16627
+ Build
+ Build
+
+
+
+ 1
+
+
+
+
+ TabID-6708-16620
+ Workspace
+ Workspace
+
+
+ homework
+
+
+
+
+ 0
+
+
+
+
+ TabID-17456-16623
+ Disassembly
+ Disassembly
+
+
+
+ 0
+
+
+
+
+
+ TextEditor
+ $WS_DIR$\source\code.c
+ 0
+ 12
+ 344
+ 344
+
+ 0
+
+ 0
+
+
+ 1000000
+ 1000000
+
+
+ 1
+
+
+
+
+
+
+ iaridepm.enu1
+
+
+
+
+
+
+ debuggergui.enu1
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 506
+ 198
+ -2
+ -2
+ 200
+ 200
+ 130208
+ 258732
+ 130208
+ 657180
+
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 506
+ 198
+ -2
+ -2
+ 200
+ 200
+ 130208
+ 258732
+ 130208
+ 657180
+
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 198
+ 1538
+ -2
+ -2
+ 1540
+ 200
+ 1002604
+ 258732
+ 130208
+ 258732
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/homework/settings/homework.dni b/homework/settings/homework.dni
new file mode 100644
index 0000000..db9d3a7
--- /dev/null
+++ b/homework/settings/homework.dni
@@ -0,0 +1,57 @@
+[DebugChecksum]
+Checksum=518010950
+[DisAssemblyWindow]
+NumStates=_ 1
+State 1=_ 1
+[InstructionProfiling]
+Enabled=_ 0
+[CodeCoverage]
+Enabled=_ 0
+[Log file]
+LoggingEnabled=_ 0
+LogFile=_ ""
+Category=_ 0
+[TermIOLog]
+LoggingEnabled=_ 0
+LogFile=_ ""
+[StackPlugin]
+Enabled=1
+OverflowWarningsEnabled=1
+WarningThreshold=90
+SpWarningsEnabled=1
+WarnHow=0
+UseTrigger=1
+TriggerName=main
+LimitSize=0
+ByteLimit=50
+[CallStackLog]
+Enabled=0
+[DriverProfiling]
+Enabled=0
+Mode=1
+Graph=0
+Symbiont=0
+[InterruptLog]
+LogEnabled=0
+SumEnabled=0
+GraphEnabled=0
+ShowTimeLog=1
+ShowTimeSum=1
+SumSortOrder=0
+[Breakpoints]
+Count=0
+[Interrupts]
+Enabled=1
+[MemoryMap]
+Enabled=0
+Base=0
+UseAuto=0
+TypeViolation=1
+UnspecRange=1
+ActionState=1
+[Aliases]
+Count=0
+SuppressDialog=0
+[TraceHelper]
+Enabled=0
+ShowSource=1
diff --git a/homework/settings/homework.wsdt b/homework/settings/homework.wsdt
new file mode 100644
index 0000000..de20371
--- /dev/null
+++ b/homework/settings/homework.wsdt
@@ -0,0 +1,148 @@
+
+
+
+
+
+ homework/Debug
+
+
+
+
+
+
+ 124
+ 27
+ 27
+ 27
+
+
+
+ 20
+ 990
+ 264
+ 66
+
+
+
+
+
+
+
+ TabID-1666-2591
+ Workspace
+ Workspace
+
+
+ homework
+
+
+
+
+ 0
+
+
+
+
+ TabID-18897-5543
+ Build
+ Build
+
+
+
+ 0
+
+
+
+
+
+ TextEditor
+ $WS_DIR$\source\code.c
+ 0
+ 0
+ 0
+ 452
+
+ 0
+
+ 0
+
+
+ 1000000
+ 1000000
+
+
+ 1
+
+
+
+
+
+
+ iaridepm.enu1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 609
+ 198
+ -2
+ -2
+ 200
+ 200
+ 130208
+ 258732
+ 130208
+ 790427
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -2
+ -2
+ 119
+ 1538
+ -2
+ -2
+ 1540
+ 121
+ 1002604
+ 156533
+ 130208
+ 258732
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/homework/source/code.c b/homework/source/code.c
new file mode 100644
index 0000000..cb8f446
--- /dev/null
+++ b/homework/source/code.c
@@ -0,0 +1,29 @@
+#include
+#define LED1 P1_0
+#define SW1 P1_2
+void delay(unsigned int time){
+ unsigned int i,j;
+ for(i = 0;i