Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 726f733634 | |||
| 1ecb2b8150 | |||
| 271d55718c | |||
| f675ff0b66 | |||
| 83ad8302c1 | |||
| 955c3a2e7c | |||
| 664b6e56b9 | |||
| f94e4375f3 | |||
| 1cf1c01163 | |||
| 0cd2fe0528 | |||
| fb34754e1f | |||
| 20d5804a87 | |||
| 5851dc9707 | |||
| 7cc337c0fd | |||
| 09685951c3 | |||
| 720f6d3548 | |||
| 1393d568a0 | |||
| 92b6a3a4f2 | |||
| becdca9dc7 | |||
| dc3cce9990 | |||
| f8d7296f76 | |||
| 615eba69bd | |||
| aab6d49812 | |||
| 9bfef795e7 | |||
| 428808715a | |||
| 7dfc856318 | |||
| c4743a10ee | |||
| 679ab65e1a | |||
| 98500850e5 | |||
| a297beb696 | |||
| c87fb49656 | |||
| e9956f8c80 | |||
| df21b2021a | |||
| 6cb386e578 | |||
| bd7c73f2a5 | |||
| ea21075a1d | |||
| 71a5d93a21 | |||
| c461f71cf2 | |||
| 9ce8ea1400 | |||
| b181d9273b | |||
| fc22544bf7 | |||
| 069881f5c4 | |||
| ce61501d43 | |||
| 386f2940ad | |||
| 1965f6e182 | |||
| f699ecdae9 | |||
| 1010138986 | |||
| b9bb12e7aa | |||
| 481f5d6298 |
@@ -3,6 +3,7 @@
|
||||
# CSS package
|
||||
xdctools_*/
|
||||
ccsv8/
|
||||
simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/
|
||||
|
||||
# CSS build files
|
||||
FlashROM/
|
||||
@@ -60,4 +60,30 @@ major source code path:
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
#optional
|
||||
|
||||
###external tools:
|
||||
|
||||
1. doxygen: tool to help documenting code, extract document from comments
|
||||
|
||||
1. download from main page http://www.doxygen.nl/download.html
|
||||
|
||||
2. according to different OS, download corresponding version.
|
||||
|
||||
3. set up external tool in intellij
|
||||
|
||||
4. press keyboard 'ctrl' + 'shift' + 'a' to search external tool, select 'external tools-setting'
|
||||
|
||||
5. add external tool by pressing '+'
|
||||
|
||||
6. name this external tool in the column 'name'
|
||||
|
||||
7. set the path of doxygen execute file in the column 'program'
|
||||
|
||||
8. set the repository we want to generate document automatically in the column 'working directory'
|
||||
|
||||
9. set hotkey of doxygen to run : 'File' -> 'Setting' -> 'Keymap' -> 'external tools'
|
||||
|
||||
10. press the hotkey to run doxygen
|
||||
|
||||
Copyright (c) 2019. BioPro. Scientific.
|
||||
|
||||
@@ -33,8 +33,8 @@ NEULIVE_PARAMETER = {
|
||||
'AG': 5, # AMP GAIN
|
||||
'PW': 0, # PULSE WIDTH
|
||||
'TT': 9, # STIMULATION TIMES
|
||||
'SB': 3, # STIMULATION BEHAVIOR
|
||||
'TF': 10, # STIMULATION FREQUENCY
|
||||
'SB': 2, # STIMULATION BEHAVIOR
|
||||
'TF': 1, # STIMULATION FREQUENCY
|
||||
'CA': 1, # AMP CHANNEL A ENABLE
|
||||
'CB': 0, # AMP CHANNEL B ENABLE
|
||||
'CC': 0, # AMP CHANNEL C ENABLE
|
||||
|
||||
@@ -335,7 +335,7 @@ def paint_fft_result(result: Result, options: Options):
|
||||
plt.figure(1)
|
||||
f1, pxx_den = signal.periodogram(value_seq, 1e3)
|
||||
plt.semilogy(f1, pxx_den)
|
||||
plt.ylim([1e-7, 1e3])
|
||||
plt.ylim([1e-7, 1e7])
|
||||
plt.xlabel('frequency [hz]')
|
||||
plt.ylabel('PSD[v**2/Hz')
|
||||
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
<rts value="libc.a"/>
|
||||
<createSlaveProjects value=""/>
|
||||
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
|
||||
<isTargetManual value="false"/>
|
||||
<isTargetManual value="true"/>
|
||||
</projectOptions>
|
||||
|
||||
+1
-1
@@ -10,5 +10,5 @@
|
||||
<rts value="libc.a"/>
|
||||
<createSlaveProjects value=""/>
|
||||
<connection value="common/targetdb/connections/TIXDS100v3_Dot7_Connection.xml"/>
|
||||
<isTargetManual value="false"/>
|
||||
<isTargetManual value="true"/>
|
||||
</projectOptions>
|
||||
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\.config\xconfig_app_ble\.buildtime
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#
|
||||
_XDCBUILDCOUNT =
|
||||
ifneq (,$(findstring path,$(_USEXDCENV_)))
|
||||
override XDCPATH = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/tidrivers_cc13xx_cc26xx_2_21_01_01/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/uia_2_01_00_01/packages;C:/ti/ccsv8/ccs_base;C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config
|
||||
override XDCROOT = C:/ti/xdctools_3_32_02_25_core
|
||||
override XDCBUILDCFG = ./config.bld
|
||||
endif
|
||||
ifneq (,$(findstring args,$(_USEXDCENV_)))
|
||||
override XDCARGS =
|
||||
override XDCTARGETS =
|
||||
endif
|
||||
#
|
||||
ifeq (0,1)
|
||||
PKGPATH = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/tidrivers_cc13xx_cc26xx_2_21_01_01/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/uia_2_01_00_01/packages;C:/ti/ccsv8/ccs_base;C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config;C:/ti/xdctools_3_32_02_25_core/packages;..
|
||||
HOSTOS = Windows
|
||||
endif
|
||||
+1
@@ -0,0 +1 @@
|
||||
--endian=little -mv7M3 --abi=eabi -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/packages" -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/tidrivers_cc13xx_cc26xx_2_21_01_01/packages" -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages" -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/uia_2_01_00_01/packages" -I"C:/ti/ccsv8/ccs_base" -I"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config" -I"C:/ti/xdctools_3_32_02_25_core/packages" -I"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/xconfig_app_ble/.." -IC:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include -Dxdc_target_types__="ti/targets/arm/elf/std.h" -Dxdc_target_name__=M3 -Dxdc_cfg__xheader__="\"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/xconfig_app_ble/package/cfg/app_ble_pem3.h\""
|
||||
+1
@@ -0,0 +1 @@
|
||||
-I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/packages" -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/tidrivers_cc13xx_cc26xx_2_21_01_01/packages" -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages" -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/uia_2_01_00_01/packages" -I"C:/ti/ccsv8/ccs_base" -I"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config" -I"C:/ti/xdctools_3_32_02_25_core/packages" -I"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/xconfig_app_ble/.." -IC:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include -Dxdc_target_types__="ti/targets/arm/elf/std.h" -Dxdc_target_name__=M3 -Dxdc_cfg__xheader__="\"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/xconfig_app_ble/package/cfg/app_ble_pem3.h\""
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/* THIS IS A GENERATED FILE -- DO NOT EDIT */
|
||||
|
||||
var target; /* the target used for this build */
|
||||
|
||||
/* configuro was passed the target's name explicitly */
|
||||
try {
|
||||
target = xdc.module('ti.targets.arm.elf.M3');
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error("Can't find the target named '" + 'ti.targets.arm.elf.M3'
|
||||
+ "' along the path '" + environment["xdc.path"]
|
||||
+ "': please check the spelling of the target's name and that it exists along this path.");
|
||||
}
|
||||
if (!(target instanceof xdc.module("xdc.bld.ITarget").Module)) {
|
||||
throw new Error("The module named 'ti.targets.arm.elf.M3' exists but it's not a target: please check the spelling of the target's name");
|
||||
}
|
||||
|
||||
/* configuro was passed compiler options explicitly */
|
||||
target.ccOpts.prefix = unescape("-mv7M3%20--code_state%3D16%20-me%20-O4%20--opt_for_speed%3D0%20--include_path%3D%22C%3A/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/target%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/rom%22%20--include_path%3D%22C%3A/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272%22%20--define%3DBOARD_DISPLAY_EXCLUDE_UART%20--define%3DPOWER_SAVING%20--define%3DBOOSTXL_CC2650MA%20--define%3DHEADSTAGE_MA_USE_SPI2%20--define%3DHEADSTAGE_MA_USE_ADC%20--define%3DCC26XX%20--define%3DGAPROLE_TASK_STACK_SIZE%3D540%20--define%3DHEAPMGR_SIZE%3D0%20--define%3DICALL_MAX_NUM_ENTITIES%3D6%20--define%3DICALL_MAX_NUM_TASKS%3D3%20--define%3DUSE_ICALL%20--define%3DxBOARD_DISPLAY_EXCLUDE_LCD%20--define%3DxDisplay_DISABLE_ALL%20--define%3Dxdc_runtime_Assert_DISABLE_ALL%20--define%3Dxdc_runtime_Log_DISABLE_ALL%20-g%20--c99%20--gcc%20--diag_suppress%3D48%20--diag_warning%3D225%20--diag_wrap%3Doff%20--display_error_number%20--gen_func_subsections%3Don%20--abi%3Deabi%20%20") + target.ccOpts.prefix;
|
||||
|
||||
/* configuro was passed the target's rootDir explicitly */
|
||||
target.rootDir = 'C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS';
|
||||
|
||||
Build.targets = [target];
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
## THIS IS A GENERATED FILE -- DO NOT EDIT
|
||||
.configuro: .libraries,em3 linker.cmd package/cfg/app_ble_pem3.oem3
|
||||
|
||||
# To simplify configuro usage in makefiles:
|
||||
# o create a generic linker command file name
|
||||
# o set modification times of compiler.opt* files to be greater than
|
||||
# or equal to the generated config header
|
||||
#
|
||||
linker.cmd: package/cfg/app_ble_pem3.xdl
|
||||
$(SED) 's"^\"\(package/cfg/app_ble_pem3cfg.cmd\)\"$""\"C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/xconfig_app_ble/\1\""' package/cfg/app_ble_pem3.xdl > $@
|
||||
-$(SETDATE) -r:max package/cfg/app_ble_pem3.h compiler.opt compiler.opt.defs
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
/* THIS IS A GENERATED FILE -- DO NOT EDIT */
|
||||
|
||||
var targ = xdc.module('ti.targets.arm.elf.M3');
|
||||
/* configuro was told the platform explicitly */
|
||||
var platform = 'ti.platforms.simplelink:CC2640F128';
|
||||
|
||||
/* decide whether to make an assembly or an executable */
|
||||
var makeAssembly = false;
|
||||
|
||||
|
||||
var Executable = xdc.module('xdc.bld.Executable');
|
||||
|
||||
var exeOpts = new Executable.Attrs({
|
||||
cfgScript: 'C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg',
|
||||
profile: 'release',
|
||||
cfgHome: 'xconfig_app_ble',
|
||||
});
|
||||
|
||||
exeOpts.cfgArgs = 'null';
|
||||
exeOpts.cfgArgsEncoded = true;
|
||||
|
||||
var exe = Pkg[makeAssembly ? 'addAssembly': 'addExecutable'](
|
||||
'app_ble',
|
||||
targ,
|
||||
platform,
|
||||
exeOpts
|
||||
);
|
||||
|
||||
/*
|
||||
* Generate the compiler.opt file
|
||||
* Do this here instead of during the initial creation of the configuro
|
||||
* package, because the contents of any config.bld script are unknown
|
||||
* at that time. Config.bld can't be executed until the XDC build phase.
|
||||
*/
|
||||
if (makeAssembly) {
|
||||
var suffix = targ.dllExt || '.p' + targ.suffix;
|
||||
}
|
||||
else {
|
||||
var suffix = '.p' + targ.suffix;
|
||||
}
|
||||
|
||||
var thisObj = {
|
||||
cfg: 'C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg',
|
||||
outputPath: 'C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/app/.config/xconfig_app_ble',
|
||||
exeName: 'app_ble' + suffix,
|
||||
exeIntName: 'app_ble' + suffix.replace('.', '_'),
|
||||
targ: targ,
|
||||
linkerCommandFile: 'linker.cmd',
|
||||
compilerOptFile: 'compiler.opt',
|
||||
compilerDefsFile: 'compiler.opt' + ".defs",
|
||||
makeAssembly: makeAssembly
|
||||
};
|
||||
var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/compiler.opt.xdt');
|
||||
tmpl.genFile('compiler.opt', thisObj, [], false);
|
||||
|
||||
/*
|
||||
* Generate the custom makefile.
|
||||
*/
|
||||
var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/' +
|
||||
(makeAssembly? 'custom.mak.asm.xdt' : 'custom.mak.exe.xdt'));
|
||||
tmpl.genFile('custom.mak', thisObj, [], false);
|
||||
Pkg.makeEpilogue = "include custom.mak";
|
||||
|
||||
/*
|
||||
* Generate the package script.
|
||||
*/
|
||||
var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/package.xs.xdt');
|
||||
tmpl.genFile('package.xs', thisObj, [], false);
|
||||
|
||||
if (makeAssembly) {
|
||||
/*
|
||||
* Generate the linker options into a staging file, so that the presence or
|
||||
* age of the advertised linker command file can be the makefile trigger to
|
||||
* rebuild the package from the user's config script.
|
||||
*/
|
||||
var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/linker.cmd.asm.xdt');
|
||||
tmpl.genFile('linker.cmd.cp', thisObj, [], false);
|
||||
}
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
#
|
||||
# Do not edit this file. This file is generated from
|
||||
# package.bld. Any modifications to this file will be
|
||||
# overwritten whenever makefiles are re-generated.
|
||||
#
|
||||
|
||||
unexport MAKEFILE_LIST
|
||||
MK_NOGENDEPS := $(filter clean,$(MAKECMDGOALS))
|
||||
override PKGDIR = xconfig_app_ble
|
||||
XDCINCS = -I. -I$(strip $(subst ;, -I,$(subst $(space),\$(space),$(XPKGPATH))))
|
||||
XDCCFGDIR = package/cfg/
|
||||
|
||||
#
|
||||
# The following dependencies ensure package.mak is rebuilt
|
||||
# in the event that some included BOM script changes.
|
||||
#
|
||||
ifneq (clean,$(MAKECMDGOALS))
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/utils.js:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/utils.js
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/xdc.tci:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/xdc.tci
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/template.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/template.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/om2.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/om2.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/xmlgen.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/xmlgen.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/xmlgen2.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/xmlgen2.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/Warnings.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/Warnings.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/IPackage.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/IPackage.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/package.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/package.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/global/Clock.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/global/Clock.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/global/Trace.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/global/Trace.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/bld.js:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/bld.js
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/BuildEnvironment.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/BuildEnvironment.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/PackageContents.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/PackageContents.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/_gen.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/_gen.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Library.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Library.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Executable.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Executable.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Repository.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Repository.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Configuration.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Configuration.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Script.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Script.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Manifest.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Manifest.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Utils.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/Utils.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITarget.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITarget.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITarget2.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITarget2.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITarget3.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITarget3.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITargetFilter.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/ITargetFilter.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/package.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/bld/package.xs
|
||||
package.mak: config.bld
|
||||
C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/ITarget.xs:
|
||||
package.mak: C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/ITarget.xs
|
||||
C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/C28_large.xs:
|
||||
package.mak: C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/C28_large.xs
|
||||
C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/C28_float.xs:
|
||||
package.mak: C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/C28_float.xs
|
||||
C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/package.xs:
|
||||
package.mak: C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/package.xs
|
||||
C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/IArm.xs:
|
||||
package.mak: C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/IArm.xs
|
||||
C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/package.xs:
|
||||
package.mak: C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/package.xs
|
||||
package.mak: package.bld
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/compiler.opt.xdt:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/compiler.opt.xdt
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/io/File.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/io/File.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/io/package.xs:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/io/package.xs
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/compiler.defs.xdt:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/compiler.defs.xdt
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/custom.mak.exe.xdt:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/custom.mak.exe.xdt
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/package.xs.xdt:
|
||||
package.mak: C:/ti/xdctools_3_32_02_25_core/packages/xdc/tools/configuro/template/package.xs.xdt
|
||||
endif
|
||||
|
||||
ti.targets.arm.elf.M3.rootDir ?= C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS
|
||||
ti.targets.arm.elf.packageBase ?= C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/
|
||||
.PRECIOUS: $(XDCCFGDIR)/%.oem3
|
||||
.PHONY: all,em3 .dlls,em3 .executables,em3 test,em3
|
||||
all,em3: .executables,em3
|
||||
.executables,em3: .libraries,em3
|
||||
.executables,em3: .dlls,em3
|
||||
.dlls,em3: .libraries,em3
|
||||
.libraries,em3: .interfaces
|
||||
@$(RM) $@
|
||||
@$(TOUCH) "$@"
|
||||
|
||||
.help::
|
||||
@$(ECHO) xdc test,em3
|
||||
@$(ECHO) xdc .executables,em3
|
||||
@$(ECHO) xdc .libraries,em3
|
||||
@$(ECHO) xdc .dlls,em3
|
||||
|
||||
|
||||
all: .executables
|
||||
.executables: .libraries .dlls
|
||||
.libraries: .interfaces
|
||||
|
||||
PKGCFGS := $(wildcard package.xs) package/build.cfg
|
||||
.interfaces: package/package.xdc.inc package/package.defs.h package.xdc $(PKGCFGS)
|
||||
|
||||
-include package/package.xdc.dep
|
||||
package/%.xdc.inc package/%_xconfig_app_ble.c package/%.defs.h: %.xdc $(PKGCFGS)
|
||||
@$(MSG) generating interfaces for package xconfig_app_ble" (because $@ is older than $(firstword $?))" ...
|
||||
$(XSRUN) -f xdc/services/intern/cmd/build.xs $(MK_IDLOPTS) -m package/package.xdc.dep -i package/package.xdc.inc package.xdc
|
||||
|
||||
.dlls,em3 .dlls: app_ble.pem3
|
||||
|
||||
-include package/cfg/app_ble_pem3.mak
|
||||
-include package/cfg/app_ble_pem3.cfg.mak
|
||||
ifeq (,$(MK_NOGENDEPS))
|
||||
-include package/cfg/app_ble_pem3.dep
|
||||
endif
|
||||
app_ble.pem3: package/cfg/app_ble_pem3.xdl
|
||||
@
|
||||
|
||||
|
||||
ifeq (,$(wildcard .libraries,em3))
|
||||
app_ble.pem3 package/cfg/app_ble_pem3.c: .libraries,em3
|
||||
endif
|
||||
|
||||
package/cfg/app_ble_pem3.c package/cfg/app_ble_pem3.h package/cfg/app_ble_pem3.xdl: override _PROG_NAME := app_ble.xem3
|
||||
package/cfg/app_ble_pem3.c: package/cfg/app_ble_pem3.cfg
|
||||
package/cfg/app_ble_pem3.xdc.inc: package/cfg/app_ble_pem3.xdl
|
||||
package/cfg/app_ble_pem3.xdl package/cfg/app_ble_pem3.c: .interfaces
|
||||
|
||||
clean:: clean,em3
|
||||
-$(RM) package/cfg/app_ble_pem3.cfg
|
||||
-$(RM) package/cfg/app_ble_pem3.dep
|
||||
-$(RM) package/cfg/app_ble_pem3.c
|
||||
-$(RM) package/cfg/app_ble_pem3.xdc.inc
|
||||
|
||||
clean,em3::
|
||||
-$(RM) app_ble.pem3
|
||||
.executables,em3 .executables: app_ble.xem3
|
||||
|
||||
app_ble.xem3: |app_ble.pem3
|
||||
|
||||
-include package/cfg/app_ble.xem3.mak
|
||||
app_ble.xem3: package/cfg/app_ble_pem3.oem3
|
||||
$(RM) $@
|
||||
@$(MSG) lnkem3 $@ ...
|
||||
$(RM) $(XDCCFGDIR)/$@.map
|
||||
$(ti.targets.arm.elf.M3.rootDir)/bin/armcl -fs $(XDCCFGDIR)$(dir $@). -q -u _c_int00 --silicon_version=7M3 -z --strict_compatibility=on -o $@ package/cfg/app_ble_pem3.oem3 package/cfg/app_ble_pem3.xdl -w -c -m $(XDCCFGDIR)/$@.map -l $(ti.targets.arm.elf.M3.rootDir)/lib/libc.a
|
||||
|
||||
app_ble.xem3: export C_DIR=
|
||||
app_ble.xem3: PATH:=$(ti.targets.arm.elf.M3.rootDir)/bin/;$(PATH)
|
||||
app_ble.xem3: Path:=$(ti.targets.arm.elf.M3.rootDir)/bin/;$(PATH)
|
||||
|
||||
app_ble.test test,em3 test: app_ble.xem3.test
|
||||
|
||||
app_ble.xem3.test:: app_ble.xem3
|
||||
ifeq (,$(_TESTLEVEL))
|
||||
@$(MAKE) -R -r --no-print-directory -f $(XDCROOT)/packages/xdc/bld/xdc.mak _TESTLEVEL=1 app_ble.xem3.test
|
||||
else
|
||||
@$(MSG) running $< ...
|
||||
$(call EXEC.app_ble.xem3, )
|
||||
endif
|
||||
|
||||
clean,em3::
|
||||
-$(RM) $(wildcard .tmp,app_ble.xem3,*)
|
||||
|
||||
|
||||
clean:: clean,em3
|
||||
|
||||
clean,em3::
|
||||
-$(RM) app_ble.xem3
|
||||
%,copy:
|
||||
@$(if $<,,$(MSG) don\'t know how to build $*; exit 1)
|
||||
@$(MSG) cp $< $@
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
app_ble_pem3.oem3,copy : package/cfg/app_ble_pem3.oem3
|
||||
app_ble_pem3.sem3,copy : package/cfg/app_ble_pem3.sem3
|
||||
|
||||
$(XDCCFGDIR)%.c $(XDCCFGDIR)%.h $(XDCCFGDIR)%.xdl: $(XDCCFGDIR)%.cfg $(XDCROOT)/packages/xdc/cfg/Main.xs | .interfaces
|
||||
@$(MSG) "configuring $(_PROG_NAME) from $< ..."
|
||||
$(CONFIG) $(_PROG_XSOPTS) xdc.cfg $(_PROG_NAME) $(XDCCFGDIR)$*.cfg $(XDCCFGDIR)$*
|
||||
|
||||
.PHONY: release,xconfig_app_ble
|
||||
ifeq (,$(MK_NOGENDEPS))
|
||||
-include package/rel/xconfig_app_ble.tar.dep
|
||||
endif
|
||||
package/rel/xconfig_app_ble/xconfig_app_ble/package/package.rel.xml: package/package.bld.xml
|
||||
package/rel/xconfig_app_ble/xconfig_app_ble/package/package.rel.xml: package/build.cfg
|
||||
package/rel/xconfig_app_ble/xconfig_app_ble/package/package.rel.xml: package/package.xdc.inc
|
||||
package/rel/xconfig_app_ble/xconfig_app_ble/package/package.rel.xml: .force
|
||||
@$(MSG) generating external release references $@ ...
|
||||
$(XS) $(JSENV) -f $(XDCROOT)/packages/xdc/bld/rel.js $(MK_RELOPTS) . $@
|
||||
|
||||
xconfig_app_ble.tar: package/rel/xconfig_app_ble.xdc.inc package/rel/xconfig_app_ble/xconfig_app_ble/package/package.rel.xml
|
||||
@$(MSG) making release file $@ "(because of $(firstword $?))" ...
|
||||
-$(RM) $@
|
||||
$(call MKRELTAR,package/rel/xconfig_app_ble.xdc.inc,package/rel/xconfig_app_ble.tar.dep)
|
||||
|
||||
|
||||
release release,xconfig_app_ble: all xconfig_app_ble.tar
|
||||
clean:: .clean
|
||||
-$(RM) xconfig_app_ble.tar
|
||||
-$(RM) package/rel/xconfig_app_ble.xdc.inc
|
||||
-$(RM) package/rel/xconfig_app_ble.tar.dep
|
||||
|
||||
clean:: .clean
|
||||
-$(RM) .libraries $(wildcard .libraries,*)
|
||||
clean::
|
||||
-$(RM) .dlls $(wildcard .dlls,*)
|
||||
#
|
||||
# The following clean rule removes user specified
|
||||
# generated files or directories.
|
||||
#
|
||||
|
||||
ifneq (clean,$(MAKECMDGOALS))
|
||||
ifeq (,$(wildcard package))
|
||||
$(shell $(MKDIR) package)
|
||||
endif
|
||||
ifeq (,$(wildcard package/cfg))
|
||||
$(shell $(MKDIR) package/cfg)
|
||||
endif
|
||||
ifeq (,$(wildcard package/lib))
|
||||
$(shell $(MKDIR) package/lib)
|
||||
endif
|
||||
ifeq (,$(wildcard package/rel))
|
||||
$(shell $(MKDIR) package/rel)
|
||||
endif
|
||||
ifeq (,$(wildcard package/internal))
|
||||
$(shell $(MKDIR) package/internal)
|
||||
endif
|
||||
endif
|
||||
clean::
|
||||
-$(RMDIR) package
|
||||
|
||||
include custom.mak
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Package generated by xdc.tools.configuro
|
||||
*
|
||||
* @_nodoc
|
||||
*/
|
||||
package xconfig_app_ble {
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/* THIS IS A GENERATED FILE -- DO NOT EDIT */
|
||||
|
||||
/* return the names of the generated config objects */
|
||||
function getLibs(prog) {
|
||||
/* for programs, push the generated config object file into the
|
||||
* generated linker command file.
|
||||
*/
|
||||
/* replace the last period in the name by an underscore */
|
||||
var name = "package/cfg/" + prog.name.replace(/\.([^.]*)$/, "_$1");
|
||||
/* base is a hack until we add cfgName to Program */
|
||||
var base = "package/cfg/" + prog.name.replace(/\.([^.]*)$/, "");
|
||||
var suffix = prog.build.target.suffix;
|
||||
|
||||
var libs = [
|
||||
// name + '.o' + suffix,
|
||||
base + '_p' + suffix + '.o' + suffix
|
||||
];
|
||||
|
||||
return libs.join(';');
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
if (pkg.$vers.length >= 3) {
|
||||
pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));
|
||||
}
|
||||
|
||||
pkg.build.libraries = [
|
||||
];
|
||||
|
||||
pkg.build.libDesc = [
|
||||
];
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Do not edit this file. This file is generated from
|
||||
# package.bld. Any modifications to this file will be
|
||||
# overwritten whenever makefiles are re-generated.
|
||||
#
|
||||
# target compatibility key = ti.targets.arm.elf.M3{1,0,18.1,6
|
||||
#
|
||||
app_ble.xem3: package/cfg/app_ble.xem3.mak
|
||||
|
||||
clean::
|
||||
-$(RM) package/cfg/app_ble.xem3.mak
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
/*
|
||||
* ======== package/cfg/app_ble_pem3.cfg ========
|
||||
* This generated configuration script runs the user's configuration script
|
||||
* the context of a specific target and platform in order to generate
|
||||
* all the files necessary to create an executable; e.g., linker command
|
||||
* files, static C/C++ data structures, etc.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ======== _applyChanges ========
|
||||
* Changes that bring the build target to the state at the end of the build
|
||||
* model
|
||||
*/
|
||||
function _applyChanges(obj, chgObj) {
|
||||
var wasSealed = false;
|
||||
if (obj.$sealed) {
|
||||
wasSealed = true;
|
||||
obj.$unseal();
|
||||
}
|
||||
for (var prop in chgObj) {
|
||||
if (typeof obj[prop] == 'object' && obj[prop] != undefined) {
|
||||
if ("$category" in obj[prop] && obj[prop].$category == "Vector") {
|
||||
obj[prop].length = chgObj[prop].length;
|
||||
for (var i = 0; i < chgObj[prop].length; i++) {
|
||||
if (obj[prop].length < i + 1) {
|
||||
obj[prop].length++;
|
||||
}
|
||||
obj[prop][i] = chgObj[prop][i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
_applyChanges(obj[prop], chgObj[prop]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
obj[prop] = chgObj[prop];
|
||||
}
|
||||
}
|
||||
if (wasSealed) {
|
||||
obj.$seal();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ======== _runescape ========
|
||||
* Recursive unescape to decode serialized strings
|
||||
*/
|
||||
function _runescape(obj) {
|
||||
for (var i in obj) {
|
||||
if (obj[i] != null) {
|
||||
if (typeof obj[i] == 'string') {
|
||||
obj[i] = unescape(obj[i]);
|
||||
}
|
||||
else if (typeof obj[i] == 'object') {
|
||||
_runescape(obj[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ======== _getPlatCfg ========
|
||||
*/
|
||||
function _getPlatCfg() {
|
||||
var tmp = {};
|
||||
_runescape(tmp);
|
||||
return (tmp);
|
||||
}
|
||||
/*
|
||||
* ======== _cfginit ========
|
||||
*/
|
||||
function _cfginit() {
|
||||
xdc.loadPackage('xdc.services.intern.cmd');
|
||||
var prog = xdc.om['xdc.cfg.Program'];
|
||||
|
||||
/* initialize prog attrs from build model */
|
||||
var build = {
|
||||
profile: "release",
|
||||
cfgScript: "C%3A/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg",
|
||||
cfgHome: "xconfig_app_ble",
|
||||
cfgArgs: "null",
|
||||
cfgArgsEncoded: true,
|
||||
releases: {
|
||||
0: {
|
||||
name: "xconfig_app_ble",
|
||||
attrs: {
|
||||
prefix: "",
|
||||
label: "default"
|
||||
},
|
||||
otherFiles: {},
|
||||
excludeDirs: {}
|
||||
}
|
||||
},
|
||||
prelink: false
|
||||
};
|
||||
_runescape(build);
|
||||
build.cfgArgs = null;
|
||||
build.target = xdc.module("ti.targets.arm.elf.M3");
|
||||
var targChange = {
|
||||
platforms: [
|
||||
"ti.platforms.simCM3"
|
||||
],
|
||||
version: "ti.targets.arm.elf.M3%7B1%2C0%2C18.1%2C6",
|
||||
extensions: {
|
||||
".sem3e": {
|
||||
suf: ".sem3e",
|
||||
typ: "asm"
|
||||
},
|
||||
".sem3": {
|
||||
suf: ".sem3",
|
||||
typ: "asm"
|
||||
},
|
||||
".sv7M": {
|
||||
suf: ".sv7M",
|
||||
typ: "asm"
|
||||
}
|
||||
},
|
||||
rootDir: "C%3A/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS",
|
||||
ccOpts: {
|
||||
prefix: "-mv7M3%20--code_state%3D16%20-me%20-O4%20--opt_for_speed%3D0%20--include_path%3D%22C%3A/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/target%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink/ble_sdk_2_02_02_25/src/rom%22%20--include_path%3D%22C%3A/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272%22%20--define%3DBOARD_DISPLAY_EXCLUDE_UART%20--define%3DPOWER_SAVING%20--define%3DBOOSTXL_CC2650MA%20--define%3DHEADSTAGE_MA_USE_SPI2%20--define%3DHEADSTAGE_MA_USE_ADC%20--define%3DCC26XX%20--define%3DGAPROLE_TASK_STACK_SIZE%3D540%20--define%3DHEAPMGR_SIZE%3D0%20--define%3DICALL_MAX_NUM_ENTITIES%3D6%20--define%3DICALL_MAX_NUM_TASKS%3D3%20--define%3DUSE_ICALL%20--define%3DxBOARD_DISPLAY_EXCLUDE_LCD%20--define%3DxDisplay_DISABLE_ALL%20--define%3Dxdc_runtime_Assert_DISABLE_ALL%20--define%3Dxdc_runtime_Log_DISABLE_ALL%20-g%20--c99%20--gcc%20--diag_suppress%3D48%20--diag_warning%3D225%20--diag_wrap%3Doff%20--display_error_number%20--gen_func_subsections%3Don%20--abi%3Deabi%20%20-qq%20-pdsw225"
|
||||
},
|
||||
rawVersion: "18.1.6"
|
||||
};
|
||||
_runescape(targChange);
|
||||
_applyChanges(build.target, targChange);
|
||||
|
||||
prog.build = build;
|
||||
|
||||
prog.name = "app_ble.xem3";
|
||||
prog.cfgBase = "package/cfg/app_ble_pem3";
|
||||
|
||||
prog.endian = prog.build.target.model.endian;
|
||||
prog.codeModel = prog.build.target.model.codeModel;
|
||||
|
||||
/* use the platform package's Platform module */
|
||||
var Platform = xdc.useModule("ti.platforms.simplelink.Platform");
|
||||
var platParams = _getPlatCfg();
|
||||
var invalidParams = [];
|
||||
for (var prop in platParams) {
|
||||
if (!(prop in Platform.PARAMS)) {
|
||||
delete platParams[prop];
|
||||
invalidParams.push(prop);
|
||||
}
|
||||
}
|
||||
prog.platformName = "ti.platforms.simplelink:CC2640F128";
|
||||
prog.platform = Platform.create("CC2640F128", platParams);
|
||||
for (var i = 0; i < invalidParams.length; i++) {
|
||||
Platform.$logWarning("The parameter '" + invalidParams[i] + "' is " +
|
||||
"passed to this platform instance through Build.platformTable, " +
|
||||
"but the instance does not have a configuration parameter with " +
|
||||
"that name.", prog.platform, "CC2640F128");
|
||||
}
|
||||
|
||||
/* record the executable's package name */
|
||||
prog.buildPackage = "xconfig_app_ble";
|
||||
|
||||
/* record build-model information required during config generation */
|
||||
prog.$$bind("$$isasm", 0);
|
||||
prog.$$bind("$$isrom", 0);
|
||||
prog.$$bind("$$gentab", [
|
||||
]);
|
||||
|
||||
/* bind prog to an appropriate execution context */
|
||||
prog.cpu = prog.platform.getExeContext(prog);
|
||||
|
||||
/* import the target's run-time support pkg */
|
||||
xdc.loadPackage("ti.targets.arm.rtsarm");
|
||||
}
|
||||
|
||||
/* function to import the cfg script's package */
|
||||
function _userscript(script) {
|
||||
var home;
|
||||
var spath;
|
||||
home = xdc.loadPackage("xconfig_app_ble");
|
||||
|
||||
xdc.om.$$bind('$homepkg', home);
|
||||
|
||||
var cfgScript = "C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg";
|
||||
if (!script) {
|
||||
utils.loadCapsule(cfgScript, false, spath);
|
||||
}
|
||||
else {
|
||||
/* set up the same environment that loadCapsule would */
|
||||
var $saveCsd = utils.csd;
|
||||
var $cfgFile = utils.findFile(cfgScript, spath);
|
||||
var cname = cfgScript;
|
||||
if ($cfgFile) {
|
||||
$cfgFile = java.io.File($cfgFile);
|
||||
utils.csd = $cfgFile.getParentFile().getCanonicalPath();
|
||||
cname = "" + $cfgFile.getCanonicalPath();
|
||||
}
|
||||
|
||||
/* create the capsule object */
|
||||
var cap = {
|
||||
prototype: utils.global,
|
||||
$path: cname,
|
||||
$private: {path: cname},
|
||||
$capsule: undefined, /* set to cap below */
|
||||
};
|
||||
|
||||
/* 'this.$capsule' is always cap object */
|
||||
cap.$capsule = cap;
|
||||
|
||||
/* save the capsule object */
|
||||
utils.$$capmap[cname] = cap;
|
||||
|
||||
try {
|
||||
var cx =
|
||||
Packages.org.mozilla.javascript.Context.getCurrentContext();
|
||||
var rdr = new
|
||||
java.io.BufferedReader(new java.io.StringReader(script));
|
||||
Packages.config.Shell.evaluateLoad(cx, cap, rdr, cname, 1);
|
||||
}
|
||||
finally {
|
||||
rdr.close();
|
||||
utils.csd = $saveCsd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _postinit() {
|
||||
var cout = null;
|
||||
|
||||
var Program = xdc.om['xdc.cfg.Program'];
|
||||
/* get the exec command for this executable */
|
||||
if (Program.execCmd == null) {
|
||||
Program.execCmd = Program.platform.getExecCmd(Program,
|
||||
xdc.om["ti.platforms.simplelink"].packageBase);
|
||||
}
|
||||
cout = "define EXEC." + Program.name + '\n\n';
|
||||
cout += Program.execCmd;
|
||||
cout += "\nendef\n\n";
|
||||
|
||||
/* if SourceDir generates a makefile, we need to run it */
|
||||
_genSourceDirMak("package/cfg/app_ble_pem3", "app_ble.pem3");
|
||||
|
||||
utils.genDep("package/cfg/app_ble_pem3", "xconfig_app_ble", utils.loadedFiles, cout, null);
|
||||
}
|
||||
|
||||
function _genSourceDirMak(cfgBase, cfgName)
|
||||
{
|
||||
var SourceDir = xdc.om['xdc.cfg.SourceDir'];
|
||||
|
||||
if (SourceDir && SourceDir.$instances.length > 0) {
|
||||
/* construct rule to run SourceDir generated makefile */
|
||||
var make = "\t$(MAKE) -f "
|
||||
+ SourceDir.outputDir + "/" + SourceDir.makefileName;
|
||||
|
||||
/* this file is included by package.mak (if it exists) */
|
||||
var file = new java.io.File(cfgBase + ".cfg.mak");
|
||||
file["delete"]();
|
||||
var out = new java.io.BufferedWriter(new java.io.FileWriter(file));
|
||||
|
||||
/* add rules to run SourceDir generated makefile */
|
||||
out.write("# invoke SourceDir generated makefile for " + cfgName
|
||||
+ "\n" + cfgName + ": .libraries," + cfgName
|
||||
+ "\n.libraries," + cfgName + ": " + cfgBase + ".xdl\n"
|
||||
+ make + "\n\n"
|
||||
+ "clean::\n" + make + " clean\n\n"
|
||||
);
|
||||
out.close();
|
||||
out = null;
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# Do not edit this file. This file is generated from
|
||||
# package.bld. Any modifications to this file will be
|
||||
# overwritten whenever makefiles are re-generated.
|
||||
#
|
||||
# target compatibility key = ti.targets.arm.elf.M3{1,0,18.1,6
|
||||
#
|
||||
ifeq (,$(MK_NOGENDEPS))
|
||||
-include package/cfg/app_ble_pem3.oem3.dep
|
||||
package/cfg/app_ble_pem3.oem3.dep: ;
|
||||
endif
|
||||
|
||||
package/cfg/app_ble_pem3.oem3: | .interfaces
|
||||
package/cfg/app_ble_pem3.oem3: package/cfg/app_ble_pem3.c package/cfg/app_ble_pem3.mak
|
||||
@$(RM) $@.dep
|
||||
$(RM) $@
|
||||
@$(MSG) clem3 $< ...
|
||||
$(ti.targets.arm.elf.M3.rootDir)/bin/armcl -c -mv7M3 --code_state=16 -me -O4 --opt_for_speed=0 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" --define=BOARD_DISPLAY_EXCLUDE_UART --define=POWER_SAVING --define=BOOSTXL_CC2650MA --define=HEADSTAGE_MA_USE_SPI2 --define=HEADSTAGE_MA_USE_ADC --define=CC26XX --define=GAPROLE_TASK_STACK_SIZE=540 --define=HEAPMGR_SIZE=0 --define=ICALL_MAX_NUM_ENTITIES=6 --define=ICALL_MAX_NUM_TASKS=3 --define=USE_ICALL --define=xBOARD_DISPLAY_EXCLUDE_LCD --define=xDisplay_DISABLE_ALL --define=xdc_runtime_Assert_DISABLE_ALL --define=xdc_runtime_Log_DISABLE_ALL -g --c99 --gcc --diag_suppress=48 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 -ms --fp_mode=strict --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 -Dxdc_cfg__xheader__='"xconfig_app_ble/package/cfg/app_ble_pem3.h"' -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_1_6 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M3.rootDir)/include -fs=./package/cfg -fr=./package/cfg -fc $<
|
||||
$(MKDEP) -a $@.dep -p package/cfg -s oem3 $< -C -mv7M3 --code_state=16 -me -O4 --opt_for_speed=0 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" --define=BOARD_DISPLAY_EXCLUDE_UART --define=POWER_SAVING --define=BOOSTXL_CC2650MA --define=HEADSTAGE_MA_USE_SPI2 --define=HEADSTAGE_MA_USE_ADC --define=CC26XX --define=GAPROLE_TASK_STACK_SIZE=540 --define=HEAPMGR_SIZE=0 --define=ICALL_MAX_NUM_ENTITIES=6 --define=ICALL_MAX_NUM_TASKS=3 --define=USE_ICALL --define=xBOARD_DISPLAY_EXCLUDE_LCD --define=xDisplay_DISABLE_ALL --define=xdc_runtime_Assert_DISABLE_ALL --define=xdc_runtime_Log_DISABLE_ALL -g --c99 --gcc --diag_suppress=48 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 -ms --fp_mode=strict --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 -Dxdc_cfg__xheader__='"xconfig_app_ble/package/cfg/app_ble_pem3.h"' -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_1_6 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M3.rootDir)/include -fs=./package/cfg -fr=./package/cfg
|
||||
-@$(FIXDEP) $@.dep $@.dep
|
||||
|
||||
package/cfg/app_ble_pem3.oem3: export C_DIR=
|
||||
package/cfg/app_ble_pem3.oem3: PATH:=$(ti.targets.arm.elf.M3.rootDir)/bin/;$(PATH)
|
||||
package/cfg/app_ble_pem3.oem3: Path:=$(ti.targets.arm.elf.M3.rootDir)/bin/;$(PATH)
|
||||
|
||||
package/cfg/app_ble_pem3.sem3: | .interfaces
|
||||
package/cfg/app_ble_pem3.sem3: package/cfg/app_ble_pem3.c package/cfg/app_ble_pem3.mak
|
||||
@$(RM) $@.dep
|
||||
$(RM) $@
|
||||
@$(MSG) clem3 -n $< ...
|
||||
$(ti.targets.arm.elf.M3.rootDir)/bin/armcl -c -n -s --symdebug:none -mv7M3 --code_state=16 -me -O4 --opt_for_speed=0 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" --define=BOARD_DISPLAY_EXCLUDE_UART --define=POWER_SAVING --define=BOOSTXL_CC2650MA --define=HEADSTAGE_MA_USE_SPI2 --define=HEADSTAGE_MA_USE_ADC --define=CC26XX --define=GAPROLE_TASK_STACK_SIZE=540 --define=HEAPMGR_SIZE=0 --define=ICALL_MAX_NUM_ENTITIES=6 --define=ICALL_MAX_NUM_TASKS=3 --define=USE_ICALL --define=xBOARD_DISPLAY_EXCLUDE_LCD --define=xDisplay_DISABLE_ALL --define=xdc_runtime_Assert_DISABLE_ALL --define=xdc_runtime_Log_DISABLE_ALL -g --c99 --gcc --diag_suppress=48 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 -Dxdc_cfg__xheader__='"xconfig_app_ble/package/cfg/app_ble_pem3.h"' -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_1_6 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M3.rootDir)/include -fs=./package/cfg -fr=./package/cfg -fc $<
|
||||
$(MKDEP) -a $@.dep -p package/cfg -s oem3 $< -C -n -s --symdebug:none -mv7M3 --code_state=16 -me -O4 --opt_for_speed=0 --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" --define=BOARD_DISPLAY_EXCLUDE_UART --define=POWER_SAVING --define=BOOSTXL_CC2650MA --define=HEADSTAGE_MA_USE_SPI2 --define=HEADSTAGE_MA_USE_ADC --define=CC26XX --define=GAPROLE_TASK_STACK_SIZE=540 --define=HEAPMGR_SIZE=0 --define=ICALL_MAX_NUM_ENTITIES=6 --define=ICALL_MAX_NUM_TASKS=3 --define=USE_ICALL --define=xBOARD_DISPLAY_EXCLUDE_LCD --define=xDisplay_DISABLE_ALL --define=xdc_runtime_Assert_DISABLE_ALL --define=xdc_runtime_Log_DISABLE_ALL -g --c99 --gcc --diag_suppress=48 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 -Dxdc_cfg__xheader__='"xconfig_app_ble/package/cfg/app_ble_pem3.h"' -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_18_1_6 -O2 $(XDCINCS) -I$(ti.targets.arm.elf.M3.rootDir)/include -fs=./package/cfg -fr=./package/cfg
|
||||
-@$(FIXDEP) $@.dep $@.dep
|
||||
|
||||
package/cfg/app_ble_pem3.sem3: export C_DIR=
|
||||
package/cfg/app_ble_pem3.sem3: PATH:=$(ti.targets.arm.elf.M3.rootDir)/bin/;$(PATH)
|
||||
package/cfg/app_ble_pem3.sem3: Path:=$(ti.targets.arm.elf.M3.rootDir)/bin/;$(PATH)
|
||||
|
||||
clean,em3 ::
|
||||
-$(RM) package/cfg/app_ble_pem3.oem3
|
||||
-$(RM) package/cfg/app_ble_pem3.sem3
|
||||
|
||||
app_ble.pem3: package/cfg/app_ble_pem3.oem3 package/cfg/app_ble_pem3.mak
|
||||
|
||||
clean::
|
||||
-$(RM) package/cfg/app_ble_pem3.mak
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="x-windows-950"?>
|
||||
<!-- This file conforms to the DTD xdc/bld/build.dtd -->
|
||||
<package name="xconfig_app_ble" version="" producerId="undefined">
|
||||
<units>
|
||||
</units>
|
||||
<sources>
|
||||
<srcFile name="package/cfg/app_ble_pem3.c"/>
|
||||
</sources>
|
||||
<configscripts>
|
||||
<srcFile name="C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg"/>
|
||||
</configscripts>
|
||||
<makefiles>
|
||||
<srcFile name="package.mak" src="package.bld"/>
|
||||
<srcFile name="package/package.xdc.dep" src="package.xdc"/>
|
||||
<srcFile name="package/cfg/app_ble_pem3.mak" src="package.bld"/>
|
||||
<srcFile name="package/cfg/app_ble_pem3.oem3.dep" src="package/cfg/app_ble_pem3.c"/>
|
||||
<srcFile name="package/cfg/app_ble_pem3.dep" src="package/cfg/app_ble_pem3.cfg"/>
|
||||
<srcFile name="package/cfg/app_ble.xem3.mak" src="package.bld"/>
|
||||
<srcFile name="package/rel/xconfig_app_ble.tar.dep" src="package/rel/xconfig_app_ble.xdc.inc"/>
|
||||
</makefiles>
|
||||
<targets>
|
||||
<target name="ti.targets.arm.elf.M3"
|
||||
version="ti.targets.arm.elf.M3{1,0,18.1,6"
|
||||
rawVersion="18.1.6"
|
||||
platform="ti.platforms.simCM3"
|
||||
isa="v7M"
|
||||
suffix="em3"
|
||||
rootDir="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.6.LTS"
|
||||
os="undefined"
|
||||
rts="ti.targets.arm.rtsarm">
|
||||
<model endian="little"
|
||||
codeModel="thumb2"
|
||||
dataModel="undefined"/>
|
||||
</target>
|
||||
</targets>
|
||||
<libraries>
|
||||
</libraries>
|
||||
<configurations>
|
||||
<configuration name="app_ble"
|
||||
pname="app_ble.pem3"
|
||||
target="ti.targets.arm.elf.M3"
|
||||
platform="ti.platforms.simplelink:CC2640F128"
|
||||
profile="release"
|
||||
isPartial="false"
|
||||
xCfgScript="package/cfg/app_ble_pem3.cfg"
|
||||
xCfgPrefix="package/cfg/app_ble_pem3"
|
||||
cfgScript="C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg"
|
||||
cfgArgs="null"
|
||||
/>
|
||||
</configurations>
|
||||
<executables>
|
||||
<executable name="app_ble"
|
||||
pname="app_ble.xem3"
|
||||
target="ti.targets.arm.elf.M3"
|
||||
platform="ti.platforms.simplelink:CC2640F128"
|
||||
profile="release"
|
||||
xCfgScript="package/cfg/app_ble_pem3.cfg"
|
||||
xCfgPrefix="package/cfg/app_ble_pem3"
|
||||
cfgScript="C:/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg"
|
||||
cfgArgs="null"
|
||||
/>
|
||||
</executables>
|
||||
<tests>
|
||||
<test exeName="app_ble.xem3"
|
||||
args=""
|
||||
groupName="app_ble.xem3"
|
||||
refOutput="undefined"
|
||||
refExitCode="0"
|
||||
execArgs=""
|
||||
/>
|
||||
</tests>
|
||||
<releases relDir="package/rel/">
|
||||
<release name="xconfig_app_ble"
|
||||
pname="xconfig_app_ble.tar"
|
||||
label="default"
|
||||
>
|
||||
<file name="package/package.bld.xml"/>
|
||||
<file name="package/build.cfg"/>
|
||||
<file name="package/package.xdc.inc"/>
|
||||
</release>
|
||||
</releases>
|
||||
<repositories>
|
||||
</repositories>
|
||||
</package>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Do not modify this file; it is automatically
|
||||
* generated and any modifications will be overwritten.
|
||||
*
|
||||
* @(#) xdc-B24
|
||||
*/
|
||||
|
||||
#ifndef xconfig_app_ble__
|
||||
#define xconfig_app_ble__
|
||||
|
||||
|
||||
|
||||
#endif /* xconfig_app_ble__ */
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
clean::
|
||||
$(RM) package/xconfig_app_ble.sch
|
||||
$(RM) package/.vers_g180
|
||||
$(RM) package/.vers_r170
|
||||
$(RM) package/.vers_b160
|
||||
$(RM) package/.xdc-B24
|
||||
$(RM) package/xconfig_app_ble.java
|
||||
$(RM) package/xconfig_app_ble.class
|
||||
$(RM) package/package_xconfig_app_ble.c
|
||||
$(RM) package/package.defs.h
|
||||
$(RM) package/xconfig_app_ble.ccs
|
||||
|
||||
.interfaces: package/xconfig_app_ble.sch package/.vers_g180 package/.vers_r170 package/.vers_b160 package/.xdc-B24 package/xconfig_app_ble.java package/package_xconfig_app_ble.c package/package.defs.h package/xconfig_app_ble.ccs
|
||||
package/package.xdc.inc: package/.vers_g180
|
||||
package/.vers_g180:
|
||||
package/package.xdc.inc: package/.vers_r170
|
||||
package/.vers_r170:
|
||||
package/package.xdc.inc: package/.vers_b160
|
||||
package/.vers_b160:
|
||||
|
||||
.interfaces:
|
||||
|
||||
# schema include file dependencies
|
||||
package.xs:
|
||||
package/package.xdc.inc: package.xs
|
||||
|
||||
# schema update dependencies
|
||||
package/package.xdc.inc: xdc/IPackage.xdc
|
||||
xdc/IPackage.xdc:
|
||||
vpath xdc/IPackage.xdc $(XPKGVPATH)
|
||||
|
||||
ifneq (clean,$(MAKECMDGOALS))
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/global/java/package.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/global/java/package.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/tar.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/tar.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/intern/cmd/java/package.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/intern/cmd/java/package.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/intern/gen/java/package.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/intern/gen/java/package.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/intern/xsr/java/package.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/intern/xsr/java/package.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/ecj.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/ecj.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/antlr.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/antlr.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/js.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/shelf/java/js.jar
|
||||
C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/spec/java/package.jar:
|
||||
package/package.xdc.inc: C:/ti/xdctools_3_32_02_25_core/packages/xdc/services/spec/java/package.jar
|
||||
endif
|
||||
# goals for files generated during schema generation but unspecified by schema's pattern rule
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package.xdc
|
||||
package.xs
|
||||
package/xconfig_app_ble.sch
|
||||
package/.vers_g180
|
||||
package/.vers_r170
|
||||
package/.vers_b160
|
||||
package/.xdc-B24
|
||||
package/xconfig_app_ble.java
|
||||
package/xconfig_app_ble.class
|
||||
package/package_xconfig_app_ble.c
|
||||
package/package.defs.h
|
||||
package/xconfig_app_ble.ccs
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Do not modify this file; it is automatically
|
||||
* generated and any modifications will be overwritten.
|
||||
*
|
||||
* @(#) xdc-B24
|
||||
*/
|
||||
|
||||
#include <xdc/std.h>
|
||||
|
||||
__FAR__ char xconfig_app_ble__dummy__;
|
||||
|
||||
#define __xdc_PKGVERS null
|
||||
#define __xdc_PKGNAME xconfig_app_ble
|
||||
#define __xdc_PKGPREFIX xconfig_app_ble_
|
||||
|
||||
#ifdef __xdc_bld_pkg_c__
|
||||
#define __stringify(a) #a
|
||||
#define __local_include(a) __stringify(a)
|
||||
#include __local_include(__xdc_bld_pkg_c__)
|
||||
#endif
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package/package.bld.xml
|
||||
package/build.cfg
|
||||
package/package.xdc.inc
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+143
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Do not modify this file; it is automatically
|
||||
* generated and any modifications will be overwritten.
|
||||
*
|
||||
* @(#) xdc-B24
|
||||
*/
|
||||
import java.util.*;
|
||||
import org.mozilla.javascript.*;
|
||||
import xdc.services.intern.xsr.*;
|
||||
import xdc.services.spec.Session;
|
||||
|
||||
public class xconfig_app_ble
|
||||
{
|
||||
static final String VERS = "@(#) xdc-B24\n";
|
||||
|
||||
static final Proto.Elm $$T_Bool = Proto.Elm.newBool();
|
||||
static final Proto.Elm $$T_Num = Proto.Elm.newNum();
|
||||
static final Proto.Elm $$T_Str = Proto.Elm.newStr();
|
||||
static final Proto.Elm $$T_Obj = Proto.Elm.newObj();
|
||||
|
||||
static final Proto.Fxn $$T_Met = new Proto.Fxn(null, null, 0, -1, false);
|
||||
static final Proto.Map $$T_Map = new Proto.Map($$T_Obj);
|
||||
static final Proto.Arr $$T_Vec = new Proto.Arr($$T_Obj);
|
||||
|
||||
static final XScriptO $$DEFAULT = Value.DEFAULT;
|
||||
static final Object $$UNDEF = Undefined.instance;
|
||||
|
||||
static final Proto.Obj $$Package = (Proto.Obj)Global.get("$$Package");
|
||||
static final Proto.Obj $$Module = (Proto.Obj)Global.get("$$Module");
|
||||
static final Proto.Obj $$Instance = (Proto.Obj)Global.get("$$Instance");
|
||||
static final Proto.Obj $$Params = (Proto.Obj)Global.get("$$Params");
|
||||
|
||||
static final Object $$objFldGet = Global.get("$$objFldGet");
|
||||
static final Object $$objFldSet = Global.get("$$objFldSet");
|
||||
static final Object $$proxyGet = Global.get("$$proxyGet");
|
||||
static final Object $$proxySet = Global.get("$$proxySet");
|
||||
static final Object $$delegGet = Global.get("$$delegGet");
|
||||
static final Object $$delegSet = Global.get("$$delegSet");
|
||||
|
||||
Scriptable xdcO;
|
||||
Session ses;
|
||||
Value.Obj om;
|
||||
|
||||
boolean isROV;
|
||||
boolean isCFG;
|
||||
|
||||
Proto.Obj pkgP;
|
||||
Value.Obj pkgV;
|
||||
|
||||
ArrayList<Object> imports = new ArrayList<Object>();
|
||||
ArrayList<Object> loggables = new ArrayList<Object>();
|
||||
ArrayList<Object> mcfgs = new ArrayList<Object>();
|
||||
ArrayList<Object> icfgs = new ArrayList<Object>();
|
||||
ArrayList<String> inherits = new ArrayList<String>();
|
||||
ArrayList<Object> proxies = new ArrayList<Object>();
|
||||
ArrayList<Object> sizes = new ArrayList<Object>();
|
||||
ArrayList<Object> tdefs = new ArrayList<Object>();
|
||||
|
||||
void $$IMPORTS()
|
||||
{
|
||||
Global.callFxn("loadPackage", xdcO, "xdc");
|
||||
Global.callFxn("loadPackage", xdcO, "xdc.corevers");
|
||||
}
|
||||
|
||||
void $$OBJECTS()
|
||||
{
|
||||
pkgP = (Proto.Obj)om.bind("xconfig_app_ble.Package", new Proto.Obj());
|
||||
pkgV = (Value.Obj)om.bind("xconfig_app_ble", new Value.Obj("xconfig_app_ble", pkgP));
|
||||
}
|
||||
|
||||
void $$SINGLETONS()
|
||||
{
|
||||
pkgP.init("xconfig_app_ble.Package", (Proto.Obj)om.findStrict("xdc.IPackage.Module", "xconfig_app_ble"));
|
||||
Scriptable cap = (Scriptable)Global.callFxn("loadCapsule", xdcO, "xconfig_app_ble/package.xs");
|
||||
om.bind("xdc.IPackage$$capsule", cap);
|
||||
Object fxn;
|
||||
fxn = Global.get(cap, "init");
|
||||
if (fxn != null) pkgP.addFxn("init", (Proto.Fxn)om.findStrict("xdc.IPackage$$init", "xconfig_app_ble"), fxn);
|
||||
fxn = Global.get(cap, "close");
|
||||
if (fxn != null) pkgP.addFxn("close", (Proto.Fxn)om.findStrict("xdc.IPackage$$close", "xconfig_app_ble"), fxn);
|
||||
fxn = Global.get(cap, "validate");
|
||||
if (fxn != null) pkgP.addFxn("validate", (Proto.Fxn)om.findStrict("xdc.IPackage$$validate", "xconfig_app_ble"), fxn);
|
||||
fxn = Global.get(cap, "exit");
|
||||
if (fxn != null) pkgP.addFxn("exit", (Proto.Fxn)om.findStrict("xdc.IPackage$$exit", "xconfig_app_ble"), fxn);
|
||||
fxn = Global.get(cap, "getLibs");
|
||||
if (fxn != null) pkgP.addFxn("getLibs", (Proto.Fxn)om.findStrict("xdc.IPackage$$getLibs", "xconfig_app_ble"), fxn);
|
||||
fxn = Global.get(cap, "getSects");
|
||||
if (fxn != null) pkgP.addFxn("getSects", (Proto.Fxn)om.findStrict("xdc.IPackage$$getSects", "xconfig_app_ble"), fxn);
|
||||
pkgP.bind("$capsule", cap);
|
||||
pkgV.init2(pkgP, "xconfig_app_ble", Value.DEFAULT, false);
|
||||
pkgV.bind("$name", "xconfig_app_ble");
|
||||
pkgV.bind("$category", "Package");
|
||||
pkgV.bind("$$qn", "xconfig_app_ble.");
|
||||
pkgV.bind("$vers", Global.newArray());
|
||||
Value.Map atmap = (Value.Map)pkgV.getv("$attr");
|
||||
atmap.seal("length");
|
||||
imports.clear();
|
||||
pkgV.bind("$imports", imports);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("var pkg = xdc.om['xconfig_app_ble'];\n");
|
||||
sb.append("if (pkg.$vers.length >= 3) {\n");
|
||||
sb.append("pkg.$vers.push(Packages.xdc.services.global.Vers.getDate(xdc.csd() + '/..'));\n");
|
||||
sb.append("}\n");
|
||||
sb.append("if ('xconfig_app_ble$$stat$base' in xdc.om) {\n");
|
||||
sb.append("pkg.packageBase = xdc.om['xconfig_app_ble$$stat$base'];\n");
|
||||
sb.append("pkg.packageRepository = xdc.om['xconfig_app_ble$$stat$root'];\n");
|
||||
sb.append("}\n");
|
||||
sb.append("pkg.build.libraries = [\n");
|
||||
sb.append("];\n");
|
||||
sb.append("pkg.build.libDesc = [\n");
|
||||
sb.append("];\n");
|
||||
Global.eval(sb.toString());
|
||||
}
|
||||
|
||||
void $$INITIALIZATION()
|
||||
{
|
||||
Value.Obj vo;
|
||||
|
||||
if (isCFG) {
|
||||
}//isCFG
|
||||
Global.callFxn("init", pkgV);
|
||||
((Value.Arr)om.findStrict("$packages", "xconfig_app_ble")).add(pkgV);
|
||||
}
|
||||
|
||||
public void exec( Scriptable xdcO, Session ses )
|
||||
{
|
||||
this.xdcO = xdcO;
|
||||
this.ses = ses;
|
||||
om = (Value.Obj)xdcO.get("om", null);
|
||||
|
||||
Object o = om.geto("$name");
|
||||
String s = o instanceof String ? (String)o : null;
|
||||
isCFG = s != null && s.equals("cfg");
|
||||
isROV = s != null && s.equals("rov");
|
||||
|
||||
$$IMPORTS();
|
||||
$$OBJECTS();
|
||||
if (isROV) {
|
||||
}//isROV
|
||||
$$SINGLETONS();
|
||||
$$INITIALIZATION();
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,6 @@
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.45713043" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
|
||||
<listOptionValue builtIn="false" value="HEADSTAGE_NOTIFY_USE_ATT"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
|
||||
<listOptionValue builtIn="false" value="HEADSTAGE_MA_USE_SPI2"/>
|
||||
|
||||
BIN
Binary file not shown.
@@ -233,7 +233,7 @@ const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[BOOSTXL_CC2650MA_SPICOUNT] = {
|
||||
.mosiPin = Board_SPI0_MOSI,
|
||||
.misoPin = Board_SPI0_MISO,
|
||||
.clkPin = Board_SPI0_CLK,
|
||||
.csnPin = Board_SPI0_CS
|
||||
.csnPin = Board_SPI0_CSN
|
||||
//
|
||||
},
|
||||
#ifdef HEADSTAGE_MA_USE_SPI2
|
||||
@@ -250,7 +250,7 @@ const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[BOOSTXL_CC2650MA_SPICOUNT] = {
|
||||
.mosiPin = Board_SPI1_MOSI,
|
||||
.misoPin = Board_SPI1_MISO,
|
||||
.clkPin = Board_SPI1_CLK,
|
||||
.csnPin = Board_SPI1_CS //
|
||||
.csnPin = Board_SPI1_CSN //
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -51,6 +51,11 @@ extern "C" {
|
||||
#include <ti/drivers/PIN.h>
|
||||
#include <driverlib/ioc.h>
|
||||
|
||||
#ifdef HEADSTAGE_UNI_2_0
|
||||
#include "neu/headstage_pin.h"
|
||||
#else
|
||||
#include "uni/headstage_pin.h"
|
||||
#endif
|
||||
/** ============================================================================
|
||||
* Externs
|
||||
* ==========================================================================*/
|
||||
@@ -144,36 +149,36 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
#define Board_UART_TX Board_BP_UART_Rx /* RXD */
|
||||
#define Board_UART_RX Board_BP_UART_Tx /* TXD */
|
||||
|
||||
/*
|
||||
* SPI0 is LSK interface
|
||||
*/
|
||||
#define Board_SPI0_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI0_MOSI IOID_0
|
||||
#define Board_SPI0_CLK IOID_1
|
||||
#define Board_SPI0_CS IOID_3
|
||||
|
||||
/*
|
||||
* SPI1 is ASK interface
|
||||
*/
|
||||
|
||||
#define Board_SPI1_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI1_MOSI IOID_13
|
||||
#define Board_SPI1_CLK PIN_UNASSIGNED
|
||||
#define Board_SPI1_CS IOID_4
|
||||
|
||||
/* Power Management Board */
|
||||
#define Board_SRDY Board_BP_Pin_J2_19
|
||||
#define Board_MRDY Board_BP_Pin_J1_2
|
||||
|
||||
/* PWM outputs */
|
||||
#define Board_PWMPIN0 IOID_6
|
||||
#define Board_PWMPIN1 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN2 IOID_8
|
||||
#define Board_PWMPIN3 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN4 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN5 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN6 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN7 PIN_UNASSIGNED
|
||||
///*
|
||||
// * SPI0 interface with DBS chip 2.0
|
||||
// */
|
||||
//#define Board_SPI0_MISO PIN_UNASSIGNED
|
||||
//#define Board_SPI0_MOSI PIN_UNASSIGNED
|
||||
//#define Board_SPI0_CLK PIN_UNASSIGNED
|
||||
//#define Board_SPI0_CS PIN_UNASSIGNED
|
||||
//
|
||||
///*
|
||||
// * SPI1 interface work with LED
|
||||
// */
|
||||
//
|
||||
//#define Board_SPI1_MISO PIN_UNASSIGNED
|
||||
//#define Board_SPI1_MOSI PIN_UNASSIGNED
|
||||
//#define Board_SPI1_CLK PIN_UNASSIGNED
|
||||
//#define Board_SPI1_CS PIN_UNASSIGNED
|
||||
//
|
||||
///* Power Management Board */
|
||||
//#define Board_SRDY Board_BP_Pin_J2_19
|
||||
//#define Board_MRDY Board_BP_Pin_J1_2
|
||||
//
|
||||
///* PWM outputs */
|
||||
//#define Board_PWMPIN0 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN1 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN2 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN3 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN4 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN5 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN6 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN7 PIN_UNASSIGNED
|
||||
|
||||
|
||||
/** ============================================================================
|
||||
|
||||
@@ -51,6 +51,8 @@ extern "C" {
|
||||
#include <ti/drivers/PIN.h>
|
||||
#include <driverlib/ioc.h>
|
||||
|
||||
#include "neu/headstage_pin.h"
|
||||
|
||||
/** ============================================================================
|
||||
* Externs
|
||||
* ==========================================================================*/
|
||||
@@ -68,34 +70,34 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
*/
|
||||
|
||||
/* Discrete outputs */
|
||||
#define Board_RLED IOID_6
|
||||
#define Board_GLED IOID_7
|
||||
#define Board_RLED PIN_UNASSIGNED
|
||||
#define Board_GLED PIN_UNASSIGNED
|
||||
#define Board_LED_ON 1
|
||||
#define Board_LED_OFF 0
|
||||
|
||||
/* Discrete inputs */
|
||||
#define Board_BTN1 IOID_13
|
||||
#define Board_BTN2 IOID_14
|
||||
#define Board_BTN1 PIN_UNASSIGNED
|
||||
#define Board_BTN2 PIN_UNASSIGNED
|
||||
|
||||
/* UART Board */
|
||||
#define Board_UART_RX IOID_1 /* RXD */
|
||||
#define Board_UART_TX IOID_2 /* TXD */
|
||||
#define Board_UART_RX PIN_UNASSIGNED /* RXD */
|
||||
#define Board_UART_TX PIN_UNASSIGNED /* TXD */
|
||||
#define Board_UART_CTS PIN_UNASSIGNED /* CTS */
|
||||
#define Board_UART_RTS PIN_UNASSIGNED /* RTS */
|
||||
|
||||
/* SPI Board */
|
||||
#define Board_SPI0_MISO PIN_UNASSIGNED /* RF1.20 */
|
||||
#define Board_SPI0_MOSI IOID_12 /* RF1.18 */
|
||||
#define Board_SPI0_CLK PIN_UNASSIGNED /* RF1.16 */
|
||||
#define Board_SPI0_CSN IOID_4
|
||||
#define Board_SPI1_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI1_MOSI IOID_10
|
||||
#define Board_SPI1_CLK IOID_9
|
||||
#define Board_SPI1_CSN IOID_3
|
||||
//#define Board_SPI0_MISO PIN_UNASSIGNED /* RF1.20 */
|
||||
//#define Board_SPI0_MOSI PIN_UNASSIGNED /* RF1.18 */
|
||||
//#define Board_SPI0_CLK PIN_UNASSIGNED /* RF1.16 */
|
||||
//#define Board_SPI0_CSN PIN_UNASSIGNED
|
||||
//#define Board_SPI1_MISO PIN_UNASSIGNED
|
||||
//#define Board_SPI1_MOSI PIN_UNASSIGNED
|
||||
//#define Board_SPI1_CLK PIN_UNASSIGNED
|
||||
//#define Board_SPI1_CSN PIN_UNASSIGNED
|
||||
|
||||
/* I2C */
|
||||
#define Board_I2C0_SCL0 IOID_4
|
||||
#define Board_I2C0_SDA0 IOID_5
|
||||
#define Board_I2C0_SCL0 PIN_UNASSIGNED
|
||||
#define Board_I2C0_SDA0 PIN_UNASSIGNED
|
||||
|
||||
/* SPI */
|
||||
#define Board_SPI_FLASH_CS IOID_20
|
||||
@@ -123,21 +125,21 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
|
||||
/* Booster pack LCD (430BOOST - Sharp96 Rev 1.1) */
|
||||
#define Board_LCD_CS IOID_24 // SPI chip select
|
||||
#define Board_LCD_EXTCOMIN IOID_12 // External COM inversion
|
||||
#define Board_LCD_EXTCOMIN PIN_UNASSIGNED // External COM inversion
|
||||
#define Board_LCD_ENABLE IOID_22 // LCD enable
|
||||
#define Board_LCD_POWER IOID_23 // LCD power control
|
||||
#define Board_LCD_CS_ON 1
|
||||
#define Board_LCD_CS_OFF 0
|
||||
|
||||
/* PWM outputs */
|
||||
#define Board_PWMPIN0 Board_RLED
|
||||
#define Board_PWMPIN1 Board_GLED
|
||||
#define Board_PWMPIN2 IOID_5
|
||||
#define Board_PWMPIN3 IOID_11
|
||||
#define Board_PWMPIN4 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN5 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN6 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN7 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN0 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN1 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN2 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN3 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN4 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN5 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN6 PIN_UNASSIGNED
|
||||
//#define Board_PWMPIN7 PIN_UNASSIGNED
|
||||
|
||||
/** ============================================================================
|
||||
* Instance identifiers
|
||||
|
||||
@@ -205,6 +205,7 @@ Error.maxDepth = 2;
|
||||
/* ================ Hwi configuration ================ */
|
||||
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
|
||||
var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
|
||||
|
||||
/*
|
||||
* Checks for Hwi (system) stack overruns while in the Idle loop.
|
||||
*
|
||||
@@ -218,6 +219,7 @@ var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
|
||||
*/
|
||||
//halHwi.checkStackFlag = true;
|
||||
halHwi.checkStackFlag = false;
|
||||
//C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\.config\xconfig_app_ble
|
||||
|
||||
/*
|
||||
* The following options alter the system's behavior when a hardware exception
|
||||
|
||||
+2567
File diff suppressed because it is too large
Load Diff
+10
-41
@@ -287,6 +287,11 @@ static uint8_t CHIP_ID = 0;
|
||||
*/
|
||||
static uint16_t CONNECT_HANDLE = 0;
|
||||
|
||||
/**
|
||||
* command instruction buffer
|
||||
*/
|
||||
static uint8_t cdr_buf[BLE_CDR_BUFF_SIZE] = {0};
|
||||
|
||||
/*====================
|
||||
==== event table ====
|
||||
====================*/
|
||||
@@ -329,6 +334,9 @@ static EventTableEntry EVENT_TABLE[] = { //
|
||||
#endif
|
||||
#ifdef HEADSTAGE_STI_H
|
||||
{EVT_ALL, &headstage_sti_event},
|
||||
#endif
|
||||
#ifdef HEADSTAGE_NEU_H
|
||||
{EVT_ALL, &headstage_neu_event},
|
||||
#endif
|
||||
// terminated
|
||||
{0, NULL}};
|
||||
@@ -352,8 +360,6 @@ static void headstage_event_handle() {
|
||||
* system handle for instruction input.
|
||||
*/
|
||||
static void headstage_update_instruction(uint8_t *instruction) {
|
||||
static uint8_t cdr_buf[BLE_CDR_BUFF_SIZE] = {0};
|
||||
|
||||
uint8_t ins_type = instruction[0] & 0xF0;
|
||||
CHIP_ID = instruction[0] & 0x0F;
|
||||
uint8_t ins_oper = instruction[1] & 0xF0;
|
||||
@@ -369,45 +375,8 @@ static void headstage_update_instruction(uint8_t *instruction) {
|
||||
break;
|
||||
}
|
||||
case INS_TYPE_CIS: {
|
||||
switch (ins_oper) {
|
||||
case CIS_NOP: {
|
||||
// nothing
|
||||
cdr_buf[0] = _B_4b4b(CIS_NOP, CHIP_ID);
|
||||
cdr_buf[1] = _B_4b4b(CDR_SUCCESS, 0);
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, 2, cdr_buf);
|
||||
break;
|
||||
}
|
||||
#ifdef HEADSTAGE_CIS_VOLT_H
|
||||
case CIS_VOLT: {
|
||||
uint8_t status = headstage_update_vis_volt(ins_len, instruction + 2, cdr_buf + 2);
|
||||
|
||||
cdr_buf[0] = _B_4b4b(CIS_VOLT, CHIP_ID);
|
||||
cdr_buf[1] = status;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef HEADSTAGE_CIS_LED_H
|
||||
case CIS_LED: {
|
||||
uint8_t status = headstage_update_vis_led(ins_len, instruction + 2, cdr_buf + 2);
|
||||
|
||||
cdr_buf[0] = _B_4b4b(CIS_LED, CHIP_ID);
|
||||
cdr_buf[1] = status;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default: {
|
||||
cdr_buf[0] = _B_4b4b(ins_oper, CHIP_ID);
|
||||
cdr_buf[1] = _B_4b4b(CDR_FAILURE, 0);
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
headstage_update_cis_instruction(ins_oper);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,9 +3,9 @@
|
||||
#ifndef HEADSTAGE_ARM_H
|
||||
#define HEADSTAGE_ARM_H
|
||||
|
||||
static uint16_t headstage_ramp_data_counter = 0;
|
||||
|
||||
static void headstage_arm_append_ramp_data(uint8_t *buff) {
|
||||
static uint16_t headstage_ramp_data_counter = 0;
|
||||
|
||||
uint16_t v = headstage_ramp_data_counter++;
|
||||
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ static void headstage_cis_led_enable(uint8_t enable);
|
||||
static uint8_t headstage_cis_led_set_pattern(uint8_t pattern);
|
||||
|
||||
/**
|
||||
* @para pattern: pattern number
|
||||
* @para parameter: led parameter, NULL to unset
|
||||
* @param pattern: pattern number
|
||||
* @param parameter: led parameter, NULL to unset
|
||||
* @return: CDR_SUCCESS
|
||||
*/
|
||||
static uint8_t headstage_cis_led_set_value(uint8_t pattern, //
|
||||
|
||||
+3
-3
@@ -192,7 +192,7 @@ static void headstage_led_color(uint8_t color) {
|
||||
==== LED implement (GPIO) ====
|
||||
============================*/
|
||||
|
||||
#ifdef BOOSTXL_CC2650MA
|
||||
#ifdef HEADSTAGE_UNI_H
|
||||
#define HEADSTAGE_LED_USE_GPIO
|
||||
#endif
|
||||
|
||||
@@ -208,10 +208,10 @@ static void headstage_led_spi_transmit() {
|
||||
for (int8_t j = 15; j >= 0; j--) {
|
||||
int16_t v = (d & (1 << j)); // why check > 0 or not
|
||||
bool SET_LED = (v > 0) ? 1 : 0;
|
||||
headstage_pin_output(PIN_LED_CLK, 1);
|
||||
headstage_pin_output(PIN_LED_CLK, 0);
|
||||
CPUdelay(16 * 400); // 2500hz
|
||||
headstage_pin_output(PIN_LED_OUT, SET_LED);
|
||||
headstage_pin_output(PIN_LED_CLK, 0);
|
||||
headstage_pin_output(PIN_LED_CLK, 1);
|
||||
CPUdelay(16 * 400); // 2500hz
|
||||
}
|
||||
}
|
||||
|
||||
+1003
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -31,7 +31,7 @@ optional implement
|
||||
|
||||
#include <xdc/runtime/Timestamp.h>
|
||||
|
||||
#define headstage_time_stamp_us() (Timestamp_get32() / 2)
|
||||
#define headstage_time_stamp_us() (Timestamp_get32() / 2)
|
||||
|
||||
/*========================
|
||||
==== notify function ====
|
||||
@@ -66,7 +66,7 @@ static void headstage_notify_send() {
|
||||
}
|
||||
|
||||
#else
|
||||
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer) ;
|
||||
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
+2
@@ -14,6 +14,8 @@
|
||||
#include "zm/headstage_pin.h"
|
||||
#elif defined(HEADSTAGE_STI_H)
|
||||
#include "sti/headstage_pin.h"
|
||||
#elif defined(HEADSTAGE_NEU_H)
|
||||
#include "neu/headstage_pin.h"
|
||||
#else
|
||||
|
||||
#error "headstage_pin headstage_pin_configuration not defined"
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
|
||||
/**
|
||||
\file headstage_swi.h
|
||||
In order to enable interrupt, hookset function need declaring.
|
||||
reference:ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/docs/Bios_User_Guide.pdf
|
||||
*/
|
||||
|
||||
#ifndef HEADSTAGE_SWI_H
|
||||
#define HEADSTAGE_SWI_H
|
||||
|
||||
#include <ti/sysbios/knl/Swi.h>
|
||||
#include <xdc/runtime/Error.h>
|
||||
|
||||
/*
|
||||
software interrupt
|
||||
*/
|
||||
Swi_Handle headstage_swi;
|
||||
|
||||
typedef void (*headstage_swiFxn)(UArg arg0, UArg arg1);
|
||||
|
||||
void headstage_swi_init(headstage_swiFxn callback) {
|
||||
Error_Block eb;
|
||||
Error_init(&eb);
|
||||
headstage_swiFxn my_swi = callback;
|
||||
headstage_swi = Swi_create(my_swi, NULL, &eb);
|
||||
}
|
||||
|
||||
#endif
|
||||
+311
-76
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef HEADSTAGE_H
|
||||
#error "headstage.h not include"
|
||||
#endif
|
||||
@@ -7,6 +7,72 @@
|
||||
#ifndef HEADSTAGE_UNI_H
|
||||
#define HEADSTAGE_UNI_H
|
||||
|
||||
/**
|
||||
* @file headstage_uni.h
|
||||
*
|
||||
* Copyright (c) 2019. BioPro. Scientific.
|
||||
*
|
||||
* NEULIVE firmware structure:
|
||||
*
|
||||
* headstage_init()
|
||||
* headstage_uni_event()
|
||||
* headstage_umc_state_transfer_lsk()
|
||||
* headstage_umc_state_transfer_ask()
|
||||
*
|
||||
* description:
|
||||
*
|
||||
* Construct corresponding headstage_uni_event to implement the communication between
|
||||
* DBS and CC2650. Because finite state machine is used to build the digital core,
|
||||
* a similar structure to monitor its state is needed.
|
||||
*
|
||||
* headstage_uni_event:
|
||||
*
|
||||
* 1. LSK transmit event :
|
||||
* receive LSK and process raw data
|
||||
*
|
||||
* 2. ASK transmit event :
|
||||
* transmit ASK to DBS chip
|
||||
*
|
||||
* 3. trigger stimulation event:
|
||||
* transmit trigger flag to DBS chip
|
||||
*
|
||||
* 4. Disconnect :
|
||||
* stop system working
|
||||
*
|
||||
* ...reserved
|
||||
*
|
||||
* protocol between DBS chip and cc2650:
|
||||
*
|
||||
* DBS (LSK) -> CC2650 (SPI):
|
||||
* format: 9'b PREAMBLE + 4'b HEADER + 10'bit DATA
|
||||
* PREAMBLE: imply the channel order, refer to rearrange channel for more detail.
|
||||
*
|
||||
* cc2650 (SPI) -> DBS (ASK):
|
||||
* format: 4'bHEADER + ( 10'b INSTRUCTION + 4'b ID ) * 2
|
||||
* INSTRUCTION: construct the instruction corresponding to DBS chip
|
||||
*
|
||||
* state machine:
|
||||
*
|
||||
* In order to control the digital core inside DBS chip, this application needs to simulate a similar structure.
|
||||
* (interrupt)
|
||||
* IDLE -> HANDSHAKE -> HANDSHAKE_RECEIVE -> INITIAL -> CONFIGURE -> WAIT_START --> TRIGGER -> WAIT_TRIGGER ----------------> CONFIGURE
|
||||
* | |
|
||||
* --> LIMITED --|
|
||||
* | |
|
||||
* --> CONTINUOUS --
|
||||
*
|
||||
* State Description:
|
||||
|
||||
* There are two state machines implemented in this structure.
|
||||
* Different state acts differently,
|
||||
* e.g., CONFIGURE and WAIT_START would transmit the same code to DBS with different meaning
|
||||
* state transfer in LSK:
|
||||
* After receiving LSK data, acts corresponding to current state and decide to change state or not
|
||||
* state transfer in ASK:
|
||||
* After receiving ASK data, acts corresponding to current state
|
||||
*
|
||||
*/
|
||||
|
||||
// TODO low frequency mode
|
||||
// TODO battery record
|
||||
// TODO watchdog function need implementing
|
||||
@@ -15,12 +81,30 @@
|
||||
/*=================
|
||||
==== constant ====
|
||||
=================*/
|
||||
// data transmit format 9'b PREAMBLE + 4'b HEADER + 10'bit DATA
|
||||
|
||||
// clang-format off
|
||||
|
||||
/**
|
||||
specific data from DBS
|
||||
|
||||
In order to set recording channel, arrange a set of selected channel.
|
||||
The first select channel data will come with preamble.
|
||||
*/
|
||||
#define UMC_PREAMBLE 0b011000001
|
||||
/**
|
||||
header used in LSK and ASK transmission
|
||||
*/
|
||||
#define UMC_HEADER 0b0101
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
The data format between NEULIVE and CONTROLL BOX
|
||||
|
||||
Use notification to transmit data to control box through BLE.
|
||||
Definition of the protocol:
|
||||
4'B timestamp + 2'B time delta + (4'b channel + 10'b voltage + 2'b flag) * (N)
|
||||
N: numbers of data transmitted in a transaction
|
||||
*/
|
||||
#define HEADSTAGE_NOTIFY_USE_TDC4VAF2
|
||||
/*================
|
||||
==== include ====
|
||||
@@ -33,22 +117,41 @@
|
||||
#include "headstage_led.h"
|
||||
#include "headstage_watchdog.h"
|
||||
#include "headstage_notify.h"
|
||||
#include "headstage_indicate.h"
|
||||
#include "headstage_swi.h"
|
||||
#include "tni/headstage_notify.h"
|
||||
#include "uni/headstage_spi.h"
|
||||
#include "uni/headstage_pwm.h"
|
||||
#include "uni/headstage_adc.h"
|
||||
#include "uni/uni1.2_parameter.h"
|
||||
#include "headstage_indicate.h"
|
||||
#include "uni/uni1.3_parameter.h"
|
||||
|
||||
/*===================================
|
||||
==== instruction building macro ====
|
||||
==================================*/
|
||||
/**
|
||||
construct final instruction
|
||||
|
||||
Construct the final instruction transmitted to DBS chip
|
||||
final instruction = Header + instruction + instruction
|
||||
|
||||
@param code: prebuilt instruction
|
||||
@return final instruction
|
||||
*/
|
||||
|
||||
#define build_instruction(code) \
|
||||
({ \
|
||||
uint32_t __x = (code)&0x3FFF; \
|
||||
(UMC_HEADER << 28) | (__x << 14) | (__x); \
|
||||
})
|
||||
/**
|
||||
construct instruction
|
||||
|
||||
Construct the instruction and pass it to build_instruction.
|
||||
Instruction = 4'b type(opcode) + 6'b value + 4'b chip_id
|
||||
@param type: the opcode is going to be transmitted
|
||||
@param value: the operating value
|
||||
@return final instruction
|
||||
*/
|
||||
|
||||
#define build_configure_instruction(type, value) \
|
||||
({ \
|
||||
@@ -58,14 +161,11 @@
|
||||
build_instruction((__t << 10) | (__v << 4) | __c); \
|
||||
})
|
||||
|
||||
#define build_conservative_instruction(type, value) \
|
||||
({ \
|
||||
uint32_t __t = (type)&0xF; \
|
||||
uint32_t __v = (value)&0x3F; \
|
||||
uint32_t __c = (CHIP_ID)&0xFF; \
|
||||
uint32_t __x = ((__t << 6) | (__v)) & 0x3FF; \
|
||||
(UMC_HEADER << 28) | (__x << 18) | (__c << 10) | (__x); \
|
||||
})
|
||||
/**
|
||||
get data from spi_rxbuf and convert it to uint16_t
|
||||
@param index: getting value from the index
|
||||
@return receive data casting in uint16_t
|
||||
*/
|
||||
|
||||
#define rx_get_u16(index) \
|
||||
({ \
|
||||
@@ -75,6 +175,12 @@
|
||||
(__a << 8) | __b; \
|
||||
})
|
||||
|
||||
/**
|
||||
get data from spi_rxbuf and convert it to uint32_t
|
||||
@param index: the index of spi_rxbuf
|
||||
@return receive data casting in uint32_t
|
||||
*/
|
||||
|
||||
#define rx_get_u32(index) \
|
||||
({ \
|
||||
uint32_t __i = (uint32_t)(index); \
|
||||
@@ -85,6 +191,12 @@
|
||||
(__a << 24) | (__b << 16) | (__c << 8) | __d; \
|
||||
})
|
||||
|
||||
/**
|
||||
put uint16_t into spi_txbuf
|
||||
@param index: the index of spi_txbuf
|
||||
@param value: the data is going to be set
|
||||
*/
|
||||
|
||||
#define tx_put_u16(index, value) \
|
||||
do { \
|
||||
uint32_t __i = (uint32_t)(index); \
|
||||
@@ -93,6 +205,12 @@
|
||||
spi_txbuf[__i++] = (__v)&0xFF; \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
put uint32_t into spi_txbuf
|
||||
@param index: the index of spi_txbuf
|
||||
@param value: the data is going to be set
|
||||
*/
|
||||
|
||||
#define tx_put_u32(index, value) \
|
||||
do { \
|
||||
uint32_t __i = (uint32_t)(index); \
|
||||
@@ -107,37 +225,72 @@
|
||||
==== constant ====
|
||||
=================*/
|
||||
|
||||
// data rate
|
||||
/**
|
||||
this part frequency is controlling the operating
|
||||
*/
|
||||
// clang-format off
|
||||
#define UMC_LSK_FREQ 100000 // 500 khz
|
||||
#define UMC_ASK_FREQ 20000 // 100 khz
|
||||
#define UMC_SYS_CLK 2000000 // target is 8Mhz
|
||||
#define UMC_POLY_R_CLK 1000 // poly-R switching clock
|
||||
/** target LSK data rate is 50 khz */
|
||||
#define UMC_LSK_FREQ 50000
|
||||
/** target ASK data rate is 10 khz */
|
||||
#define UMC_ASK_FREQ 10000
|
||||
/** target SYSTEM clock frequency is 1Mhz */
|
||||
#define UMC_SYS_CLK 1000000
|
||||
/** poly-R switching clock frequency */
|
||||
#define UMC_POLY_R_CLK 1000
|
||||
|
||||
|
||||
// Neulive instruction macro
|
||||
/// Neulive instruction macro
|
||||
/** handshake information receive from DBS */
|
||||
#define UMC_HAND_SHAKE_SEND 0b0011000011
|
||||
/** handshake information send to DBS */
|
||||
#define UMC_HAND_SHAKE_RECV 0b01010011000110000000110001100000
|
||||
/** set the interface with DBS */
|
||||
#define UMC_MODE_LSK_OUT 0b101001
|
||||
#define UMC_CALIB_DONE 0b1010 // UMC_CALIB_DONE + UMC_MODE_LSK_OUT -> leave initial state and set "CHIP ID"
|
||||
#define UMC_CONFIG_DONE 0b0100 // UMC_CONFIG_DONE + 6'bxxxxxx -> EXIT config state
|
||||
/** UMC_CALIB_DONE + UMC_MODE_LSK_OUT : leave initial state and set "CHIP ID" */
|
||||
#define UMC_CALIB_DONE 0b1010
|
||||
/** UMC_CONFIG_DONE + 6 bits don't care : EXIT config state */
|
||||
#define UMC_CONFIG_DONE 0b0100
|
||||
/**
|
||||
UMC_IRQ + UMC_IRQ_CODE + CHIP ID : go back to configure data from continuous, trigger, limited
|
||||
UMC_IRQ type of interrupt
|
||||
*/
|
||||
#define UMC_IRQ 0b1110
|
||||
#define UMC_IRQ_CODE 0b001001 // UMC_IRQ + UMC_IRQ_CODE + CHIP ID -> when we want to go back to configure data.
|
||||
/** UMC_IRQ_CODE value of interrupt */
|
||||
#define UMC_IRQ_CODE 0b001001
|
||||
/** leave wait trigger state by this instruction */
|
||||
#define UMC_GOLDEN_KEY 0b01011010010110000010100101100000 //this is important to leave wait trigger state.
|
||||
|
||||
// we need to check transfer data meets or not
|
||||
#define UMC_TRANSMIT_S 0b101 // transmit success
|
||||
/** we need to check transfer data meets or not */
|
||||
#define UMC_TRANSMIT_S 0b101
|
||||
|
||||
// trigger stimulation by ask
|
||||
/**
|
||||
trigger a stimulation by ASK
|
||||
UMC_TRIG + UMC_STIMULUS + CHIP ID
|
||||
UMC_TRIG type of trigger a stimulus
|
||||
*/
|
||||
#define UMC_TRIG 0b1100
|
||||
/**
|
||||
UMC_STIMULUS value of trigger a stimulus
|
||||
*/
|
||||
#define UMC_STIMULUS 0b000011
|
||||
|
||||
/**
|
||||
type of opcode, control box to cc2650.
|
||||
*/
|
||||
/** control box to cc2650:default type instruction */
|
||||
#define RIS_DEFAULT 0x00
|
||||
/** control box to cc2650 instruction opcode, parameter set 1 */
|
||||
#define RIS_SET_PARA 0x20
|
||||
/** control box to cc2650 instruction opcode, remove amplifier offset */
|
||||
#define RIS_RESET_AMP 0x60
|
||||
/** control box to cc2650 instruction opcode, parameter set 2 */
|
||||
#define RIS_DIR 0xA0
|
||||
/** control box to cc2650 instruction opcode, trigger stimulation */
|
||||
#define RIS_UMC_TRIG 0xC0
|
||||
|
||||
/**
|
||||
stimulation waveform pattern
|
||||
*/
|
||||
#define STI_MODE_DISABLE 0
|
||||
#define STI_MODE_POS 1
|
||||
#define STI_MODE_NEG 2
|
||||
@@ -146,11 +299,17 @@
|
||||
#define STI_MODE_AWF 5
|
||||
#define ARM_MODE_RAMP 8
|
||||
|
||||
/**
|
||||
reserved virtual instruction
|
||||
*/
|
||||
#define VIS_BLE_T 0b10100000
|
||||
#define VIS_SHIFT_T 0b01010000
|
||||
|
||||
// all the categories of instruction we can change .
|
||||
|
||||
/**
|
||||
configuration set for DBS instruction
|
||||
*/
|
||||
#define CONFIG_AMP_CH 0x10 // this state is for transmit amp channel one more time
|
||||
#define CONFIG_AMP_MUX 0x01
|
||||
#define CONFIG_AMP_GAIN 0x02
|
||||
@@ -173,12 +332,16 @@
|
||||
#define CONFIG_ERROR 0xFF
|
||||
// clang-format on
|
||||
|
||||
/*=================================
|
||||
/**================================
|
||||
==== constant parameter table ====
|
||||
================================*/
|
||||
|
||||
#define REC_CHANNEL_COUNT 16
|
||||
|
||||
/**
|
||||
stimulation waveform corresponding to
|
||||
*/
|
||||
|
||||
static uint16_t sti_waveform_table[5] = {
|
||||
{0b000011}, // positive
|
||||
{0b001100}, // negative
|
||||
@@ -187,6 +350,9 @@ static uint16_t sti_waveform_table[5] = {
|
||||
{0b000010} // arbitrary, test arbitrary mode
|
||||
};
|
||||
|
||||
/**
|
||||
@var
|
||||
*/
|
||||
// TODO add disable stimulation mode
|
||||
// TODO when we choose trigger mode , but we can't transmit any trigger instruction.
|
||||
static uint16_t sti_mode_table[4] = {
|
||||
@@ -332,12 +498,21 @@ struct HEADSTAGE_PARAMETER_TABLE {
|
||||
*/
|
||||
bool adc_clock_signal;
|
||||
|
||||
/*
|
||||
/**
|
||||
* amplifier reset
|
||||
*/
|
||||
bool amp_rst;
|
||||
} INSTRUCTION = {0};
|
||||
|
||||
/**
|
||||
@fn static void headstage_uni_delay()
|
||||
@brief make some delay
|
||||
*/
|
||||
static void headstage_uni_delay() {
|
||||
for (uint16_t i = 0; i < 1023; i++)
|
||||
;
|
||||
}
|
||||
|
||||
static void rearrange_channel_mux_table() {
|
||||
uint8_t enable_channel_number = 0;
|
||||
uint8_t last_enable_channel = 0;
|
||||
@@ -415,6 +590,10 @@ static void rearrange_channel_mux_table() {
|
||||
#define UPDATE_DONE 0xFF
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
@struct UMC_STATE
|
||||
*/
|
||||
|
||||
struct {
|
||||
uint8_t state;
|
||||
|
||||
@@ -485,6 +664,7 @@ static void headstage_spi_ask_callback(SPI_Handle handle, SPI_Transaction* trans
|
||||
}
|
||||
|
||||
static void headstage_spi_lsk_callback(SPI_Handle handle, SPI_Transaction* transaction) {
|
||||
if (not_buf_offset >= BLE_NOT_BUFF_SIZE) Swi_post(headstage_swi);
|
||||
if (UMC_STATE.reset_flag == 0) flag_notify(EVT_UMC_LSK);
|
||||
}
|
||||
|
||||
@@ -507,6 +687,8 @@ static void headstage_reset() {
|
||||
==== function implement ====
|
||||
==========================*/
|
||||
|
||||
static void headstage_swi_func(UArg a0, UArg a1) {}
|
||||
|
||||
/**
|
||||
* initialize parameter and device.
|
||||
*/
|
||||
@@ -514,6 +696,7 @@ static void headstage_init() {
|
||||
headstage_pin_open();
|
||||
headstage_spi_open();
|
||||
headstage_pwm_open();
|
||||
headstage_swi_init(headstage_swi_func);
|
||||
headstage_led_spi_color(COLOR_GREEN);
|
||||
// headstage_watchdog_open();
|
||||
// if(headstage_watchdog_handle == NULL)
|
||||
@@ -552,22 +735,20 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
break;
|
||||
}
|
||||
case RIS_SET_PARA: {
|
||||
uint8_t amp_gain = (instruction[0] & 0x1C) >> 2;
|
||||
uint8_t pulse_width = ((instruction[0] & 0x03) << 2) | ((instruction[1] & 0xC0) >> 6);
|
||||
uint8_t sti_times = (instruction[1] & 0x3F);
|
||||
uint8_t sti_freq = (instruction[2] & 0x3F);
|
||||
uint8_t mode = (instruction[2] & 0xC0) >> 6;
|
||||
uint8_t cha = (instruction[3] & 0x0F);
|
||||
uint8_t chb = (instruction[4] & 0xF0) >> 4;
|
||||
uint8_t chc = (instruction[4] & 0x0F);
|
||||
uint8_t chd = (instruction[5] & 0xF0) >> 4;
|
||||
|
||||
uint8_t amp_gain = (instruction[0] & 0x1C) >> 2;
|
||||
uint8_t pulse_width = ((instruction[0] & 0x03) << 2) | ((instruction[1] & 0xC0) >> 6);
|
||||
uint8_t sti_times = (instruction[1] & 0x3F);
|
||||
uint8_t sti_freq = (instruction[2] & 0x3F);
|
||||
uint8_t mode = (instruction[2] & 0xC0) >> 6;
|
||||
uint8_t cha = (instruction[3] & 0x0F);
|
||||
uint8_t chb = (instruction[4] & 0xF0) >> 4;
|
||||
uint8_t chc = (instruction[4] & 0x0F);
|
||||
uint8_t chd = (instruction[5] & 0xF0) >> 4;
|
||||
INSTRUCTION.amp_gain = amp_gain;
|
||||
INSTRUCTION.pulse_width = pulse_width;
|
||||
INSTRUCTION.sti_times = sti_times;
|
||||
INSTRUCTION.mode = mode;
|
||||
INSTRUCTION.sti_freq = sti_freq;
|
||||
|
||||
INSTRUCTION.mode = mode;
|
||||
if (instruction[3] & 0b10000000) INSTRUCTION.channel_table[amp_channel_table[cha] - 1] = TRUE;
|
||||
if (instruction[3] & 0b01000000) INSTRUCTION.channel_table[amp_channel_table[chb] - 1] = TRUE;
|
||||
if (instruction[3] & 0b00100000) INSTRUCTION.channel_table[amp_channel_table[chc] - 1] = TRUE;
|
||||
@@ -581,7 +762,7 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
INSTRUCTION.amp_gain = 5; // x1000
|
||||
INSTRUCTION.pulse_width = 0; // 40us
|
||||
INSTRUCTION.sti_times = 0; // repeat stimulation x1
|
||||
INSTRUCTION.mode = 1; // trigger mode
|
||||
INSTRUCTION.mode = 3; // trigger mode
|
||||
INSTRUCTION.sti_freq = 3; // 30hz
|
||||
INSTRUCTION.sti_waveform = 1; // positive
|
||||
INSTRUCTION.chopper = 0; // turn off chopper
|
||||
@@ -598,18 +779,16 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
break;
|
||||
}
|
||||
|
||||
case RIS_UMC_TRIG:
|
||||
case RIS_UMC_TRIG: {
|
||||
tx_put_u32(0, build_configure_instruction(UMC_TRIG, UMC_STIMULUS));
|
||||
flag_notify(EVT_UMC_STI);
|
||||
/*
|
||||
load
|
||||
*/
|
||||
break;
|
||||
|
||||
case RIS_RESET_AMP:
|
||||
}
|
||||
case RIS_RESET_AMP:{
|
||||
tx_put_u32(0, build_configure_instruction(UMC_TRIG, UMC_STIMULUS));
|
||||
headstage_spi_ask_transaction(4);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -625,9 +804,10 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
break;
|
||||
case VIS_STI:
|
||||
if (headstage_state == UMC_STATE_INTERRUPT) {
|
||||
headstage_state = UMC_STATE_CONFIGURE;
|
||||
headstage_state = UMC_STATE_INITIAL;
|
||||
rearrange_channel_mux_table();
|
||||
UMC_STATE.config_type = CONFIG_AMP_MUX;
|
||||
headstage_led_spi_color(COLOR_BLACK);
|
||||
tx_put_u32(0, build_configure_instruction(UMC_IRQ, UMC_IRQ_CODE));
|
||||
headstage_spi_ask_transaction(4);
|
||||
} else {
|
||||
@@ -645,11 +825,8 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
|
||||
// interrupt
|
||||
case VIS_INT:
|
||||
headstage_state = UMC_STATE_INTERRUPT;
|
||||
headstage_spi_transaction_cancel(headstage_spi_lsk_handle);
|
||||
memset(headstage_debug_buffer, 0, BLE_NOT_BUFF_SIZE);
|
||||
tx_put_u32(0, build_configure_instruction(UMC_IRQ, UMC_IRQ_CODE));
|
||||
headstage_spi_ask_transaction(4);
|
||||
headstage_reset();
|
||||
headstage_state = UMC_STATE_HANDSHAKE;
|
||||
break;
|
||||
|
||||
case VIS_BLE_T:
|
||||
@@ -667,6 +844,52 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn headstage_update_cis_instruction
|
||||
*/
|
||||
static void headstage_update_cis_instruction(uint8_t cis_oper) {
|
||||
switch (cis_oper) {
|
||||
case CIS_NOP: {
|
||||
// nothing
|
||||
cdr_buf[0] = _B_4b4b(CIS_NOP, CHIP_ID);
|
||||
cdr_buf[1] = _B_4b4b(CDR_SUCCESS, 0);
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, 2, cdr_buf);
|
||||
break;
|
||||
}
|
||||
#ifdef HEADSTAGE_CIS_VOLT_H
|
||||
case CIS_VOLT: {
|
||||
uint8_t status = headstage_update_vis_volt(ins_len, instruction + 2, cdr_buf + 2);
|
||||
|
||||
cdr_buf[0] = _B_4b4b(CIS_VOLT, CHIP_ID);
|
||||
cdr_buf[1] = status;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef HEADSTAGE_CIS_LED_H
|
||||
case CIS_LED: {
|
||||
uint8_t status = headstage_update_vis_led(ins_len, instruction + 2, cdr_buf + 2);
|
||||
|
||||
cdr_buf[0] = _B_4b4b(CIS_LED, CHIP_ID);
|
||||
cdr_buf[1] = status;
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default: {
|
||||
cdr_buf[0] = _B_4b4b(cis_oper, CHIP_ID);
|
||||
cdr_buf[1] = _B_4b4b(CDR_FAILURE, 0);
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_BUFF_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* todo: need to define some procedure to detect this device status
|
||||
*/
|
||||
@@ -689,12 +912,6 @@ static void headstage_uni_test_data_append_notify_buffer(uint8_t* dat_buf) {
|
||||
headstage_notify_send();
|
||||
}
|
||||
|
||||
// implement this function to detect
|
||||
static void headstage_uni_delay() {
|
||||
for (uint16_t i = 0; i < 1023; i++)
|
||||
;
|
||||
}
|
||||
|
||||
// todo: check data length extension with this function -> this function should be
|
||||
static void headstage_uni_umc_data_append_notify_buffer(uint8_t* dat_buf) {
|
||||
// check LSK data preamble ( 0b01100_0001 ) 58(01011000) 2c(00101100)
|
||||
@@ -702,32 +919,31 @@ static void headstage_uni_umc_data_append_notify_buffer(uint8_t* dat_buf) {
|
||||
// 0110_0000_1010_1xxx_xxxx_xxxX_XXXX_XXXX and
|
||||
// 1100_0001_0101_xxxx_xxxx_xxXX_XXXX_XXXX
|
||||
if (((spi_rxbuf[0] & 0xC1) != 0xC1) && (spi_rxbuf[0] != 0x00)) {
|
||||
headstage_uni_delay();
|
||||
headstage_led_spi_color(COLOR_CYAN);
|
||||
headstage_uni_delay();
|
||||
} else {
|
||||
if ((dat_buf[1] & 0x28) == 0x28) {
|
||||
dat_buf[0] = (dat_buf[0] << 1) | ((dat_buf[1] >> 7) & 0x01);
|
||||
dat_buf[1] = (dat_buf[1] << 1) | ((dat_buf[2] >> 7) & 0x01);
|
||||
dat_buf[2] = (dat_buf[2] << 1) | ((dat_buf[3] >> 7) & 0x01);
|
||||
if ((spi_rxbuf[1] & 0x28) == 0x28) {
|
||||
spi_rxbuf[0] = (spi_rxbuf[0] << 1) | ((spi_rxbuf[1] >> 7) & 0x01);
|
||||
spi_rxbuf[1] = (spi_rxbuf[1] << 1) | ((spi_rxbuf[2] >> 7) & 0x01);
|
||||
spi_rxbuf[2] = (spi_rxbuf[2] << 1) | ((spi_rxbuf[3] >> 7) & 0x01);
|
||||
}
|
||||
|
||||
uint8_t channel;
|
||||
|
||||
if ((INSTRUCTION.enable_channel_number == 1) || (dat_buf[0] == 0xc1)) {
|
||||
if ((INSTRUCTION.enable_channel_number == 1) || (spi_rxbuf[0] == 0xc1)) {
|
||||
channel = reverse_channel[INSTRUCTION.last_enable_channel];
|
||||
} else {
|
||||
uint8_t channel_pointer = (INSTRUCTION.channel_pointer + 1) % INSTRUCTION.last_enable_channel;
|
||||
INSTRUCTION.channel_pointer = channel_pointer;
|
||||
channel = reverse_channel[INSTRUCTION.channel_mux[channel_pointer]];
|
||||
}
|
||||
// uint16_t data_value = (uint16_t)(((dat_buf[1] & 0x0F) << 6) | ((dat_buf[2] & 0xFC) >> 2));
|
||||
uint8_t data_size = headstage_notify_append_data(channel, dat_buf);
|
||||
|
||||
uint8_t data_size = headstage_notify_append_data(channel, spi_rxbuf);
|
||||
if (data_size >= BLE_NOT_BUFF_SIZE) {
|
||||
headstage_notify_send();
|
||||
headstage_notify_flip_buffer();
|
||||
}
|
||||
}
|
||||
// uint16_t data_value = (uint16_t)(((dat_buf[1] & 0x0F) << 6) | ((dat_buf[2] & 0xFC) >> 2));
|
||||
headstage_spi_lsk_transaction(3);
|
||||
}
|
||||
|
||||
@@ -820,7 +1036,10 @@ static uint8_t build_umn_ins_config(uint8_t config_type, uint32_t* value) {
|
||||
==== UMC SPI interface ====
|
||||
=========================*/
|
||||
|
||||
// ASK interface
|
||||
/**
|
||||
* @fn headstage_umc_state_transfer_ask
|
||||
*
|
||||
*/
|
||||
|
||||
static void headstage_umc_state_transfer_ask() {
|
||||
// after receive handshake , transmit handreceive
|
||||
@@ -844,6 +1063,7 @@ static void headstage_umc_state_transfer_ask() {
|
||||
case UMC_STATE_TRIGGER:
|
||||
case UMC_STATE_CONTINUOUS:
|
||||
case UMC_STATE_LIMITED:
|
||||
case UMC_STATE_INTERRUPT:
|
||||
break;
|
||||
case UMC_STATE_WAIT_TRIGGER:
|
||||
headstage_state = UMC_STATE_TRIGGER;
|
||||
@@ -854,6 +1074,9 @@ static void headstage_umc_state_transfer_ask() {
|
||||
}
|
||||
}
|
||||
|
||||
/** headstage_umc_state_transfer_lsk
|
||||
*
|
||||
*/
|
||||
static void headstage_umc_state_transfer_lsk() {
|
||||
headstage_debug_buffer[0] = headstage_state;
|
||||
headstage_set_debug_information();
|
||||
@@ -939,28 +1162,39 @@ static void headstage_umc_state_transfer_lsk() {
|
||||
case UMC_STATE_WAIT_START:
|
||||
if (headstage_debug_buffer[1] > 18) {
|
||||
// this transaction make cause amplifier data right shift
|
||||
headstage_spi_lsk_transaction(3);
|
||||
switch (INSTRUCTION.mode) {
|
||||
default:
|
||||
headstage_state = UMC_STATE_CONTINUOUS;
|
||||
UMC_STATE.trigger_times = 0;
|
||||
break;
|
||||
case 3:
|
||||
case 0:
|
||||
// continuous mode
|
||||
headstage_state = UMC_STATE_CONTINUOUS;
|
||||
headstage_state = UMC_STATE_TRIGGER;
|
||||
UMC_STATE.trigger_times = 0;
|
||||
headstage_spi_lsk_transaction(3);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// trigger mode
|
||||
headstage_state = UMC_STATE_TRIGGER;
|
||||
UMC_STATE.trigger_times = 0;
|
||||
headstage_spi_lsk_transaction(3);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// limited mode
|
||||
headstage_state = UMC_STATE_LIMITED;
|
||||
UMC_STATE.trigger_times = INSTRUCTION.sti_times;
|
||||
headstage_spi_lsk_transaction(3);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// continuous mode
|
||||
headstage_state = UMC_STATE_CONTINUOUS;
|
||||
UMC_STATE.trigger_times = 0;
|
||||
headstage_spi_lsk_transaction(3);
|
||||
break;
|
||||
|
||||
default:
|
||||
headstage_state = UMC_STATE_CONTINUOUS;
|
||||
UMC_STATE.trigger_times = 0;
|
||||
headstage_spi_lsk_transaction(3);
|
||||
break;
|
||||
}
|
||||
} else if (headstage_debug_buffer[1] > 10) {
|
||||
@@ -993,7 +1227,8 @@ static void headstage_umc_state_transfer_lsk() {
|
||||
headstage_state = UMC_STATE_WAIT_START;
|
||||
}
|
||||
break;
|
||||
|
||||
case UMC_STATE_INTERRUPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
#ifndef HEADSTAGE_ADC_H
|
||||
#define HEADSTAGE_ADC_H
|
||||
#endif
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
#ifndef NEULIVE_2P0
|
||||
#define NEULIVE_2P0
|
||||
|
||||
/*============================
|
||||
==== product information ====
|
||||
===========================*/
|
||||
|
||||
#define DEVICE_NAME "Neulive-v2.0"
|
||||
#define MAJOR_PRODUCT_NUMBER 1
|
||||
#define MINOR_PRODUCT_NUMBER 1
|
||||
#define MAJOR_VERSION_NUMBER 2
|
||||
#define MINOR_VERSION_NUMBER 0
|
||||
|
||||
#endif
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
|
||||
#ifndef HEADSTAGE_NOTIFY_TDC4VC_H
|
||||
#define HEADSTAGE_NOTIFY_TDC4VC_H
|
||||
|
||||
#ifndef HEADSTAGE_NOTIFY_H
|
||||
#error "headstage/headstage_notify.h not included"
|
||||
#endif
|
||||
|
||||
#define NOT_BUF_OFFSET_INIT 8
|
||||
|
||||
static uint32_t not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
static uint32_t not_time_stamp = 0;
|
||||
|
||||
static void headstage_notify_set_timestamp() {
|
||||
not_time_stamp = headstage_time_stamp_us();
|
||||
|
||||
headstage_notify_buffer[2] = not_time_stamp & 0xFF;
|
||||
headstage_notify_buffer[3] = (not_time_stamp >> 8) & 0xFF;
|
||||
headstage_notify_buffer[4] = (not_time_stamp >> 16) & 0xFF;
|
||||
headstage_notify_buffer[5] = (not_time_stamp >> 24) & 0xFF;
|
||||
}
|
||||
|
||||
static void headstage_notify_flip_buffer() {
|
||||
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 2;
|
||||
|
||||
headstage_notify_buffer[0] = CHIP_ID;
|
||||
headstage_notify_buffer[1] = data_count;
|
||||
|
||||
not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
}
|
||||
|
||||
static uint8_t headstage_notify_append_data(uint8_t *data_value) {
|
||||
if (not_buf_offset <= NOT_BUF_OFFSET_INIT) {
|
||||
headstage_notify_set_timestamp();
|
||||
not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
}
|
||||
|
||||
if (data_value == NULL) {
|
||||
headstage_notify_buffer[not_buf_offset++] = 0x00;
|
||||
headstage_notify_buffer[not_buf_offset++] = 0x03;
|
||||
} else {
|
||||
headstage_notify_buffer[not_buf_offset++] = data_value[0];
|
||||
headstage_notify_buffer[not_buf_offset++] = data_value[1];
|
||||
}
|
||||
|
||||
if (not_buf_offset == BLE_NOT_BUFF_SIZE) {
|
||||
uint32_t current = headstage_time_stamp_us();
|
||||
uint32_t time_delta = ((current - not_time_stamp)) & 0xFFFF;
|
||||
|
||||
headstage_notify_buffer[6] = time_delta & 0xFF;
|
||||
headstage_notify_buffer[7] = (time_delta >> 8) & 0xFF;
|
||||
}
|
||||
|
||||
uint8_t ret = not_buf_offset;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // HEADSTAGE_NOTIFY_TDC4VAF2_H
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
#ifndef HEADSTAGE_PIN_NEU_H
|
||||
#define HEADSTAGE_PIN_NEU_H
|
||||
|
||||
#if defined(CC2650_LAUNCHXL)
|
||||
|
||||
// clang-format off
|
||||
#define PIN_RESET IOID_0 // SPI1 to receive LSK
|
||||
#define PIN_EN_ADC_SPI_CLK IOID_1 // SPI1 clock
|
||||
#define PIN_DC_DC IOID_2 // STI select need
|
||||
#define PIN_BATT_HALF IOID_3 //
|
||||
#define PIN_AMP_VCK IOID_4 //
|
||||
#define PIN_LED_SDI IOID_7 //
|
||||
#define PIN_LED_CLK IOID_8 //
|
||||
#define PIN_STI_CLK IOID_9 //
|
||||
#define PIN_SPI_MISO IOID_10 //
|
||||
#define PIN_SPI_MOSI IOID_11 //
|
||||
#define PIN_SPI_CS IOID_12 //
|
||||
#define PIN_SPI_CLK IOID_13 //
|
||||
#define PIN_SYS_CLK IOID_14 //
|
||||
// clang-format on
|
||||
|
||||
#elif defined(BOOSTXL_CC2650MA)
|
||||
|
||||
// clang-format off
|
||||
|
||||
#define PIN_RESET IOID_0 // SPI1 to receive LSK
|
||||
#define PIN_EN_ADC_SPI_CLK IOID_1 // SPI1 clock
|
||||
#define PIN_DC_DC IOID_2 // STI select need
|
||||
#define PIN_BATT_HALF IOID_3 //
|
||||
#define PIN_AMP_VCK IOID_4 //
|
||||
#define PIN_LED_SDI IOID_7 //
|
||||
#define PIN_LED_CLK IOID_8 //
|
||||
#define PIN_STI_CLK IOID_9 //
|
||||
#define PIN_SPI_MISO IOID_10 //
|
||||
#define PIN_SPI_MOSI IOID_11 //
|
||||
#define PIN_SPI_CS IOID_12 //
|
||||
#define PIN_SPI_CLK IOID_13 //
|
||||
#define PIN_SYS_CLK IOID_14 //
|
||||
|
||||
// clang-format on
|
||||
#endif
|
||||
/*
|
||||
* SPI0 interface with DBS chip 2.0
|
||||
*/
|
||||
#define Board_SPI0_MISO PIN_SPI_MISO
|
||||
#define Board_SPI0_MOSI PIN_SPI_MOSI
|
||||
#define Board_SPI0_CLK PIN_SPI_CLK
|
||||
#define Board_SPI0_CSN PIN_SPI_CS
|
||||
|
||||
/*
|
||||
* SPI1 interface work with LED
|
||||
*/
|
||||
|
||||
#define Board_SPI1_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI1_MOSI PIN_LED_SDI
|
||||
#define Board_SPI1_CLK PIN_LED_CLK
|
||||
#define Board_SPI1_CSN PIN_UNASSIGNED
|
||||
|
||||
/* Power Management Board */
|
||||
#define Board_SRDY Board_BP_Pin_J2_19
|
||||
#define Board_MRDY Board_BP_Pin_J1_2
|
||||
|
||||
/* PWM outputs */
|
||||
#define Board_PWMPIN0 PIN_AMP_VCK
|
||||
#define Board_PWMPIN1 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN2 PIN_SYS_CLK
|
||||
#define Board_PWMPIN3 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN4 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN5 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN6 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN7 PIN_UNASSIGNED
|
||||
|
||||
static PIN_Config headstage_pin_configuration[] = { //
|
||||
PIN_RESET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_EN_ADC_SPI_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_DC_DC | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_BATT_HALF | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_STI_CLK | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
//
|
||||
PIN_TERMINATE};
|
||||
|
||||
#endif // HEADSTAGE_PIN_UNI_H
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
#ifndef HEADSTAGE_PWM_H
|
||||
#define HEADSTAGE_PWM_H
|
||||
|
||||
#include <Board.h>
|
||||
#include <ti/drivers/PWM.h>
|
||||
|
||||
static PWM_Handle headstage_system_pwm_handle = NULL;
|
||||
static PWM_Handle headstage_poly_r_pwm_handle = NULL; // poly-R adjustment clock
|
||||
|
||||
#define headstage_pwm_open() \
|
||||
do { \
|
||||
PWM_init(); \
|
||||
PWM_Params headstage_system_pwm_params; \
|
||||
PWM_Params_init(&headstage_system_pwm_params); \
|
||||
headstage_system_pwm_params.idleLevel = PWM_IDLE_LOW; \
|
||||
headstage_system_pwm_params.periodUnits = PWM_PERIOD_HZ; \
|
||||
headstage_system_pwm_params.periodValue = NEU_SYS_CLK; \
|
||||
headstage_system_pwm_params.dutyUnits = PWM_DUTY_FRACTION; \
|
||||
headstage_system_pwm_params.dutyValue = PWM_DUTY_FRACTION_MAX / 2; \
|
||||
headstage_system_pwm_handle = PWM_open(Board_PWM2, &headstage_system_pwm_params); \
|
||||
PWM_Params headstage_poly_r_pwm_params; \
|
||||
PWM_Params_init(&headstage_poly_r_pwm_params); \
|
||||
headstage_poly_r_pwm_params.idleLevel = PWM_IDLE_LOW; \
|
||||
headstage_poly_r_pwm_params.periodUnits = PWM_PERIOD_HZ; \
|
||||
headstage_poly_r_pwm_params.periodValue = NEU_POLY_R_CLK; \
|
||||
headstage_poly_r_pwm_params.dutyUnits = PWM_DUTY_FRACTION; \
|
||||
headstage_poly_r_pwm_params.dutyValue = PWM_DUTY_FRACTION_MAX / 2; \
|
||||
headstage_poly_r_pwm_handle = PWM_open(Board_PWM0, &headstage_poly_r_pwm_params); \
|
||||
} while (0)
|
||||
|
||||
#define headstage_pwm_start(handle) PWM_start(handle)
|
||||
#define headstage_pwm_stop(handle) PWM_stop(handle)
|
||||
#define headstage_pwm_close(handle) PWM_close(handle)
|
||||
|
||||
#endif // HEADSTAGE_PWM_H
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/* Copyright (c) 2019. BioPro. Scientific.
|
||||
*/
|
||||
#ifndef HEADSTAGE_SPI_H
|
||||
#define HEADSTAGE_SPI_H
|
||||
|
||||
#if defined(BOOSTXL_CC2650MA) && !defined(HEADSTAGE_MA_USE_SPI2)
|
||||
#error "put HEADSTAGE_MA_USE_SPI2 in predefined"
|
||||
#endif
|
||||
|
||||
#include <Board.h>
|
||||
#include <ti/drivers/SPI.h>
|
||||
#include <ti/drivers/dma/UDMACC26XX.h>
|
||||
#include <ti/drivers/spi/SPICC26XXDMA.h>
|
||||
|
||||
#define SPI_BUFFER_SIZE 20
|
||||
|
||||
static uint8_t spi_txbuf[SPI_BUFFER_SIZE] = {0};
|
||||
static uint8_t spi_rxbuf[SPI_BUFFER_SIZE] = {0};
|
||||
|
||||
static SPI_Handle headstage_spi_handle = NULL;
|
||||
|
||||
static SPI_Transaction headstage_spi_transaction;
|
||||
|
||||
static void headstage_spi_callback(SPI_Handle handle, SPI_Transaction* transaction);
|
||||
|
||||
// SPI parameters initialize
|
||||
#define headstage_spi_open() \
|
||||
do { \
|
||||
SPI_init(); \
|
||||
SPI_Params spi_parameter; \
|
||||
SPI_Params_init(&spi_parameter); \
|
||||
spi_parameter.transferMode = SPI_MODE_CALLBACK; \
|
||||
spi_parameter.mode = SPI_SLAVE; \
|
||||
spi_parameter.bitRate = NEU_SPI_FREQ; \
|
||||
spi_parameter.dataSize = 8; \
|
||||
spi_parameter.frameFormat = SPI_POL0_PHA1; \
|
||||
spi_parameter.transferCallbackFxn = headstage_spi_callback; \
|
||||
headstage_spi_handle = SPI_open(Board_SPI0, &spi_parameter); \
|
||||
} while (0)
|
||||
|
||||
#define headstage_spi_transaction(handle, length, tx, rx) \
|
||||
({ \
|
||||
SPI_Transaction transaction = headstage_spi_transaction ; \
|
||||
transaction.count = (length); \
|
||||
transaction.txBuf = (tx); \
|
||||
transaction.rxBuf = (rx); \
|
||||
SPI_transfer(handle, &transaction); \
|
||||
})
|
||||
|
||||
#define headstage_spi_transaction(length) \
|
||||
({ \
|
||||
headstage_spi_transaction.count = (length); \
|
||||
headstage_spi_transaction.txBuf = (spi_txbuf); \
|
||||
headstage_spi_transaction.rxBuf = (spi_rxbuf); \
|
||||
SPI_transfer(headstage_spi_handle, &headstage_spi_transaction); \
|
||||
})
|
||||
|
||||
#define headstage_spi_close(spi_handle) \
|
||||
do { \
|
||||
if (spi_handle != NULL) { \
|
||||
SPI_close(spi_handle); \
|
||||
spi_handle = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define headstage_spi_transaction_cancel(spi_handle) \
|
||||
do { \
|
||||
if (spi_handle != NULL) { \
|
||||
SPI_transferCancel(spi_handle); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
+305
@@ -0,0 +1,305 @@
|
||||
{
|
||||
"name": "Neulive",
|
||||
"version": "2.0",
|
||||
"match_rule": {
|
||||
"local_name_pattern": "Neulive.*",
|
||||
"major_product_number": 1,
|
||||
"minor_product_number": 1,
|
||||
"major_version_number": 2,
|
||||
"minor_version_number": 0
|
||||
},
|
||||
"constant": {
|
||||
"REC_CHANNEL_COUNT": 16,
|
||||
"STI_VOLT_CHANNEL_COUNT": 16,
|
||||
"STI_AMP_CHANNEL_COUNT": 8
|
||||
},
|
||||
"parameters": {
|
||||
"CHANNEL": {
|
||||
"description": "record channels",
|
||||
"record_meta": true,
|
||||
"domain": {
|
||||
"set": [
|
||||
"REC_CHANNEL_COUNT"
|
||||
]
|
||||
}
|
||||
},
|
||||
"STI_VOLT_PCHANNEL": {
|
||||
"description": "stimulation voltage mode channels",
|
||||
"record_meta": true,
|
||||
"domain": {
|
||||
"set": [
|
||||
"STI_VOLT_CHANNEL_COUNT"
|
||||
]
|
||||
},
|
||||
"guard": "STI_VOLT_PCHANNEL != STI_VOLT_NCHANNEL"
|
||||
},
|
||||
"STI_VOLT_NCHANNEL": {
|
||||
"description": "stimulation voltage mode channels",
|
||||
"record_meta": true,
|
||||
"domain": {
|
||||
"set": [
|
||||
"STI_VOLT_CHANNEL_COUNT"
|
||||
]
|
||||
},
|
||||
"guard": "STI_VOLT_PCHANNEL != STI_VOLT_NCHANNEL"
|
||||
},
|
||||
"STI_AMP_PCHANNEL": {
|
||||
"description": "stimulation ampere mode p channel",
|
||||
"record_meta": true,
|
||||
"domain": {
|
||||
"set": [
|
||||
"STI_AMP_CHANNEL_COUNT"
|
||||
]
|
||||
},
|
||||
"guard": "STI_AMP_PCHANNEL != STI_AMP_NCHANNEL"
|
||||
},
|
||||
"STI_AMP_NCHANNEL": {
|
||||
"description": "stimulation ampere mode n channel",
|
||||
"record_meta": true,
|
||||
"domain": {
|
||||
"set": [
|
||||
"STI_AMP_CHANNEL_COUNT"
|
||||
]
|
||||
},
|
||||
"guard": "STI_AMP_PCHANNEL != STI_AMP_NCHANNEL"
|
||||
},
|
||||
"STI_TIME_DURATION_ONE": {
|
||||
"description": "stimulation pattern",
|
||||
"record_meta": false,
|
||||
"domain": [
|
||||
1024
|
||||
],
|
||||
"guard": "STI_TIME_DURATION_ONE < 1"
|
||||
},
|
||||
"STI_TIME_DURATION_TWO": {
|
||||
"description": "stimulation pattern",
|
||||
"record_meta": false,
|
||||
"domain": [
|
||||
1024
|
||||
]
|
||||
},
|
||||
"STI_TIME_DURATION_THREE": {
|
||||
"description": "stimulation pattern",
|
||||
"record_meta": false,
|
||||
"domain": [
|
||||
1024
|
||||
]
|
||||
},
|
||||
"STI_TIME_DURATION_FOUR": {
|
||||
"description": "stimulation pattern",
|
||||
"record_meta": false,
|
||||
"domain": [
|
||||
65536
|
||||
]
|
||||
},
|
||||
"STI_TIME_DURATION_FIVE": {
|
||||
"description": "stimulation pattern",
|
||||
"record_meta": false,
|
||||
"domain": [
|
||||
2048
|
||||
]
|
||||
},
|
||||
"AMP_GAIN": {
|
||||
"description": "amplifier gain setting",
|
||||
"record_meta": true,
|
||||
"value": [
|
||||
25,
|
||||
100,
|
||||
400,
|
||||
800
|
||||
]
|
||||
},
|
||||
"STI_MODE": {
|
||||
"description": "how to execute stimulus",
|
||||
"value": [
|
||||
"DISABLE",
|
||||
"LIMITED",
|
||||
"CONTINUOUS"
|
||||
]
|
||||
},
|
||||
"STI_AMPERE_HIGH_SIDE": {
|
||||
"description": "stimulation ampere for pmos, unit: uA ",
|
||||
"type": "int",
|
||||
"domain": [
|
||||
1024
|
||||
],
|
||||
"value": "VALUE * 4"
|
||||
},
|
||||
"STI_AMPERE_LOW_SIDE": {
|
||||
"description": "stimulation ampere for nmos, unit: uA",
|
||||
"type": "int",
|
||||
"domain": [
|
||||
1024
|
||||
],
|
||||
"value": "VALUE * 4"
|
||||
},
|
||||
"STI_VOLTAGE_AMPLITUDE": {
|
||||
"description": "stimulation voltage mode, unit: Volt ",
|
||||
"type": "float",
|
||||
"domain": [
|
||||
32
|
||||
],
|
||||
"value": " 2 + VALUE / 31"
|
||||
},
|
||||
"STI_TIMES": {
|
||||
"description": "how many times will be executed",
|
||||
"domain": [
|
||||
256
|
||||
]
|
||||
},
|
||||
"SYSTEM_CLOCK_RATIO": {
|
||||
"description": "frequency of system clock, unit: khz",
|
||||
"type": "float",
|
||||
"domain": [
|
||||
65536
|
||||
],
|
||||
"value": " 8000 / VALUE",
|
||||
"guard": "SYSTEM_CLOCK_RATIO < 2"
|
||||
},
|
||||
"ADC_CLOCK_RATIO": {
|
||||
"description": "adc sampling rate, unit: khz",
|
||||
"type": "float",
|
||||
"domain": [
|
||||
65536
|
||||
],
|
||||
"value": " SYSTEM_CLOCK_RATIO / VALUE ",
|
||||
"guard": "ADC_CLOCK_RATIO < 28"
|
||||
},
|
||||
"STI_CLOCK_RATIO": {
|
||||
"description": "stimulation rate",
|
||||
"type": "float",
|
||||
"domain": [
|
||||
65536
|
||||
],
|
||||
"value": "SYSTEM_CLOCK_RATIO / VALUE",
|
||||
"guard": "STI_CLOCK_RATIO < 2"
|
||||
},
|
||||
"ARBITRARY_EN": {
|
||||
"description": "arbitrary stimulation enable",
|
||||
"domain": "bool"
|
||||
},
|
||||
"ARBITRARY_CH": {
|
||||
"description": "arbitrary stimulation enable channels",
|
||||
"domain": "int",
|
||||
"value": " ( 1 << STI_AMP_PCHANNEL ) if (ARBITRARY_EN) else 0 "
|
||||
},
|
||||
"ARBITRARY_INDEX": {
|
||||
"description": "define the last point of arbitrary data, from zero to arbitrary_index. ",
|
||||
"domain": "INT",
|
||||
"guard": "VALUE > 499"
|
||||
},
|
||||
"H_BRIDGE": {
|
||||
"description": "whether to contruct a h bridge execute a stimulation",
|
||||
"domain": "bool"
|
||||
},
|
||||
"STI_REF": {
|
||||
"description": "bipolar or monopolar",
|
||||
"domain": "bool"
|
||||
},
|
||||
"FAST_SETTLE": {
|
||||
"description": "protect amplifier input when stimulation is executed",
|
||||
"domain": "bool"
|
||||
},
|
||||
"UMC_TEST": {
|
||||
"description": "start umc test mode",
|
||||
"domain": "action",
|
||||
"on_change": "umc_default"
|
||||
},
|
||||
"UMC_RESET": {
|
||||
"description": "reset headstage to perform another setting",
|
||||
"domain": "action",
|
||||
"on_change": "reset"
|
||||
},
|
||||
"UMC_TRIGGER": {
|
||||
"description": "trigger stimulation when device is in trigger mode",
|
||||
"domain": "action",
|
||||
"on_change": "STIMULUS"
|
||||
}
|
||||
},
|
||||
"instruction": {
|
||||
"start": [
|
||||
{
|
||||
"expression": "len(CHANNEL) > 0",
|
||||
"raise": "no recording channel"
|
||||
},
|
||||
"data_format",
|
||||
"_notify(True)",
|
||||
"start_recording",
|
||||
"umc_parameter",
|
||||
"_sync(True)",
|
||||
"VIS_STI"
|
||||
],
|
||||
"trigger stimulation": [
|
||||
"umc_sti_trigger0"
|
||||
],
|
||||
"umc_reset": [
|
||||
"VIS_RST"
|
||||
],
|
||||
"data_format": [
|
||||
"_data_format('TDC4VAF2')"
|
||||
],
|
||||
"start_recording": {
|
||||
"type": "RIS",
|
||||
"data": [
|
||||
"3b101#direct header;2b0#don't care;3b>LOW_FREQ_BAND",
|
||||
"2b0#don't care;1bCHOPPER;1bFAST_SETTLE;3b>STI_WAVEFORM",
|
||||
"5b>STI_AMPERE;4b>STI_PMOS",
|
||||
"4b>STI_NMOS;4b>SAMPLE_RATE"
|
||||
]
|
||||
},
|
||||
"umc_parameter": {
|
||||
"type": "RIS",
|
||||
"foreach-parameter": {
|
||||
"parameter": "CHANNEL",
|
||||
"variable": [
|
||||
"a",
|
||||
"b",
|
||||
"c",
|
||||
"d"
|
||||
]
|
||||
},
|
||||
"data": [
|
||||
"3b001#umc parameter header;3b>AMP_GAIN",
|
||||
"4b>PULSE_WIDTH;6b>STI_TIMES",
|
||||
"2b>STI_MODE;6b>STI_FREQ",
|
||||
"1ba?;1bb?;1bc?;1bd?",
|
||||
"4b>a?:0;4b>b?:0",
|
||||
"4b>c?:0;4b>d?:0"
|
||||
]
|
||||
},
|
||||
"umc_default": [
|
||||
"_set('CHANNEL', 0)",
|
||||
"_set('SAMPLE_RATE', 0)",
|
||||
"_set('AMP_GAIN', 5)",
|
||||
"_set('STI_WAVEFORM', 1)",
|
||||
"_set('STI_MODE', 1)",
|
||||
"_set('STI_NMOS', 0)",
|
||||
"_set('STI_PMOS', 1)",
|
||||
"_set('STI_AMPERE', 0)",
|
||||
"_set('STI_FREQ', 0)",
|
||||
"_set('STI_TIMES', 0)",
|
||||
"_set('PULSE_WIDTH', 0)",
|
||||
"_set('FAST_SETTLE', 1)",
|
||||
"_set('CHOPPER', 0)",
|
||||
"data_format",
|
||||
"_notify(True)",
|
||||
"umc_default0",
|
||||
"_sync(True)",
|
||||
"VIS_STI"
|
||||
],
|
||||
"umc_default0": {
|
||||
"type": "RIS",
|
||||
"data": [
|
||||
"1B0#load umc default parameter into uni"
|
||||
]
|
||||
},
|
||||
"umc_sti_trigger0": {
|
||||
"type": "RIS",
|
||||
"description": "this function is perform only in trigger mode",
|
||||
"data": [
|
||||
"1BC0# trigger stimulation when recording is performed"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
@startuml
|
||||
start
|
||||
:stimulation select;
|
||||
if (continuous) then (yes)
|
||||
if(current mode / voltage mode) then (current mode)
|
||||
:sti parameter setup;
|
||||
else (voltage mode)
|
||||
:sti parameter setup;
|
||||
endif
|
||||
else if (limited)
|
||||
if(current mode / voltage mode) then (current mode)
|
||||
:sti parameter setup;
|
||||
else (voltage mode)
|
||||
:sti parameter setup;
|
||||
endif
|
||||
else (disable)
|
||||
endif
|
||||
stop
|
||||
@enduml
|
||||
+32
@@ -42,6 +42,38 @@
|
||||
|
||||
// clang-format on
|
||||
|
||||
/*
|
||||
* SPI0 interface with DBS chip 2.0
|
||||
*/
|
||||
#define Board_SPI0_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI0_MOSI PIN_LSK_MOSI
|
||||
#define Board_SPI0_CLK PIN_LSK_CLK
|
||||
#define Board_SPI0_CSN PIN_LSK_CS
|
||||
|
||||
/*
|
||||
* SPI1 interface work with LED
|
||||
*/
|
||||
|
||||
#define Board_SPI1_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI1_MOSI PIN_ASK_MOSI
|
||||
#define Board_SPI1_CLK PIN_UNASSIGNED
|
||||
#define Board_SPI1_CSN PIN_ASK_CS
|
||||
|
||||
/* Power Management Board */
|
||||
#define Board_SRDY Board_BP_Pin_J2_19
|
||||
#define Board_MRDY Board_BP_Pin_J1_2
|
||||
|
||||
/* PWM outputs */
|
||||
#define Board_PWMPIN0 PIN_AMP_VCK
|
||||
#define Board_PWMPIN1 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN2 PIN_CLOCK_8M
|
||||
#define Board_PWMPIN3 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN4 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN5 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN6 PIN_UNASSIGNED
|
||||
#define Board_PWMPIN7 PIN_UNASSIGNED
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
static PIN_Config headstage_pin_configuration[] = { //
|
||||
|
||||
+4
-5
@@ -221,7 +221,6 @@ static void SimpleBLEPeripheral_sendAttRsp(void);
|
||||
static void SimpleBLEPeripheral_freeAttRsp(uint8_t status);
|
||||
static void SimpleBLEPeripheral_stateChangeCB(gaprole_States_t newState);
|
||||
static void SimpleBLEPeripheral_enqueueMsg(uint8_t event, uint8_t state);
|
||||
static void headstage_data_length_extension();
|
||||
|
||||
#ifndef FEATURE_OAD_ONCHIP
|
||||
static void SimpleBLEPeripheral_charValueChangeCB(uint8_t paramID);
|
||||
@@ -560,9 +559,6 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
ICall_EntityID dest;
|
||||
ICall_ServiceEnum src;
|
||||
ICall_HciExtEvt * message = NULL;
|
||||
if (EVENT_MASK > 0) {
|
||||
headstage_event_handle();
|
||||
}
|
||||
|
||||
if (ICall_fetchServiceMsg(&src, &dest, (void **)&message) == ICALL_ERRNO_SUCCESS) {
|
||||
uint8 safeToDealloc = TRUE;
|
||||
@@ -599,6 +595,9 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (EVENT_MASK > 0) {
|
||||
headstage_event_handle();
|
||||
}
|
||||
|
||||
#ifdef FEATURE_OAD
|
||||
while (!Queue_empty(oad_queue_handle)) {
|
||||
@@ -854,7 +853,7 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
|
||||
// Device just timed out from a connection but is not yet advertising, is in waiting period before advertising again
|
||||
// disconnected
|
||||
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
|
||||
headstage_led_spi_color(COLOR_RED);
|
||||
headstage_led_spi_color(COLOR_RED); /** for neulive1.3 call this function ; for neulive2.0 call headstage_led_color */
|
||||
CONNECT_HANDLE = 0xFFFF;
|
||||
flag_notify(EVT_DISCONNECTED);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user