Compare commits
530 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f979d0f1e | |||
| b6f8ddd041 | |||
| 1e834cfb45 | |||
| e93ac78ccd | |||
| 8a375019f1 | |||
| 3cda19e2d2 | |||
| 95169d0885 | |||
| 96c3b0725b | |||
| b29eef912d | |||
| 7790621b3c | |||
| adf96c3055 | |||
| a99ced845c | |||
| be6681a0fd | |||
| fbcb1f8ddd | |||
| 61cb5a9eed | |||
| 64d32a6386 | |||
| 50e47e75a1 | |||
| 21b7e081e7 | |||
| e53403d11b | |||
| 6ef19dfbdc | |||
| 1c601e57a4 | |||
| 346ff4db00 | |||
| 6900a6f3be | |||
| 08c3c19219 | |||
| 828d5301e7 | |||
| 4ffbcba8cf | |||
| 0290a178ee | |||
| 4723ec9d5b | |||
| 4b908677a9 | |||
| 24b7699520 | |||
| 6a2bba3119 | |||
| 4a2af94b31 | |||
| 77719e3713 | |||
| 94776b0171 | |||
| 5c4c08fc97 | |||
| 1d58fe359b | |||
| a50849882e | |||
| 89a474f509 | |||
| 4cc1d01c6a | |||
| 703d6bcb69 | |||
| a0cf6389aa | |||
| 7cf77afab3 | |||
| ec36764750 | |||
| e1186901e9 | |||
| 82d1b90542 | |||
| 1c2b3ac07c | |||
| 5d545d6acf | |||
| abacf8b977 | |||
| e7fb10be20 | |||
| 9eac85a5d3 | |||
| c2a4d4ddac | |||
| c64b19bbb4 | |||
| f8569c15bc | |||
| 1b0d50eeaf | |||
| e681c0a2b0 | |||
| 6dcb7173d5 | |||
| ee8165d4b9 | |||
| 0539ffbd23 | |||
| 4bc2364e07 | |||
| fbff4b2985 | |||
| 6031a35461 | |||
| b55b521d06 | |||
| 8303c80326 | |||
| 1a196b20da | |||
| aa2e813fb1 | |||
| 92ef9e44d6 | |||
| d840e63ac1 | |||
| 345bbf7f21 | |||
| e728e0b520 | |||
| be70e455d7 | |||
| 7a92fe8f86 | |||
| bbcda86272 | |||
| 148b3a4bd3 | |||
| dc0267427f | |||
| fa71a8535d | |||
| 15d7e94082 | |||
| d571d1ea98 | |||
| ca2cef61a4 | |||
| 5957b60680 | |||
| 37e9931c5a | |||
| 837e9f4029 | |||
| 020746027d | |||
| f170f9ab0d | |||
| 44bab26192 | |||
| 042b15f787 | |||
| 4d95438e20 | |||
| 94fd12b436 | |||
| d9d12321b7 | |||
| 73ab6505ca | |||
| 7f1cd7437c | |||
| 0e40bc0deb | |||
| 51a46e0f4d | |||
| 9ffe4e2965 | |||
| d4551a83e6 | |||
| fbd4699246 | |||
| bfc8242ee6 | |||
| 68598cc9d0 | |||
| c87ff74add | |||
| fcb9ca34a1 | |||
| 43e19870b2 | |||
| 365b272e91 | |||
| 56ad82e481 | |||
| 110940e898 | |||
| f58557d785 | |||
| 5a0d3e5026 | |||
| 357e30d8af | |||
| c3b633a207 | |||
| daef46eecc | |||
| 140add3754 | |||
| 540a6a3d2a | |||
| a7e337cf96 | |||
| a6cf807b08 | |||
| b87b5c4f2f | |||
| cb1497d434 | |||
| 01d104c81c | |||
| d716f396b4 | |||
| c683e0261c | |||
| 4d1ed89e40 | |||
| 7769de7174 | |||
| 99a2fb27df | |||
| 45f96605d9 | |||
| fb7b75b02d | |||
| 101c03b19e | |||
| 17fa54c979 | |||
| 35f610001f | |||
| 1f57e7d2de | |||
| 3fad139bc5 | |||
| ba3888f523 | |||
| 9751ef2529 | |||
| b69b46a78c | |||
| 88979fe511 | |||
| 7d2fc57b77 | |||
| 71c30babea | |||
| c4996a3e2d | |||
| 7a71bbb995 | |||
| 45b00acc8b | |||
| 0728f77d31 | |||
| 3c2bec7d02 | |||
| bf1669c0f0 | |||
| b1e17a1115 | |||
| 3814e51585 | |||
| f7f5c3abc6 | |||
| 9cac8694c0 | |||
| e63af33723 | |||
| fcbda78a46 | |||
| e7cdc676cf | |||
| c2bd1e9780 | |||
| 2fab159ba8 | |||
| 1e41629f49 | |||
| 18c32c7e64 | |||
| e8aac9bd81 | |||
| 263ba0581b | |||
| db943ee144 | |||
| afb3da7942 | |||
| 34fe7564ba | |||
| eef87b3881 | |||
| d606b2c7e9 | |||
| 495aa8bbc5 | |||
| f12185f853 | |||
| a2d3ac3138 | |||
| e4d34f886a | |||
| ca946c1cd1 | |||
| 26737e0a11 | |||
| fc86bc9dd3 | |||
| c115de0bf0 | |||
| da9e8493b7 | |||
| 02a94ff271 | |||
| 7a06c05343 | |||
| 16eafe918a | |||
| 397cc1c50c | |||
| d8ac537fba | |||
| dbe5257f3a | |||
| 7437c17f84 | |||
| 520e710aae | |||
| 49888e73bb | |||
| 78db3a0122 | |||
| cad6f00f2d | |||
| 0139bfa17d | |||
| fa87ba98c5 | |||
| f296b7a2c4 | |||
| c41e366758 | |||
| c241a1ea16 | |||
| 0bc9f8f4e3 | |||
| 55a35e662c | |||
| d386613e55 | |||
| e8b365c966 | |||
| e8a6546e54 | |||
| 10bf24e490 | |||
| ad4d0fcf0a | |||
| f4a339d55e | |||
| 74c0d60b2f | |||
| 5e56c37511 | |||
| 5a5d934a46 | |||
| ddc606a9bd | |||
| 70ee55c5a0 | |||
| 8179ce47d1 | |||
| a6e240cd52 | |||
| dc87af411a | |||
| c1363da184 | |||
| 58970cb3c3 | |||
| fc83f4f227 | |||
| f16bbccd69 | |||
| b0430fc05e | |||
| 754d07a06c | |||
| 05fa80faa2 | |||
| 3fa823b193 | |||
| 3b661d6dc2 | |||
| 9c7b9e44a1 | |||
| b30c3108b7 | |||
| 1bc1a4e982 | |||
| d36f5c3b38 | |||
| 8427271eb0 | |||
| 01a2c6e8cd | |||
| 409ca3dd06 | |||
| 80f3b65c83 | |||
| f6269fd244 | |||
| 9f02fee658 | |||
| 92a76e834f | |||
| 28b8b8ce9d | |||
| b0ef493774 | |||
| 01c11fabec | |||
| 6a57a8b107 | |||
| 64c24bf496 | |||
| ceab949ff1 | |||
| 7be310f4e7 | |||
| d64dff8e04 | |||
| ec55140718 | |||
| 69b32f6a1c | |||
| 38cd245907 | |||
| c1ced5f9ff | |||
| cc437b89e9 | |||
| 794c74c629 | |||
| 83db25142d | |||
| c4484d3cc1 | |||
| f9a5d8b093 | |||
| 5b3c3f40e6 | |||
| 8f2e2d5465 | |||
| 8e182ceb29 | |||
| fc10503cdd | |||
| a2296d1822 | |||
| 66b57372cb | |||
| 1e5299034f | |||
| 82afe90a60 | |||
| a0ca72082e | |||
| 22e52e46ff | |||
| 20820648ad | |||
| f41790fff2 | |||
| fe4977c08d | |||
| e12dd54f2a | |||
| 7d4de8c0bc | |||
| 2bd5a3849f | |||
| 0e7b9462c1 | |||
| b14d4da555 | |||
| b61647e504 | |||
| 728ce5b19d | |||
| d11b9cdbe2 | |||
| 149e092181 | |||
| f5de72ad41 | |||
| 6fa2d4310b | |||
| eb76f57688 | |||
| 096bb72eb1 | |||
| 10407d1529 | |||
| ae67ac3355 | |||
| 5eba8169c6 | |||
| e299a6e01d | |||
| 3ea4c0a147 | |||
| 8b1cee29b1 | |||
| c8cac98df6 | |||
| e0f811c706 | |||
| 7254bd8c07 | |||
| c8b527c99a | |||
| 629088602a | |||
| bdc1e1bf9e | |||
| e88368e4f5 | |||
| df40ab38bc | |||
| a115eb69d0 | |||
| 57f84f4ebd | |||
| 2cf42f3f66 | |||
| 6d585f6a74 | |||
| 7525795ac8 | |||
| ba66c00010 | |||
| 7a9f66a1ae | |||
| 488d955fcd | |||
| 4064fc3396 | |||
| b731bd2faf | |||
| 1d5e6feafe | |||
| 12e00174d2 | |||
| a381517458 | |||
| 54611577ba | |||
| 450572ad8f | |||
| 877adc39df | |||
| 9feb2ea1e6 | |||
| afc7ae2cb5 | |||
| 4d7ce9fba4 | |||
| 6254b23b3a | |||
| 9ac6c643b3 | |||
| e7d7e6993d | |||
| b2393e88fa | |||
| 57738442d7 | |||
| 2126e2ffa6 | |||
| 0ed4a20505 | |||
| a3c00d0a6e | |||
| 1f00996142 | |||
| 56093efb5a | |||
| e0c7786752 | |||
| 8ba667bbb8 | |||
| 7661d230f1 | |||
| 577eaaef56 | |||
| b64719acea | |||
| 7e6050e721 | |||
| ca3c31d7f5 | |||
| c89e493e67 | |||
| a856cdc7d2 | |||
| 76cdf969a5 | |||
| 48c85a4389 | |||
| 992bc26ff1 | |||
| b5aa10a8b5 | |||
| b5eec41f36 | |||
| 2fb8faefbd | |||
| bcd144d265 | |||
| be1e961c2e | |||
| 6832bdfff6 | |||
| 98aeea5f76 | |||
| 85ff9dc965 | |||
| c650618e48 | |||
| 882d87e522 | |||
| 80a7847e67 | |||
| 86f2a3b7f1 | |||
| a735a613d6 | |||
| 666725a5f0 | |||
| 89fb479591 | |||
| 5c7dc68e12 | |||
| 8a5afab22f | |||
| 589357b800 | |||
| 3ea2f423cc | |||
| 150187c1f5 | |||
| ac1f2524f4 | |||
| 72a000f0ff | |||
| 89b8f3fbdf | |||
| 2518fac529 | |||
| 447913d970 | |||
| a3c65a76a1 | |||
| 3e3ed17693 | |||
| 60a79e4d63 | |||
| bf99c38328 | |||
| 5a336e92de | |||
| f495369097 | |||
| 8bd9149406 | |||
| c143fca1dd | |||
| 4be39160cb | |||
| 2d32cdca79 | |||
| fe23291b22 | |||
| f9640eca33 | |||
| a1b77848ef | |||
| 5f45be8ae6 | |||
| 4007c2f55d | |||
| afe3d87d80 | |||
| d59346a05e | |||
| 627ba46781 | |||
| 6586df1ccf | |||
| de4f3a6d93 | |||
| e7512a6896 | |||
| 030eb4234b | |||
| 8b551f91a4 | |||
| f5f8673d93 | |||
| 4344429fbf | |||
| f5aa6f44c1 | |||
| eb61856009 | |||
| 3282e85635 | |||
| fc50f62678 | |||
| 8c0d3f6873 | |||
| b1028cb2da | |||
| 3074e7e3be | |||
| 0416b66ace | |||
| 03ccd3de8a | |||
| 6a048e4caf | |||
| 0eb27aebc8 | |||
| acc2ca6f41 | |||
| bf03fcce62 | |||
| aca289cb6c | |||
| ca2296fd1b | |||
| f5e43575e0 | |||
| 666da6629e | |||
| 63b21353d5 | |||
| 70818392bc | |||
| 4620798382 | |||
| 809ba648ff | |||
| 0901616b39 | |||
| 5c07352e4c | |||
| 7f3e15cb46 | |||
| 64926f8aa9 | |||
| fcf3e4bc17 | |||
| 00809b9022 | |||
| 0192c63ad3 | |||
| 60db87b8ec | |||
| 9b7571ddbf | |||
| 8861b0480e | |||
| d54827dfdd | |||
| 0999a45f5e | |||
| 887b046409 | |||
| 4337d81951 | |||
| 7fdb0f6e5f | |||
| 263053a500 | |||
| a8360e94a2 | |||
| 5f01c568fd | |||
| 6214b33965 | |||
| 2bf1f9dc62 | |||
| fc26383fa1 | |||
| a3e1d5f983 | |||
| d69ea4978a | |||
| fca331fefa | |||
| 5b43b36596 | |||
| 2e9d534ffe | |||
| 0eb128ff48 | |||
| aae2fb0591 | |||
| b63c01f25b | |||
| d82bfa77ff | |||
| 33ca96b15a | |||
| 1c2659c0fc | |||
| 3d43bbf501 | |||
| 42bef16cbe | |||
| 1a172d5bde | |||
| caea8ceb06 | |||
| ff4a3fdb5e | |||
| e9d27886ed | |||
| 759f7dbc72 | |||
| 646abd4d4a | |||
| 2a0fade480 | |||
| 23e85a173d | |||
| d6cc1124c8 | |||
| c4c303a948 | |||
| cd06b0fc5e | |||
| d7344acdac | |||
| 418b89848e | |||
| 0641b6c79c | |||
| ff5cb3ddc7 | |||
| 305de3891d | |||
| 37ebae07c0 | |||
| 10ba95e53c | |||
| 7cf0c3070e | |||
| 3d1089bdaf | |||
| d6582b9da8 | |||
| b6aaad5ffd | |||
| 950f411b7f | |||
| 7f4eafc61f | |||
| 82540de425 | |||
| 3ce500735a | |||
| 2b0ebbd911 | |||
| 4461df12fb | |||
| 8171d940a8 | |||
| 667ef30a86 | |||
| 40e621ca26 | |||
| 5227af8c97 | |||
| 3ce57243aa | |||
| 21c0bb59c3 | |||
| 457030989a | |||
| f8653b3749 | |||
| 33b2aaf46e | |||
| 7af2a69e8f | |||
| f3195f2111 | |||
| 568d2f7938 | |||
| a1cc97df35 | |||
| b47c43466b | |||
| 48e92df901 | |||
| f581156c9a | |||
| d1ced61993 | |||
| a055479140 | |||
| a2c48bd8dc | |||
| 6d274cddee | |||
| 6c640de827 | |||
| caaf15a835 | |||
| 5fa4f3564f | |||
| e3dc39f1aa | |||
| c12bf4dccd | |||
| 040e7fc0d1 | |||
| 54e97545dc | |||
| 68ff23df61 | |||
| 2fd95dac35 | |||
| ea23cf7f6e | |||
| 0ff285882e | |||
| dfc135392f | |||
| b1ddee7c0b | |||
| e68552b740 | |||
| 812e35c6c1 | |||
| 2d4cf408f9 | |||
| 750d4ad449 | |||
| 34b0b6af46 | |||
| f55d1d161d | |||
| 2d8a5bd4fb | |||
| 1152ea3960 | |||
| 1fae6abb15 | |||
| bb643cc79f | |||
| cad336db0e | |||
| 1d15c7d7cd | |||
| fb3f2860ea | |||
| 6568045f46 | |||
| 6892bcf21e | |||
| 47aa461598 | |||
| f25fb340a9 | |||
| 7a37647d72 | |||
| b2509ac5d9 | |||
| 6e351e9dce | |||
| ad1e401476 | |||
| a3894ca51d | |||
| 81127d81fe | |||
| 277bd7dcfb | |||
| 321bc497aa | |||
| 88abb662d1 | |||
| 6fa0a142fe | |||
| b192fbb0e1 | |||
| 6438180082 | |||
| 3ae7000718 | |||
| 178c982acb | |||
| 3507b6d1d0 | |||
| 5045681045 | |||
| b4dd7f0f30 | |||
| 272a66ee0c | |||
| 4c61710ae7 | |||
| c9872a6ce9 | |||
| db9d36046a | |||
| f3dc2d9923 | |||
| 5e58a2ba02 | |||
| c8c6c82c0b | |||
| a31c33540e | |||
| 45dc14e181 | |||
| b086410846 | |||
| 67e280004b | |||
| 3b5c24311d | |||
| b75d54ce46 | |||
| 0a90afecdb |
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/common/cc26xx/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc/
|
||||
@@ -1 +0,0 @@
|
||||
../tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/heapmgr/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/examples/host_test/cc26xx/app/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/icall/inc/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/inc/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/npi/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/profiles/roles/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/rom/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/
|
||||
@@ -1 +0,0 @@
|
||||
../simplelink/ble_sdk_2_02_02_25/src/target/
|
||||
+57
-56
@@ -18,13 +18,13 @@
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="org.eclipse.rtsc.xdctools.parsers.ErrorParser;com.ti.rtsc.XDCtools.parsers.ErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137" name="FlashROM" parent="com.ti.ccstudio.buildDefinitions.TMS470.Default" postbuildStep="${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out" prebuildStep="">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Default.67178137." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.308833195" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.2125878104">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2138235341" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain.1908313898" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.386599542">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.836926385" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC2650F128"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
|
||||
<listOptionValue builtIn="false" value="XDC_VERSION=3.32.0.06_core"/>
|
||||
<listOptionValue builtIn="false" value="XDC_VERSION=3.32.2.25_core"/>
|
||||
<listOptionValue builtIn="false" value="INACTIVE_REPOS="/>
|
||||
<listOptionValue builtIn="false" value="EXPANDED_REPOS="/>
|
||||
<listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.rtsc.TIRTOSCC13XX_CC26XX:2.21.01.08;"/>
|
||||
@@ -34,17 +34,17 @@
|
||||
<listOptionValue builtIn="false" value="LINK_ORDER=TOOLS/ccs_linker_defines.cmd;TOOLS/cc26xx_app.cmd;"/>
|
||||
<listOptionValue builtIn="false" value="RTSC_MBS_VERSION=2.2.0"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.243195404" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="18.1.4.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.955793533" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.638576662" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug.1016177761" name="ARM Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.2070806136" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.7M3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.1411365061" name="Designate code state, 16-bit (thumb) or 32-bit (--code_state)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.16" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.193495829" name="Application binary interface. (--abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.1573436637" name="Little endian code [See 'General' page to edit] (--little_endian, -me)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.978889992" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.4" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.1392883332" name="Speed vs. size trade-offs (--opt_for_speed, -mf)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.511635494" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.122716742" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="18.1.4.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug.1735152675" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug.1517137938" name="GNU Make.FlashROM" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug.1013466299" name="ARM Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.396590895" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.SILICON_VERSION.7M3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.262043189" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CODE_STATE.16" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.254163999" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.ABI.eabi" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN.381645511" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.1216668029" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_LEVEL.4" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.1214157007" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.OPT_FOR_SPEED.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH.468937421" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
<listOptionValue builtIn="false" value="C:\ti\simplelink\ble_sdk_2_02_02_25\src\examples\simple_peripheral\cc26xx\app\headstage"/>
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/examples/simple_peripheral/cc26xx/app"/>
|
||||
@@ -70,10 +70,11 @@
|
||||
<listOptionValue builtIn="false" value="${SRC_BLE_CORE}/rom"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.521147483" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE.1137328477" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="BOARD_DISPLAY_EXCLUDE_UART"/>
|
||||
<listOptionValue builtIn="false" value="POWER_SAVING"/>
|
||||
<listOptionValue builtIn="false" value="BOOSTXL_CC2650MA"/>
|
||||
<listOptionValue builtIn="false" value="HEADSTAGE_MA_USE_SPI2"/>
|
||||
<listOptionValue builtIn="false" value="CC26XX"/>
|
||||
<listOptionValue builtIn="false" value="GAPROLE_TASK_STACK_SIZE=540"/>
|
||||
<listOptionValue builtIn="false" value="HEAPMGR_SIZE=0"/>
|
||||
@@ -85,71 +86,71 @@
|
||||
<listOptionValue builtIn="false" value="xdc_runtime_Assert_DISABLE_ALL"/>
|
||||
<listOptionValue builtIn="false" value="xdc_runtime_Log_DISABLE_ALL"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.1861999587" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.1867564782" name="C Dialect" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.2052831394" name="Enable support for GCC extensions (DEPRECATED) (--gcc)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1102242787" name="Suppress diagnostic <id> (--diag_suppress, -pds)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.1789637681" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.2082096800" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.C_DIALECT.C99" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC.1554315956" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GCC" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS.1848633962" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="48"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.727880917" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING.480730772" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WARNING" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.996618365" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.858761211" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.96303422" name="Place each function in a separate subsection (--gen_func_subsections, -ms)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.1634706392" name="Read options from specified file (--cmd_file, -@)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.178571272" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER.338764900" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.1956079968" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE.2028584467" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compilerID.CMD_FILE" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${SRC_EX}/config/build_components.opt"/>
|
||||
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/build_config.opt"/>
|
||||
<listOptionValue builtIn="false" value="${ORG_PROJ_DIR}/../../ccs/config/ccs_compiler_defines.bcfg"/>
|
||||
</option>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.1149005836" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.404213358" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.1356338499" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.1609020645" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS.2035192044" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS.1517879760" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS.1697794062" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS.201373433" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.2125878104" name="ARM Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.1993482378" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE" value="256" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.833137428" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE" value="0" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1072440081" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.95815077" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.1766117832" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug.386599542" name="ARM Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE.1224573433" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.STACK_SIZE" value="256" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE.948723823" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.HEAP_SIZE" value="0" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE.1985734106" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.MAP_FILE" value=""${ProjName}.map"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE.1743500897" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY.541343209" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
<listOptionValue builtIn="false" value="${CC26XXWARE}/driverlib/bin/ccs/driverlib.lib"/>
|
||||
<listOptionValue builtIn="false" value="${ROM}/common_rom_releases/03282014/common_rom.symbols"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1149343368" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH.1291624254" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.512740056" name="Suppress diagnostic <id> (--diag_suppress)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS.1592780619" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_SUPPRESS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="10247-D"/>
|
||||
<listOptionValue builtIn="false" value="16002-D"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.755787473" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.1039632635" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.160090718" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.1907564273" name="Aggressively reduce size of the DWARF information (--compress_dwarf)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.1278577864" name="Eliminate sections not needed in the executable (--unused_section_elimination)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.on" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.1166775149" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS.1192919935" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS.1491242603" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.1218213371" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER.776879740" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO.131905523" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.XML_LINK_INFO" value=""${ProjName}_linkInfo.xml"" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.1323842668" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.COMPRESS_DWARF.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.1293587957" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.linkerID.UNUSED_SECTION_ELIMINATION.on" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS.1830409084" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS.269002188" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS.2047351004" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.1967400950" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.1242139870" name="Specify rom width (--romwidth, -romwidth=width)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.1863065780" name="Specify memory width (--memwidth, -memwidth=width)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.47746446" name="Output format" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.1441212378" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH.870893049" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.ROMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH.1008247221" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.MEMWIDTH" value="8" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.1456819213" superClass="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT" value="com.ti.ccstudio.buildDefinitions.TMS470_18.1.hex.OUTPUT_FORMAT.INTEL" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1864525425" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.46430604" name="Package repositories (--xdcpath)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
|
||||
<tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.1587885823" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH.1887629154" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.XDC_PATH" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_RTSC_TIRTOSCC13XX_CC26XX_REPOS}"/>
|
||||
<listOptionValue builtIn="false" value="${TARGET_CONTENT_BASE}"/>
|
||||
</option>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.313008504" name="Target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.807892561" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.1808973543" name="Platform (-p)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.1028195441" name="Build-profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.295955151" name="Compiler tools directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.128448790" name="Additional compiler options (--compileOptions)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value=""${COMPILER_FLAGS}"" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.380082739" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.arm.elf.M3" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM.1123991861" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW.781131062" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.PLATFORM_RAW" value="ti.platforms.simplelink:CC2640F128" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.2139588547" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="release" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1692895039" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
|
||||
<option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS.1555119371" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.COMPILE_OPTIONS" value=""${COMPILER_FLAGS}"" valueType="string"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../config/src
|
||||
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
|
||||
BIN
Binary file not shown.
+5
-5
@@ -1,12 +1,12 @@
|
||||
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_02_25_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
|
||||
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c C:/ti/xdctools_3_32_02_25_core/packages/
|
||||
vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
|
||||
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_02_25_core/packages/
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/
|
||||
|
||||
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
|
||||
@@ -22,8 +22,8 @@ CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_02_25_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_02_25_core/packages/../bin/cp -f
|
||||
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
|
||||
|
||||
define RM
|
||||
$(if $(wildcard $1),$(DEL) $1,:)
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -16,7 +16,7 @@
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650lp\host_test\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../config/src
|
||||
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650lp/host_test/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+4
-4
@@ -16,11 +16,11 @@ BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/pa
|
||||
|
||||
TARGET_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/host_test/cc26xx/app/cc2650" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/host_test/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/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/npi/src" --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" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
|
||||
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.4.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/host_test/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/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/npi/src" --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" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
|
||||
|
||||
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.4.LTS/bin/armar rq
|
||||
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.4.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.4.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1
-1
@@ -16,7 +16,7 @@
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650lp\simple_peripheral\ccs\config\src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../config/src
|
||||
GEN_SRC_DIR ?= ../../../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650lp/simple_peripheral/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
|
||||
@@ -80,6 +80,7 @@ const PIN_Config BoardGpioInitTable[] = {
|
||||
Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX */
|
||||
Board_SRDY | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* SRDY */
|
||||
Board_MRDY | PIN_INPUT_EN | PIN_PULLDOWN, /* MRDY */
|
||||
|
||||
PIN_TERMINATE
|
||||
};
|
||||
|
||||
@@ -189,57 +190,6 @@ const UDMACC26XX_Config UDMACC26XX_config[] = {
|
||||
* ============================= UDMA end =====================================
|
||||
*/
|
||||
|
||||
/*
|
||||
* ========================== SPI DMA begin ===================================
|
||||
*/
|
||||
/* Place into subsections to allow the TI linker to remove items properly */
|
||||
#if defined(__TI_COMPILER_VERSION__)
|
||||
#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
|
||||
#pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
|
||||
#endif
|
||||
|
||||
/* Include drivers */
|
||||
#include <ti/drivers/spi/SPICC26XXDMA.h>
|
||||
|
||||
/* SPI objects */
|
||||
SPICC26XXDMA_Object spiCC26XXDMAObjects[BOOSTXL_CC2650MA_SPICOUNT];
|
||||
|
||||
/* SPI configuration structure, describing which pins are to be used */
|
||||
const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[BOOSTXL_CC2650MA_UDMACOUNT] = {
|
||||
{
|
||||
.baseAddr = SSI0_BASE,
|
||||
.intNum = INT_SSI0_COMB,
|
||||
.intPriority = ~0,
|
||||
.swiPriority = 0,
|
||||
.powerMngrId = PowerCC26XX_PERIPH_SSI0,
|
||||
.defaultTxBufValue = 0,
|
||||
.rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
|
||||
.txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
|
||||
.mosiPin = Board_SPI0_MOSI,
|
||||
.misoPin = Board_SPI0_MISO,
|
||||
.clkPin = Board_SPI0_CLK,
|
||||
.csnPin = Board_SPI0_CS
|
||||
},
|
||||
};
|
||||
|
||||
/* SPI configuration structure */
|
||||
const SPI_Config SPI_config[] = {
|
||||
{
|
||||
.fxnTablePtr = &SPICC26XXDMA_fxnTable,
|
||||
.object = &spiCC26XXDMAObjects[0],
|
||||
.hwAttrs = &spiCC26XXDMAHWAttrs[0]
|
||||
},
|
||||
{
|
||||
.fxnTablePtr = &SPICC26XXDMA_fxnTable,
|
||||
.object = &spiCC26XXDMAObjects[1],
|
||||
.hwAttrs = &spiCC26XXDMAHWAttrs[1]
|
||||
},
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
/*
|
||||
* ========================== SPI DMA end =====================================
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* ========================== Crypto begin ====================================
|
||||
|
||||
@@ -89,24 +89,24 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
*/
|
||||
|
||||
/* Connector J1 */
|
||||
#define Board_BP_Pin_J1_2 DIO7
|
||||
#define Board_BP_Pin_J1_2 IOID_UNUSED
|
||||
#define Board_BP_Pin_J1_3 DIO0
|
||||
#define Board_BP_Pin_J1_4 DIO1
|
||||
#define Board_BP_Pin_J1_5 DIO2
|
||||
#define Board_BP_Pin_J1_6 DIO3
|
||||
#define Board_BP_Pin_J1_7 DIO10
|
||||
#define Board_BP_Pin_J1_7 DIO11 /* SCLK */
|
||||
#define Board_BP_Pin_J1_8 DIO4
|
||||
#define Board_BP_Pin_J1_9 DIO5
|
||||
#define Board_BP_Pin_J1_10 DIO6
|
||||
|
||||
/* Connector J2 */
|
||||
#define Board_BP_Pin_J2_19 DIO8
|
||||
#define Board_BP_Pin_J2_18 DIO9 /* CS */
|
||||
#define Board_BP_Pin_J2_19 IOID_UNUSED
|
||||
#define Board_BP_Pin_J2_18 IOID_UNUSED
|
||||
#define Board_BP_Pin_J2_17 IOID_UNUSED /* NC */
|
||||
#define Board_BP_Pin_J2_15 DIO11 /* MOSI */
|
||||
#define Board_BP_Pin_J2_14 DIO12 /* MISO */
|
||||
#define Board_BP_Pin_J2_13 DIO13
|
||||
#define Board_BP_Pin_J2_12 DIO14
|
||||
#define Board_BP_Pin_J2_15 DIO8 /* MOSI */
|
||||
#define Board_BP_Pin_J2_14 DIO7 /* MISO */
|
||||
#define Board_BP_Pin_J2_13 DIO9 /* DAC_CS */
|
||||
#define Board_BP_Pin_J2_12 DIO12 /* ADC_CS */
|
||||
#define Board_BP_Pin_J2_11 IOID_UNUSED /* NC */
|
||||
|
||||
/* Mapping of BoosterPack Connector Pins to BoosterPack Standard Functions (reflecting the BoosterPack Standard)
|
||||
@@ -125,12 +125,12 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
|
||||
/* Connector J2 */
|
||||
#define Board_BP_PWM_0 Board_BP_Pin_J2_19
|
||||
#define Board_BP_SPI_CS_Wireless Board_BP_Pin_J2_18
|
||||
#define Board_BP_SPI_CS_Wireless PIN_UNASSIGNED
|
||||
#define Board_BP_GPIO_3 Board_BP_Pin_J2_17
|
||||
#define Board_BP_SPI_MOSI Board_BP_Pin_J2_15
|
||||
#define Board_BP_SPI_MISO Board_BP_Pin_J2_14
|
||||
#define Board_BP_SPI_CS_Display Board_BP_Pin_J2_13
|
||||
#define Board_BP_SPI_CS_Other Board_BP_Pin_J2_12
|
||||
#define Board_BP_SPI_CS_Display PIN_UNASSIGNED
|
||||
#define Board_BP_SPI_CS_Other PIN_UNASSIGNED
|
||||
#define Board_BP_GPIO_2 Board_BP_Pin_J2_11
|
||||
|
||||
|
||||
@@ -145,11 +145,11 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
#define Board_UART_TX Board_BP_UART_Rx /* RXD */
|
||||
#define Board_UART_RX Board_BP_UART_Tx /* TXD */
|
||||
|
||||
/* SPI Board */
|
||||
#define Board_SPI0_MISO Board_BP_SPI_MISO
|
||||
#define Board_SPI0_MOSI Board_BP_SPI_MOSI
|
||||
#define Board_SPI0_CLK Board_BP_SPI_CLK
|
||||
#define Board_SPI0_CS Board_BP_SPI_CS_Wireless
|
||||
|
||||
|
||||
//#define Board_SPI0_MISO PIN_UNASSIGNED
|
||||
//#define Board_SPI0_MOSI PIN_UNASSIGNED
|
||||
|
||||
|
||||
/* Power Management Board */
|
||||
#define Board_SRDY Board_BP_Pin_J2_19
|
||||
@@ -170,6 +170,7 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
* ==========================================================================*/
|
||||
/* Generic SPI instance identifiers */
|
||||
#define Board_SPI0 BOOSTXL_CC2650MA_SPI0
|
||||
#define Board_SPI1 BOOSTXL_CC2650MA_SPI1
|
||||
/* Generic UART instance identifiers */
|
||||
#define Board_UART BOOSTXL_CC2650MA_UART0
|
||||
/* Generic TRNG instance identiifer */
|
||||
@@ -208,15 +209,7 @@ typedef enum BOOSTXL_CC2650MA_CryptoName {
|
||||
} BOOSTXL_CC2650MA_CryptoName;
|
||||
|
||||
|
||||
/*!
|
||||
* @def BOOSTXL_CC2650MA_SPIName
|
||||
* @brief Enum of SPI names on the CC2650 Booster Pack
|
||||
*/
|
||||
typedef enum BOOSTXL_CC2650MA_SPIName {
|
||||
BOOSTXL_CC2650MA_SPI0 = 0,
|
||||
|
||||
BOOSTXL_CC2650MA_SPICOUNT
|
||||
} BOOSTXL_CC2650MA_SPIName;
|
||||
|
||||
/*!
|
||||
* @def BOOSTXL_CC2650MA_TRNGName
|
||||
|
||||
@@ -39,6 +39,7 @@ extern "C" {
|
||||
|
||||
#include <ti/drivers/Power.h>
|
||||
|
||||
//#include "BOOSTXL_CC2650MA.h"
|
||||
#include "BOOSTXL_CC2650MA.h"
|
||||
|
||||
/* These #defines allow us to reuse TI-RTOS across other device families */
|
||||
|
||||
@@ -79,23 +79,22 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
|
||||
/* UART Board */
|
||||
#define Board_UART_RX IOID_2 /* RXD */
|
||||
#define Board_UART_TX IOID_3 /* TXD */
|
||||
#define Board_UART_TX PIN_UNASSIGNED /* TXD */
|
||||
#define Board_UART_CTS IOID_19 /* CTS */
|
||||
#define Board_UART_RTS IOID_18 /* RTS */
|
||||
|
||||
/* SPI Board */
|
||||
#define Board_SPI0_MISO IOID_8 /* RF1.20 */
|
||||
#define Board_SPI0_MOSI IOID_9 /* RF1.18 */
|
||||
#define Board_SPI0_CLK IOID_10 /* RF1.16 */
|
||||
#define Board_SPI0_MISO IOID_0 /* RF1.20 */
|
||||
#define Board_SPI0_MOSI IOID_1 /* RF1.18 */
|
||||
#define Board_SPI0_CLK IOID_3 /* 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_MOSI IOID_8 /* LED_MOSI */
|
||||
#define Board_SPI1_CLK IOID_9 /* LED_CLK */
|
||||
|
||||
|
||||
#define Board_SPI1_CSN PIN_UNASSIGNED
|
||||
|
||||
/* I2C */
|
||||
#define Board_I2C0_SCL0 IOID_4
|
||||
#define Board_I2C0_SDA0 IOID_5
|
||||
|
||||
/* SPI */
|
||||
#define Board_SPI_FLASH_CS IOID_20
|
||||
@@ -103,8 +102,8 @@ extern const PIN_Config BoardGpioInitTable[];
|
||||
#define Board_FLASH_CS_OFF 1
|
||||
|
||||
/* Booster pack generic */
|
||||
#define Board_DIO0 IOID_0
|
||||
#define Board_DIO1_RFSW IOID_1
|
||||
#define Board_DIO0 PIN_UNASSIGNED
|
||||
#define Board_DIO1_RFSW PIN_UNASSIGNED
|
||||
#define Board_DIO12 IOID_12
|
||||
#define Board_DIO15 IOID_15
|
||||
#define Board_DIO16_TDO IOID_16
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -55,7 +55,7 @@ extern "C"
|
||||
// includes
|
||||
// ****************************************************************************
|
||||
#include "hal_types.h"
|
||||
#include "npi/src/inc/npi_config.h"
|
||||
#include "inc/npi_config.h"
|
||||
|
||||
// ****************************************************************************
|
||||
// defines
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -9,7 +9,7 @@
|
||||
Target Device: CC2650, CC2640
|
||||
|
||||
******************************************************************************
|
||||
|
||||
|
||||
Copyright (c) 2013-2018, Texas Instruments Incorporated
|
||||
All rights reserved.
|
||||
|
||||
@@ -45,121 +45,87 @@
|
||||
Release Date: 2018-04-02 18:03:35
|
||||
*****************************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
* INCLUDES
|
||||
*/
|
||||
|
||||
#include <ti/sysbios/knl/Task.h>
|
||||
|
||||
#include <ti/sysbios/hal/Hwi.h>
|
||||
|
||||
#include <ti/sysbios/knl/Clock.h>
|
||||
|
||||
#include <ti/sysbios/knl/Semaphore.h>
|
||||
|
||||
#include <ti/sysbios/knl/Queue.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "hal_types.h"
|
||||
|
||||
#include "hci_tl.h"
|
||||
|
||||
#include "hci_ext.h"
|
||||
|
||||
#include "gatt.h"
|
||||
|
||||
#include "hci.h"
|
||||
|
||||
#include "gapgattserver.h"
|
||||
|
||||
#include "gattservapp.h"
|
||||
|
||||
#include "gapbondmgr.h"
|
||||
|
||||
#define OSAL_SNV 0
|
||||
|
||||
#include "osal_snv.h"
|
||||
|
||||
#include "icall_apimsg.h"
|
||||
|
||||
#include "util.h"
|
||||
#include <ti/mw/display/Display.h>
|
||||
|
||||
#include "inc/npi_ble.h"
|
||||
|
||||
#include "inc/npi_task.h"
|
||||
|
||||
#include <inc/hw_types.h>
|
||||
|
||||
#include "hal_defs.h"
|
||||
|
||||
#if defined ( USE_RCOSC )
|
||||
#include "rcosc_calibration.h"
|
||||
#endif // USE_RCOSC
|
||||
|
||||
#if defined ( GATT_TEST ) || defined ( GATT_QUAL )
|
||||
#include "gatttest.h"
|
||||
#if defined(GATT_TEST) || defined(GATT_QUAL)
|
||||
#include "gatttest.h"
|
||||
#endif
|
||||
|
||||
#include "host_test_app.h"
|
||||
|
||||
#if defined( USE_FPGA ) || defined( DEBUG_SW_TRACE )
|
||||
#include <driverlib/ioc.h>
|
||||
#endif // USE_FPGA | DEBUG_SW_TRACE
|
||||
//#define PERIODIC_USE_GPTIMER
|
||||
|
||||
/*********************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
#include "cc2650/cc2650_util.h"
|
||||
|
||||
//#include "cc2650/cc2650_slave.h"
|
||||
|
||||
#include "cc2650/cc2650_master.h"
|
||||
|
||||
// LE Event Lengths
|
||||
#define HCI_CMD_COMPLETE_EVENT_LEN 3
|
||||
#define HCI_CMD_VS_COMPLETE_EVENT_LEN 2
|
||||
#define HCI_CMD_STATUS_EVENT_LEN 4
|
||||
#define HCI_PHY_UPDATE_COMPLETE_EVENT_LEN 6
|
||||
#define HCI_CMD_COMPLETE_EVENT_LEN 3
|
||||
#define HCI_CMD_VS_COMPLETE_EVENT_LEN 2
|
||||
#define HCI_CMD_STATUS_EVENT_LEN 4
|
||||
#define HCI_PHY_UPDATE_COMPLETE_EVENT_LEN 6
|
||||
|
||||
static void HTA_init(void);
|
||||
static void HTA_main(UArg a0, UArg a1);
|
||||
static void HTA_handle_gap_event(ICall_HciExtEvt *message);
|
||||
static void HTA_handle_att_event(gattMsgEvent_t *message);
|
||||
static void HTA_handle_ble_event(ICall_HciExtEvt *message);
|
||||
static void send_command_complete_event(uint8 eventCode, uint16 opcode, uint8 numParam, uint8 *param);
|
||||
static void send_command_status_event(uint8_t eventCode, uint16_t status, uint16_t opcode);
|
||||
static void send_ble_complete_event(uint8 eventLen, uint8 *pEvent);
|
||||
|
||||
extern void AssertHandler(uint8 assertCause, uint8 assertSubCause);
|
||||
|
||||
// Task configuration
|
||||
#define HTA_TASK_PRIORITY 1
|
||||
#define HTA_TASK_STACK_SIZE 644
|
||||
#define HTA_TASK_STACK_SIZE 512
|
||||
Task_Struct hta_task;
|
||||
Char hta_task_stack[HTA_TASK_STACK_SIZE];
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
|
||||
// Display Interface
|
||||
Display_Handle dispHandle = NULL;
|
||||
|
||||
/*********************************************************************
|
||||
* LOCAL VARIABLES
|
||||
*/
|
||||
// Entity ID globally used to check for source and/or destination of messages
|
||||
static ICall_EntityID selfEntity;
|
||||
|
||||
// Semaphore globally used to post events to the application thread
|
||||
static ICall_Semaphore sem;
|
||||
|
||||
// Task configuration
|
||||
Task_Struct htaTask;
|
||||
Char htaTaskStack[HTA_TASK_STACK_SIZE];
|
||||
|
||||
#if !defined ( GATT_DB_OFF_CHIP )
|
||||
static uint8 deviceName[GAP_DEVICE_NAME_LEN] = { 0 };
|
||||
static uint16 appearance = 17;
|
||||
#endif
|
||||
|
||||
// Stack build revision
|
||||
ICall_BuildRevision buildRev;
|
||||
|
||||
/*********************************************************************
|
||||
* LOCAL FUNCTIONS
|
||||
*/
|
||||
|
||||
static void HostTestApp_init(void);
|
||||
static void HostTestApp_taskFxn(UArg a0, UArg a1);
|
||||
|
||||
static void HostTestApp_processGapEvent(ICall_HciExtEvt *pMsg);
|
||||
static void HostTestApp_processBLEEvent(ICall_HciExtEvt *pMsg);
|
||||
|
||||
static void sendCommandCompleteEvent(uint8 eventCode, uint16 opcode,
|
||||
uint8 numParam, uint8 *param);
|
||||
static void sendCommandStatusEvent(uint8_t eventCode, uint16_t status,
|
||||
uint16_t opcode);
|
||||
static void sendBLECompleteEvent(uint8 eventLen, uint8 *pEvent);
|
||||
|
||||
/*********************************************************************
|
||||
* EXTERN FUNCTIONS
|
||||
*/
|
||||
extern void AssertHandler(uint8 assertCause, uint8 assertSubcause);
|
||||
|
||||
/*********************************************************************
|
||||
* PUBLIC FUNCTIONS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
/*
|
||||
* @fn HostTestApp_createTask
|
||||
*
|
||||
* @brief Task creation function for the Host Test App.
|
||||
@@ -168,21 +134,30 @@ extern void AssertHandler(uint8 assertCause, uint8 assertSubcause);
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
void HostTestApp_createTask(void)
|
||||
{
|
||||
Task_Params taskParams;
|
||||
void HostTestApp_createTask(void) {
|
||||
/* main task */
|
||||
Task_Params task_main_parameter;
|
||||
Task_Params_init(&task_main_parameter);
|
||||
task_main_parameter.stack = hta_task_stack;
|
||||
task_main_parameter.stackSize = HTA_TASK_STACK_SIZE;
|
||||
task_main_parameter.priority = 1;
|
||||
|
||||
// Configure task
|
||||
Task_Params_init(&taskParams);
|
||||
taskParams.stack = htaTaskStack;
|
||||
taskParams.stackSize = HTA_TASK_STACK_SIZE;
|
||||
taskParams.priority = HTA_TASK_PRIORITY;
|
||||
|
||||
Task_construct(&htaTask, HostTestApp_taskFxn, &taskParams, NULL);
|
||||
Task_construct(&hta_task, HTA_main, &task_main_parameter, NULL);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn HostTestApp_init
|
||||
// Entity ID globally used to check for source and/or destination of messages
|
||||
static ICall_EntityID self;
|
||||
|
||||
// Semaphore globally used to post events to the application thread
|
||||
extern ICall_Semaphore semaphore;
|
||||
|
||||
extern uint16_t event_flags;
|
||||
|
||||
// Stack build revision
|
||||
ICall_BuildRevision build_reversion;
|
||||
|
||||
/*
|
||||
* @fn HTA_init
|
||||
*
|
||||
* @brief Called during initialization and contains application
|
||||
* specific initialization (ie. hardware initialization/setup,
|
||||
@@ -193,118 +168,30 @@ void HostTestApp_createTask(void)
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
static void HostTestApp_init(void)
|
||||
{
|
||||
// Register the current thread as an ICall dispatcher application
|
||||
// so that the application can send and receive messages.
|
||||
ICall_registerApp(&selfEntity, &sem);
|
||||
static void HTA_init(void) {
|
||||
// Register the current thread as an ICall dispatcher application
|
||||
// so that the application can send and receive messages.
|
||||
ICall_registerApp(&self, &semaphore);
|
||||
|
||||
#if defined( USE_FPGA )
|
||||
// configure RF Core SMI Data Link
|
||||
IOCPortConfigureSet(IOID_12, IOC_PORT_RFC_GPO0, IOC_STD_OUTPUT);
|
||||
IOCPortConfigureSet(IOID_11, IOC_PORT_RFC_GPI0, IOC_STD_INPUT);
|
||||
// Initialize GATT Client
|
||||
VOID GATT_InitClient();
|
||||
|
||||
// configure RF Core SMI Command Link
|
||||
IOCPortConfigureSet(IOID_10, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_OUT, IOC_STD_OUTPUT);
|
||||
IOCPortConfigureSet(IOID_9, IOC_IOCFG0_PORT_ID_RFC_SMI_CL_IN, IOC_STD_INPUT);
|
||||
// Register to receive incoming ATT Indications or Notifications of attribute values.
|
||||
GATT_RegisterForInd(self);
|
||||
|
||||
// configure RF Core tracer IO
|
||||
IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT);
|
||||
#else // !USE_FPGA
|
||||
#if defined( DEBUG_SW_TRACE )
|
||||
// configure RF Core tracer IO
|
||||
IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT | IOC_CURRENT_4MA | IOC_SLEW_ENABLE);
|
||||
#endif // DEBUG_SW_TRACE
|
||||
#endif // USE_FPGA
|
||||
// Register for GATT local events and ATT Responses pending for transmission.
|
||||
GATT_RegisterForMsgs(self);
|
||||
|
||||
// Set device's Sleep Clock Accuracy
|
||||
//HCI_EXT_SetSCACmd(40);
|
||||
|
||||
#if defined( USE_RCOSC )
|
||||
RCOSC_enableCalibration();
|
||||
#endif // USE_RCOSC
|
||||
|
||||
dispHandle = Display_open(Display_Type_LCD, NULL);
|
||||
|
||||
// Register for unprocessed HCI/Host event messages
|
||||
GAP_RegisterForMsgs(selfEntity);
|
||||
|
||||
// Initialize GATT Client
|
||||
VOID GATT_InitClient();
|
||||
|
||||
// Get build revision
|
||||
VOID Util_buildRevision(&buildRev);
|
||||
|
||||
#if !defined ( GATT_DB_OFF_CHIP )
|
||||
|
||||
#if defined ( GATT_QUAL )
|
||||
VOID GATTQual_AddService( GATT_ALL_SERVICES ); // Includes GAP and GATT Services
|
||||
#else
|
||||
// Add our services to GATT Server
|
||||
VOID GGS_AddService( GATT_ALL_SERVICES );
|
||||
VOID GATTServApp_AddService( GATT_ALL_SERVICES );
|
||||
#if defined ( GATT_TEST )
|
||||
VOID GATTTest_AddService( GATT_ALL_SERVICES );
|
||||
#endif
|
||||
#endif
|
||||
GGS_AddService(GATT_ALL_SERVICES);
|
||||
GATTServApp_AddService(GATT_ALL_SERVICES);
|
||||
|
||||
// Set device name
|
||||
if ((buildRev.hostInfo & CENTRAL_CFG) && (buildRev.hostInfo & PERIPHERAL_CFG))
|
||||
{
|
||||
memcpy(deviceName, "TI BLE All", 10);
|
||||
}
|
||||
else if (buildRev.hostInfo & CENTRAL_CFG)
|
||||
{
|
||||
memcpy(deviceName, "TI BLE Central", 14);
|
||||
}
|
||||
else if (buildRev.hostInfo & PERIPHERAL_CFG)
|
||||
{
|
||||
memcpy(deviceName, "TI BLE Peripheral", 17);
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(deviceName, "TI BLE Unknown", 14);
|
||||
}
|
||||
|
||||
VOID GGS_SetParameter(GGS_DEVICE_NAME_ATT, strlen((char *)deviceName), deviceName);
|
||||
VOID GGS_SetParameter(GGS_APPEARANCE_ATT, sizeof(uint16), (void*)&appearance);
|
||||
|
||||
#endif // GATT_DB_OFF_CHIP
|
||||
|
||||
Display_print0(dispHandle, 0, 0, "TI BLEv2.0");
|
||||
Display_print0(dispHandle, 1, 0, "HostTestApp");
|
||||
|
||||
// Display Host build configuration
|
||||
if ((buildRev.hostInfo & CENTRAL_CFG) && (buildRev.hostInfo & PERIPHERAL_CFG))
|
||||
{
|
||||
Display_print0(dispHandle, 2, 0, "All");
|
||||
}
|
||||
else if ((buildRev.hostInfo & CENTRAL_CFG) &&
|
||||
(buildRev.hostInfo & BROADCASTER_CFG))
|
||||
{
|
||||
Display_print0(dispHandle, 2, 0, "Cent+Bcast");
|
||||
}
|
||||
else if ((buildRev.hostInfo & PERIPHERAL_CFG) &&
|
||||
(buildRev.hostInfo & OBSERVER_CFG))
|
||||
{
|
||||
Display_print0(dispHandle, 2, 0, "Peri+Observ");
|
||||
}
|
||||
else if (buildRev.hostInfo & CENTRAL_CFG)
|
||||
{
|
||||
Display_print0(dispHandle, 2, 0, "Central");
|
||||
}
|
||||
else if (buildRev.hostInfo & PERIPHERAL_CFG)
|
||||
{
|
||||
Display_print0(dispHandle, 2, 0, "Peripheral");
|
||||
}
|
||||
else
|
||||
{
|
||||
Display_print1(dispHandle, 2, 0, "Unknown build cfg %d", buildRev.hostInfo);
|
||||
}
|
||||
// Register for unprocessed HCI/Host event messages
|
||||
GAP_RegisterForMsgs(self);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn HostTestApp_taskFxn
|
||||
/*
|
||||
* @fn HTA_main
|
||||
*
|
||||
* @brief Application task entry point for the Host Test App.
|
||||
*
|
||||
@@ -312,365 +199,340 @@ static void HostTestApp_init(void)
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
static void HostTestApp_taskFxn(UArg a0, UArg a1)
|
||||
{
|
||||
// Initialize application
|
||||
HostTestApp_init();
|
||||
static void HTA_main(UArg a0, UArg a1) {
|
||||
// Initialize application
|
||||
HTA_init();
|
||||
HTA_util_init();
|
||||
HTA_main_init();
|
||||
|
||||
// Application main loop
|
||||
for (;;)
|
||||
{
|
||||
// Waits for a signal to the semaphore associated with the calling thread.
|
||||
// Note that the semaphore associated with a thread is signaled when a
|
||||
// message is queued to the message receive queue of the thread or when
|
||||
// ICall_signal() function is called onto the semaphore.
|
||||
ICall_Errno errno = ICall_wait(ICALL_TIMEOUT_FOREVER);
|
||||
// Application main loop
|
||||
for (;;) {
|
||||
// Waits for a signal to the semaphore associated with the calling thread.
|
||||
// Note that the semaphore associated with a thread is signaled when a
|
||||
// message is queued to the message receive queue of the thread or when
|
||||
// ICall_signal() function is called onto the semaphore.
|
||||
ICall_Errno errno = ICall_wait(ICALL_TIMEOUT_FOREVER);
|
||||
|
||||
if (errno == ICALL_ERRNO_SUCCESS)
|
||||
{
|
||||
ICall_EntityID dest;
|
||||
ICall_ServiceEnum src;
|
||||
ICall_HciExtEvt *pMsg = NULL;
|
||||
if (errno == ICALL_ERRNO_SUCCESS) {
|
||||
ICall_EntityID dest;
|
||||
ICall_ServiceEnum src;
|
||||
ICall_HciExtEvt * message = NULL;
|
||||
|
||||
if (ICall_fetchServiceMsg(&src, &dest,
|
||||
(void **)&pMsg) == ICALL_ERRNO_SUCCESS)
|
||||
{
|
||||
bool dealloc = true;
|
||||
if (ICall_fetchServiceMsg(&src, &dest, (void **)&message) == ICALL_ERRNO_SUCCESS) {
|
||||
bool dealloc = true;
|
||||
|
||||
if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == selfEntity))
|
||||
{
|
||||
// Process incoming messages
|
||||
switch (pMsg->hdr.event)
|
||||
{
|
||||
case HCI_GAP_EVENT_EVENT:
|
||||
HostTestApp_processGapEvent(pMsg);
|
||||
break;
|
||||
if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == self)) {
|
||||
// Process incoming messages
|
||||
switch (message->hdr.event) {
|
||||
case HCI_GAP_EVENT_EVENT:
|
||||
HTA_handle_gap_event(message);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case GATT_MSG_EVENT:
|
||||
HTA_handle_att_event((gattMsgEvent_t *)message);
|
||||
break;
|
||||
|
||||
case GAP_MSG_EVENT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dealloc && message) {
|
||||
ICall_freeMsg(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dealloc == true)
|
||||
{
|
||||
ICall_freeMsg(pMsg);
|
||||
if (event_flags > 0) {
|
||||
HTA_event_call();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn HostTestApp_processGapEvent
|
||||
/*
|
||||
* @fn HTA_handle_gap_event
|
||||
*
|
||||
* @brief Process an incoming GAP Event.
|
||||
*
|
||||
* @param pMsg - message to process
|
||||
* @param message - message to process
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
static void HostTestApp_processGapEvent(ICall_HciExtEvt *pMsg)
|
||||
{
|
||||
switch(pMsg->hdr.status)
|
||||
{
|
||||
case HCI_COMMAND_COMPLETE_EVENT_CODE:
|
||||
{
|
||||
hciEvt_CmdComplete_t *pkt = (hciEvt_CmdComplete_t *)pMsg;
|
||||
static void HTA_handle_gap_event(ICall_HciExtEvt *message) {
|
||||
switch (message->hdr.status) {
|
||||
case HCI_COMMAND_COMPLETE_EVENT_CODE: {
|
||||
hciEvt_CmdComplete_t *pkt = (hciEvt_CmdComplete_t *)message;
|
||||
|
||||
if (lastAppOpcodeSent == pkt->cmdOpcode)
|
||||
{
|
||||
// app processes this as it was embedded msg to stack
|
||||
if (lastAppOpcodeSent == pkt->cmdOpcode) {
|
||||
// application processes this as it was embedded message to stack
|
||||
|
||||
// Reset last opcode sent
|
||||
lastAppOpcodeSent = 0xFFFF;
|
||||
// Reset last opcode sent
|
||||
lastAppOpcodeSent = 0xFFFF;
|
||||
} else {
|
||||
osal_msg_hdr_t *msgHdr;
|
||||
uint8 len;
|
||||
|
||||
msgHdr = (osal_msg_hdr_t *)message;
|
||||
msgHdr--; // Backup to the message header
|
||||
|
||||
len = (uint8)(msgHdr->len - sizeof(hciEvt_CmdComplete_t));
|
||||
|
||||
send_command_complete_event(HCI_COMMAND_COMPLETE_EVENT_CODE, pkt->cmdOpcode, len, pkt->pReturnParam);
|
||||
}
|
||||
else
|
||||
{
|
||||
osal_msg_hdr_t *msgHdr;
|
||||
uint8 len;
|
||||
|
||||
msgHdr = (osal_msg_hdr_t *)pMsg;
|
||||
msgHdr--; // Backup to the msg header
|
||||
|
||||
len = (uint8)(msgHdr->len - sizeof ( hciEvt_CmdComplete_t ));
|
||||
|
||||
sendCommandCompleteEvent(HCI_COMMAND_COMPLETE_EVENT_CODE,
|
||||
pkt->cmdOpcode, len, pkt->pReturnParam);
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
case HCI_DISCONNECTION_COMPLETE_EVENT_CODE:
|
||||
break;
|
||||
break;
|
||||
|
||||
case HCI_COMMAND_STATUS_EVENT_CODE:
|
||||
{
|
||||
hciEvt_CommandStatus_t *pkt = (hciEvt_CommandStatus_t *)pMsg;
|
||||
case HCI_COMMAND_STATUS_EVENT_CODE: {
|
||||
hciEvt_CommandStatus_t *pkt = (hciEvt_CommandStatus_t *)message;
|
||||
|
||||
if (lastAppOpcodeSent == pkt->cmdOpcode)
|
||||
{
|
||||
// app processes this as it was embedded msg to stack
|
||||
if (lastAppOpcodeSent == pkt->cmdOpcode) {
|
||||
// app processes this as it was embedded msg to stack
|
||||
|
||||
// Reset last opcode sent
|
||||
lastAppOpcodeSent = 0xFFFF;
|
||||
// Reset last opcode sent
|
||||
lastAppOpcodeSent = 0xFFFF;
|
||||
} else if (pkt->cmdOpcode == HCI_LE_SET_PHY) {
|
||||
send_command_status_event(HCI_COMMAND_STATUS_EVENT_CODE, pkt->cmdStatus, pkt->cmdOpcode);
|
||||
}
|
||||
else if (pkt->cmdOpcode == HCI_LE_SET_PHY)
|
||||
{
|
||||
sendCommandStatusEvent(HCI_COMMAND_STATUS_EVENT_CODE, pkt->cmdStatus,
|
||||
pkt->cmdOpcode);
|
||||
break;
|
||||
}
|
||||
|
||||
case HCI_LE_EVENT_CODE: {
|
||||
HTA_handle_ble_event(message);
|
||||
break;
|
||||
}
|
||||
|
||||
case HCI_BLE_HARDWARE_ERROR_EVENT_CODE: {
|
||||
AssertHandler(HAL_ASSERT_CAUSE_HARDWARE_ERROR, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
case HCI_VE_EVENT_CODE: {
|
||||
hciEvt_VSCmdComplete_t *pkt = (hciEvt_VSCmdComplete_t *)message;
|
||||
|
||||
if (lastAppOpcodeSent == pkt->cmdOpcode) {
|
||||
// app processes this as it was embedded msg to stack
|
||||
|
||||
// Reset last opcode sent
|
||||
lastAppOpcodeSent = 0xFFFF;
|
||||
} else {
|
||||
send_command_complete_event(HCI_VE_EVENT_CODE, pkt->cmdOpcode, pkt->length, pkt->pEventParam);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HCI_LE_EVENT_CODE:
|
||||
{
|
||||
HostTestApp_processBLEEvent(pMsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case HCI_BLE_HARDWARE_ERROR_EVENT_CODE:
|
||||
{
|
||||
AssertHandler(HAL_ASSERT_CAUSE_HARDWARE_ERROR,0);
|
||||
}
|
||||
break;
|
||||
|
||||
case HCI_VE_EVENT_CODE:
|
||||
{
|
||||
hciEvt_VSCmdComplete_t *pkt = (hciEvt_VSCmdComplete_t *)pMsg;
|
||||
|
||||
if (lastAppOpcodeSent == pkt->cmdOpcode)
|
||||
{
|
||||
// app processes this as it was embedded msg to stack
|
||||
|
||||
// Reset last opcode sent
|
||||
lastAppOpcodeSent = 0xFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
sendCommandCompleteEvent(HCI_VE_EVENT_CODE, pkt->cmdOpcode,
|
||||
pkt->length, pkt->pEventParam);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn HostTestApp_processBLEEvent
|
||||
static void HTA_handle_att_event(gattMsgEvent_t *message) {
|
||||
uint8_t method = message->method;
|
||||
|
||||
if (message->hdr.status == blePending) {
|
||||
// pass
|
||||
} else if ((method == ATT_READ_RSP) || (method == ATT_ERROR_RSP && message->msg.errorRsp.reqOpcode == ATT_READ_REQ)) {
|
||||
// pass
|
||||
} else if ((method == ATT_WRITE_RSP) || (method == ATT_ERROR_RSP && message->msg.errorRsp.reqOpcode == ATT_WRITE_REQ)) {
|
||||
// pass
|
||||
} else if (method == ATT_HANDLE_VALUE_NOTI) {
|
||||
#ifdef HTA_PIN_RS
|
||||
if (!PIN_getInputValue(HTA_PIN_RS)) {
|
||||
#endif
|
||||
attHandleValueNoti_t *att_notify = (attHandleValueNoti_t *)(&message->msg);
|
||||
HTA_main_handle_notify(att_notify->len, att_notify->pValue);
|
||||
#ifdef HTA_PIN_RS
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Free message. Needed only for ATT Protocol messages
|
||||
GATT_bm_free(&message->msg, message->method);
|
||||
}
|
||||
|
||||
/*
|
||||
* @fn HTA_handle_ble_event
|
||||
*
|
||||
* @brief Process an incoming BLE Event.
|
||||
|
||||
* @param pMsg - message to process
|
||||
* @param message - message to process
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static void HostTestApp_processBLEEvent(ICall_HciExtEvt *pMsg)
|
||||
{
|
||||
hciEvt_BLEPhyUpdateComplete_t *pEvt = (hciEvt_BLEPhyUpdateComplete_t *)pMsg;
|
||||
uint8 event[HCI_PHY_UPDATE_COMPLETE_EVENT_LEN];
|
||||
uint8 eventLen;
|
||||
static void HTA_handle_ble_event(ICall_HciExtEvt *message) {
|
||||
hciEvt_BLEPhyUpdateComplete_t *pEvt = (hciEvt_BLEPhyUpdateComplete_t *)message;
|
||||
|
||||
switch (pEvt->BLEEventCode)
|
||||
{
|
||||
case HCI_BLE_PHY_UPDATE_COMPLETE_EVENT:
|
||||
{
|
||||
event[0] = HCI_BLE_PHY_UPDATE_COMPLETE_EVENT; // event code
|
||||
event[1] = pEvt->status; // status
|
||||
event[2] = LO_UINT16(pEvt->connHandle); // connection handle (LSB)
|
||||
event[3] = HI_UINT16(pEvt->connHandle); // connection handle (MSB)
|
||||
event[4] = pEvt->txPhy; // TX PHY
|
||||
event[5] = pEvt->rxPhy; // RX PHY
|
||||
uint8 event[HCI_PHY_UPDATE_COMPLETE_EVENT_LEN];
|
||||
uint8 eventLen = 0;
|
||||
|
||||
switch (pEvt->BLEEventCode) {
|
||||
case HCI_BLE_PHY_UPDATE_COMPLETE_EVENT: {
|
||||
event[0] = HCI_BLE_PHY_UPDATE_COMPLETE_EVENT; // event code
|
||||
event[1] = pEvt->status; // status
|
||||
event[2] = LO_UINT16(pEvt->connHandle); // connection handle (LSB)
|
||||
event[3] = HI_UINT16(pEvt->connHandle); // connection handle (MSB)
|
||||
event[4] = pEvt->txPhy; // TX PHY
|
||||
event[5] = pEvt->rxPhy; // RX PHY
|
||||
|
||||
eventLen = HCI_PHY_UPDATE_COMPLETE_EVENT_LEN;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
eventLen = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (eventLen > 0)
|
||||
{
|
||||
// Send BLE Complete Event
|
||||
sendBLECompleteEvent(eventLen, event);
|
||||
}
|
||||
if (eventLen) {
|
||||
// Send BLE Complete Event
|
||||
send_ble_complete_event(eventLen, event);
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// the function prototypes
|
||||
|
||||
/*******************************************************************************
|
||||
/*
|
||||
* This generic function sends a Command Complete or a Vendor Specific Command
|
||||
* Complete Event to the Host.
|
||||
*
|
||||
*/
|
||||
static void sendCommandCompleteEvent(uint8_t eventCode, uint16_t opcode,
|
||||
uint8_t numParam, uint8_t *param)
|
||||
{
|
||||
npiPkt_t *msg;
|
||||
uint8_t totalLength;
|
||||
uint8_t txLen = 0; // Length to transmit
|
||||
static void send_command_complete_event(uint8_t eventCode, uint16_t opcode, uint8_t numParam, uint8_t *param) {
|
||||
npiPkt_t *msg;
|
||||
uint8_t totalLength;
|
||||
uint8_t txLen = 0; // Length to transmit
|
||||
|
||||
// The initial length will be:
|
||||
// OSAL message header(4) - not part of packet sent to HCI Host!
|
||||
// Minimum Event Data: Packet Type(1) + Event Code(1) + Length(1)
|
||||
// Return Parameters (0..N)
|
||||
totalLength = sizeof(npiPkt_t) + HCI_EVENT_MIN_LENGTH + numParam;
|
||||
// The initial length will be:
|
||||
// OSAL message header(4) - not part of packet sent to HCI Host!
|
||||
// Minimum Event Data: Packet Type(1) + Event Code(1) + Length(1)
|
||||
// Return Parameters (0..N)
|
||||
totalLength = sizeof(npiPkt_t) + HCI_EVENT_MIN_LENGTH + numParam;
|
||||
|
||||
// adjust the size of the event packet based on event code
|
||||
// Note: If not a vendor specific event, then the event includes:
|
||||
// Command Complete Data: Number of HCI Commands Allowed(1) + Command Opcode(2)
|
||||
// Note: If a vendor specific event, then the event includes:
|
||||
// Vendor Specific Command Complete Data: Vendor Specific Event Opcode(2)
|
||||
totalLength += ( (eventCode != HCI_VE_EVENT_CODE) ?
|
||||
HCI_CMD_COMPLETE_EVENT_LEN :
|
||||
HCI_CMD_VS_COMPLETE_EVENT_LEN );
|
||||
// adjust the size of the event packet based on event code
|
||||
// Note: If not a vendor specific event, then the event includes:
|
||||
// Command Complete Data: Number of HCI Commands Allowed(1) + Command Opcode(2)
|
||||
// Note: If a vendor specific event, then the event includes:
|
||||
// Vendor Specific Command Complete Data: Vendor Specific Event Opcode(2)
|
||||
totalLength += ((eventCode != HCI_VE_EVENT_CODE) ? HCI_CMD_COMPLETE_EVENT_LEN : HCI_CMD_VS_COMPLETE_EVENT_LEN);
|
||||
|
||||
// allocate memory for OSAL hdr + packet
|
||||
msg = (npiPkt_t *)ICall_allocMsg(totalLength);
|
||||
if (msg)
|
||||
{
|
||||
// OSAL message event, status, and pointer to packet
|
||||
msg->hdr.event = HCI_EVENT_PACKET;
|
||||
msg->hdr.status = 0xFF;
|
||||
msg->pData = (uint8*)(msg+1);
|
||||
// allocate memory for OSAL hdr + packet
|
||||
msg = (npiPkt_t *)ICall_allocMsg(totalLength);
|
||||
|
||||
// fill in Command Complete Event data
|
||||
msg->pData[0] = HCI_EVENT_PACKET;
|
||||
msg->pData[1] = eventCode;
|
||||
if (msg) {
|
||||
// OSAL message event, status, and pointer to packet
|
||||
msg->hdr.event = HCI_EVENT_PACKET;
|
||||
msg->hdr.status = 0xFF;
|
||||
msg->pData = (uint8 *)(msg + 1);
|
||||
|
||||
txLen += 2;
|
||||
// fill in Command Complete Event data
|
||||
msg->pData[0] = HCI_EVENT_PACKET;
|
||||
msg->pData[1] = eventCode;
|
||||
|
||||
// check if this isn't a vendor specific event
|
||||
if ( eventCode != HCI_VE_EVENT_CODE )
|
||||
{
|
||||
msg->pData[2] = numParam + HCI_CMD_COMPLETE_EVENT_LEN;
|
||||
msg->pData[3] = 1;// hciCtrlCmdToken; // event parameter 1
|
||||
msg->pData[4] = LO_UINT16( opcode ); // event parameter 2
|
||||
msg->pData[5] = HI_UINT16( opcode ); // event parameter 2
|
||||
txLen += 2;
|
||||
|
||||
txLen += 4;
|
||||
// check if this isn't a vendor specific event
|
||||
if (eventCode != HCI_VE_EVENT_CODE) {
|
||||
msg->pData[2] = numParam + HCI_CMD_COMPLETE_EVENT_LEN;
|
||||
msg->pData[3] = 1; // hciCtrlCmdToken; // event parameter 1
|
||||
msg->pData[4] = LO_UINT16(opcode); // event parameter 2
|
||||
msg->pData[5] = HI_UINT16(opcode); // event parameter 2
|
||||
|
||||
// remaining event parameters
|
||||
(void)memcpy(&msg->pData[6], param, numParam);
|
||||
txLen += 4;
|
||||
|
||||
txLen += numParam;
|
||||
// remaining event parameters
|
||||
(void)memcpy(&msg->pData[6], param, numParam);
|
||||
|
||||
txLen += numParam;
|
||||
|
||||
} else { // it is a vendor specific event
|
||||
// less one byte as number of complete packets not used in vendor specific event
|
||||
msg->pData[2] = numParam + HCI_CMD_VS_COMPLETE_EVENT_LEN;
|
||||
msg->pData[3] = param[0]; // event parameter 0: event opcode LSB
|
||||
msg->pData[4] = param[1]; // event parameter 1: event opcode MSB
|
||||
msg->pData[5] = param[2]; // event parameter 2: status
|
||||
msg->pData[6] = LO_UINT16(opcode); // event parameter 3: command opcode LSB
|
||||
msg->pData[7] = HI_UINT16(opcode); // event parameter 3: command opcode MSB
|
||||
|
||||
txLen += 6;
|
||||
|
||||
// remaining event parameters
|
||||
// Note: The event opcode and status were already placed in the msg packet.
|
||||
(void)memcpy(&msg->pData[8], ¶m[3], numParam - HCI_EVENT_MIN_LENGTH);
|
||||
|
||||
txLen += (numParam - HCI_EVENT_MIN_LENGTH);
|
||||
}
|
||||
|
||||
msg->pktLen = txLen;
|
||||
|
||||
NPITask_sendToHost((uint8_t *)msg);
|
||||
}
|
||||
else // it is a vendor specific event
|
||||
{
|
||||
// less one byte as number of complete packets not used in vendor specific event
|
||||
msg->pData[2] = numParam + HCI_CMD_VS_COMPLETE_EVENT_LEN;
|
||||
msg->pData[3] = param[0]; // event parameter 0: event opcode LSB
|
||||
msg->pData[4] = param[1]; // event parameter 1: event opcode MSB
|
||||
msg->pData[5] = param[2]; // event parameter 2: status
|
||||
msg->pData[6] = LO_UINT16( opcode ); // event parameter 3: command opcode LSB
|
||||
msg->pData[7] = HI_UINT16( opcode ); // event parameter 3: command opcode MSB
|
||||
|
||||
txLen += 6;
|
||||
|
||||
// remaining event parameters
|
||||
// Note: The event opcode and status were already placed in the msg packet.
|
||||
(void)memcpy(&msg->pData[8], ¶m[3], numParam-HCI_EVENT_MIN_LENGTH);
|
||||
|
||||
txLen += (numParam-HCI_EVENT_MIN_LENGTH);
|
||||
}
|
||||
|
||||
msg->pktLen = txLen;
|
||||
|
||||
NPITask_sendToHost((uint8_t *)msg);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
/*
|
||||
* This generic function sends a Command Complete or a Vendor Specific Command
|
||||
* Complete Event to the Host.
|
||||
*
|
||||
*/
|
||||
static void sendCommandStatusEvent(uint8_t eventCode, uint16_t status,
|
||||
uint16_t opcode)
|
||||
{
|
||||
npiPkt_t *msg;
|
||||
uint8_t totalLength;
|
||||
static void send_command_status_event(uint8_t eventCode, uint16_t status, uint16_t opcode) {
|
||||
npiPkt_t *msg;
|
||||
uint8_t totalLength;
|
||||
|
||||
// The initial length will be:
|
||||
// OSAL message header(4) - not part of packet sent to HCI Host!
|
||||
// Minimum Event Data: Packet Type(1) + Event Code(1) + Length(1)
|
||||
// Command Status Event Data: Status (1) + Num HCI Cmd Pkt (1) + Cmd Opcode (2)
|
||||
totalLength = sizeof(npiPkt_t) +
|
||||
HCI_EVENT_MIN_LENGTH +
|
||||
HCI_CMD_STATUS_EVENT_LEN;
|
||||
// The initial length will be:
|
||||
// OSAL message header(4) - not part of packet sent to HCI Host!
|
||||
// Minimum Event Data: Packet Type(1) + Event Code(1) + Length(1)
|
||||
// Command Status Event Data: Status (1) + Num HCI Cmd Pkt (1) + Cmd Opcode (2)
|
||||
totalLength = sizeof(npiPkt_t) + HCI_EVENT_MIN_LENGTH + HCI_CMD_STATUS_EVENT_LEN;
|
||||
|
||||
// allocate memory for OSAL hdr + packet
|
||||
msg = (npiPkt_t *)ICall_allocMsg(totalLength);
|
||||
if (msg)
|
||||
{
|
||||
// OSAL message event, status, and pointer to packet
|
||||
msg->hdr.event = HCI_EVENT_PACKET;
|
||||
msg->hdr.status = 0xFF;
|
||||
// allocate memory for OSAL hdr + packet
|
||||
msg = (npiPkt_t *)ICall_allocMsg(totalLength);
|
||||
if (msg) {
|
||||
// OSAL message event, status, and pointer to packet
|
||||
msg->hdr.event = HCI_EVENT_PACKET;
|
||||
msg->hdr.status = 0xFF;
|
||||
|
||||
// fill in length and data pointer
|
||||
msg->pktLen = HCI_EVENT_MIN_LENGTH + HCI_CMD_STATUS_EVENT_LEN;
|
||||
msg->pData = (uint8*)(msg+1);
|
||||
// fill in length and data pointer
|
||||
msg->pktLen = HCI_EVENT_MIN_LENGTH + HCI_CMD_STATUS_EVENT_LEN;
|
||||
msg->pData = (uint8 *)(msg + 1);
|
||||
|
||||
// fill in Command Complete Event data
|
||||
msg->pData[0] = HCI_EVENT_PACKET;
|
||||
msg->pData[1] = eventCode;
|
||||
msg->pData[2] = HCI_CMD_STATUS_EVENT_LEN;
|
||||
msg->pData[3] = status;
|
||||
msg->pData[4] = 1; // number of HCI command packets
|
||||
msg->pData[5] = LO_UINT16(opcode); // opcode (LSB)
|
||||
msg->pData[6] = HI_UINT16(opcode); // opcode (MSB)
|
||||
// fill in Command Complete Event data
|
||||
msg->pData[0] = HCI_EVENT_PACKET;
|
||||
msg->pData[1] = eventCode;
|
||||
msg->pData[2] = HCI_CMD_STATUS_EVENT_LEN;
|
||||
msg->pData[3] = status;
|
||||
msg->pData[4] = 1; // number of HCI command packets
|
||||
msg->pData[5] = LO_UINT16(opcode); // opcode (LSB)
|
||||
msg->pData[6] = HI_UINT16(opcode); // opcode (MSB)
|
||||
|
||||
NPITask_sendToHost((uint8_t *)msg);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* This is a generic function used to send BLE Complete Event to the
|
||||
* Host processor.
|
||||
*
|
||||
*/
|
||||
static void sendBLECompleteEvent(uint8 eventLen, uint8 *pEvent)
|
||||
{
|
||||
npiPkt_t *msg;
|
||||
uint8_t totalLength;
|
||||
|
||||
// The initial length will be:
|
||||
// OSAL message header(4) - not part of packet sent to HCI Host!
|
||||
// Minimum Event Data: Packet Type(1) + Event Code(1) + Length(1)
|
||||
// Event Data: eventLen
|
||||
totalLength = sizeof(npiPkt_t) + HCI_EVENT_MIN_LENGTH + eventLen;
|
||||
|
||||
// allocate memory for OSAL hdr + packet
|
||||
msg = (npiPkt_t *)ICall_allocMsg(totalLength);
|
||||
if (msg)
|
||||
{
|
||||
// OSAL message event, status, and pointer to packet
|
||||
msg->hdr.event = HCI_EVENT_PACKET;
|
||||
msg->hdr.status = 0xFF;
|
||||
|
||||
// fill in length and data pointer
|
||||
msg->pktLen = HCI_EVENT_MIN_LENGTH + eventLen;
|
||||
msg->pData = (uint8*)(msg+1);
|
||||
|
||||
// fill in BLE Complete Event data
|
||||
msg->pData[0] = HCI_EVENT_PACKET;
|
||||
msg->pData[1] = HCI_LE_EVENT_CODE;
|
||||
msg->pData[2] = eventLen;
|
||||
|
||||
// populate event data
|
||||
if (eventLen > 0)
|
||||
{
|
||||
memcpy(&msg->pData[3], pEvent, eventLen);
|
||||
NPITask_sendToHost((uint8_t *)msg);
|
||||
}
|
||||
|
||||
NPITask_sendToHost((uint8_t *)msg);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
/*
|
||||
* This is a generic function used to send BLE Complete Event to the Host processor.
|
||||
*/
|
||||
static void send_ble_complete_event(uint8 eventLen, uint8 *pEvent) {
|
||||
npiPkt_t *msg;
|
||||
uint8_t totalLength;
|
||||
|
||||
// The initial length will be:
|
||||
// OSAL message header(4) - not part of packet sent to HCI Host!
|
||||
// Minimum Event Data: Packet Type(1) + Event Code(1) + Length(1)
|
||||
// Event Data: eventLen
|
||||
totalLength = sizeof(npiPkt_t) + HCI_EVENT_MIN_LENGTH + eventLen;
|
||||
|
||||
// allocate memory for OSAL hdr + packet
|
||||
msg = (npiPkt_t *)ICall_allocMsg(totalLength);
|
||||
if (msg) {
|
||||
// OSAL message event, status, and pointer to packet
|
||||
msg->hdr.event = HCI_EVENT_PACKET;
|
||||
msg->hdr.status = 0xFF;
|
||||
|
||||
// fill in length and data pointer
|
||||
msg->pktLen = HCI_EVENT_MIN_LENGTH + eventLen;
|
||||
msg->pData = (uint8 *)(msg + 1);
|
||||
|
||||
// fill in BLE Complete Event data
|
||||
msg->pData[0] = HCI_EVENT_PACKET;
|
||||
msg->pData[1] = HCI_LE_EVENT_CODE;
|
||||
msg->pData[2] = eventLen;
|
||||
|
||||
// populate event data
|
||||
if (eventLen > 0) {
|
||||
memcpy(&msg->pData[3], pEvent, eventLen);
|
||||
}
|
||||
|
||||
NPITask_sendToHost((uint8_t *)msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
Target Device: CC2650, CC2640
|
||||
|
||||
******************************************************************************
|
||||
|
||||
|
||||
Copyright (c) 2013-2018, Texas Instruments Incorporated
|
||||
All rights reserved.
|
||||
|
||||
@@ -49,37 +49,16 @@
|
||||
#define HOSTESTAPP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************************************************************
|
||||
* INCLUDES
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* MACROS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* FUNCTIONS
|
||||
*/
|
||||
|
||||
/*
|
||||
* Task creation function for the Host Test App.
|
||||
*/
|
||||
extern void HostTestApp_createTask(void);
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* HOSTESTAPP_H */
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Target Device: CC2650, CC2640
|
||||
|
||||
******************************************************************************
|
||||
|
||||
|
||||
Copyright (c) 2013-2018, Texas Instruments Incorporated
|
||||
All rights reserved.
|
||||
|
||||
@@ -44,26 +44,29 @@
|
||||
Release Date: 2018-04-02 18:03:35
|
||||
*****************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* INCLUDES
|
||||
*/
|
||||
|
||||
#include <xdc/runtime/Error.h>
|
||||
|
||||
#include <ti/drivers/Power.h>
|
||||
|
||||
#include <ti/drivers/power/PowerCC26XX.h>
|
||||
|
||||
#include <ti/sysbios/BIOS.h>
|
||||
|
||||
#include "icall.h"
|
||||
#include "hal_assert.h"
|
||||
#include "board.h"
|
||||
|
||||
#include "hal_assert.h"
|
||||
|
||||
#include "icall.h"
|
||||
|
||||
#include "inc/npi_task.h"
|
||||
|
||||
#include "host_test_app.h"
|
||||
|
||||
/* Header files required to enable instruction fetch cache */
|
||||
#include <inc/hw_memmap.h>
|
||||
#include <driverlib/vims.h>
|
||||
|
||||
#include <inc/hw_memmap.h>
|
||||
|
||||
#ifndef USE_DEFAULT_USER_CFG
|
||||
|
||||
#include "ble_user_config.h"
|
||||
@@ -71,70 +74,12 @@
|
||||
// BLE user defined configuration
|
||||
bleUserCfg_t user0Cfg = BLE_USER_CFG;
|
||||
|
||||
#endif // USE_DEFAULT_USER_CFG
|
||||
#endif // USE_DEFAULT_USER_CFG
|
||||
|
||||
#include <ti/mw/display/Display.h>
|
||||
|
||||
#ifdef USE_FPGA
|
||||
#include <inc/hw_prcm.h>
|
||||
#endif // USE_FPGA
|
||||
|
||||
/*******************************************************************************
|
||||
* MACROS
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
#if defined( USE_FPGA )
|
||||
#define RFC_MODE_BLE PRCM_RFCMODESEL_CURR_MODE1
|
||||
#define RFC_MODE_ANT PRCM_RFCMODESEL_CURR_MODE4
|
||||
#define RFC_MODE_EVERYTHING_BUT_ANT PRCM_RFCMODESEL_CURR_MODE5
|
||||
#define RFC_MODE_EVERYTHING PRCM_RFCMODESEL_CURR_MODE6
|
||||
//
|
||||
#define SET_RFC_BLE_MODE(mode) HWREG( PRCM_BASE + PRCM_O_RFCMODESEL ) = (mode)
|
||||
#endif // USE_FPGA
|
||||
|
||||
/*******************************************************************************
|
||||
* TYPEDEFS
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* LOCAL VARIABLES
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
|
||||
#ifdef CC1350_LAUNCHXL
|
||||
#ifdef POWER_SAVING
|
||||
// Power Notify Object for wake-up callbacks
|
||||
Power_NotifyObj rFSwitchPowerNotifyObj;
|
||||
static uint8_t rFSwitchNotifyCb(uint8_t eventType, uint32_t *eventArg,
|
||||
uint32_t *clientArg);
|
||||
#endif //POWER_SAVING
|
||||
|
||||
PIN_State radCtrlState;
|
||||
PIN_Config radCtrlCfg[] =
|
||||
{
|
||||
Board_DIO1_RFSW | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* RF SW Switch defaults to 2.4GHz path*/
|
||||
Board_DIO30_SWPWR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Power to the RF Switch */
|
||||
PIN_TERMINATE
|
||||
};
|
||||
PIN_Handle radCtrlHandle;
|
||||
#endif //CC1350_LAUNCHXL
|
||||
|
||||
/*******************************************************************************
|
||||
* EXTERNS
|
||||
*/
|
||||
|
||||
extern void AssertHandler(uint8 assertCause, uint8 assertSubcause);
|
||||
|
||||
extern Display_Handle dispHandle;
|
||||
|
||||
/*******************************************************************************
|
||||
/*
|
||||
* @fn Main
|
||||
*
|
||||
* @brief Application Main
|
||||
@@ -149,68 +94,38 @@ extern Display_Handle dispHandle;
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
#if defined( USE_FPGA )
|
||||
HWREG(PRCM_BASE + PRCM_O_PDCTL0) &= ~PRCM_PDCTL0_RFC_ON;
|
||||
HWREG(PRCM_BASE + PRCM_O_PDCTL1) &= ~PRCM_PDCTL1_RFC_ON;
|
||||
#endif // USE_FPGA
|
||||
int main() {
|
||||
|
||||
/* Register Application callback to trap asserts raised in the Stack */
|
||||
RegisterAssertCback(AssertHandler);
|
||||
/* Register Application callback to trap asserts raised in the Stack */
|
||||
RegisterAssertCback(AssertHandler);
|
||||
|
||||
PIN_init(BoardGpioInitTable);
|
||||
PIN_init(BoardGpioInitTable);
|
||||
|
||||
#ifdef CC1350_LAUNCHXL
|
||||
// Enable 2.4GHz Radio
|
||||
radCtrlHandle = PIN_open(&radCtrlState, radCtrlCfg);
|
||||
// Enable iCache prefetching
|
||||
VIMSConfigure(VIMS_BASE, TRUE, TRUE);
|
||||
|
||||
#ifdef POWER_SAVING
|
||||
Power_registerNotify(&rFSwitchPowerNotifyObj,
|
||||
PowerCC26XX_ENTERING_STANDBY | PowerCC26XX_AWAKE_STANDBY,
|
||||
(Power_NotifyFxn) rFSwitchNotifyCb, NULL);
|
||||
#endif //POWER_SAVING
|
||||
#endif //CC1350_LAUNCHXL
|
||||
// Enable cache
|
||||
VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);
|
||||
|
||||
#if defined( USE_FPGA )
|
||||
// set RFC mode to support BLE
|
||||
// Note: This must be done before the RF Core is released from reset!
|
||||
SET_RFC_BLE_MODE(RFC_MODE_BLE);
|
||||
#endif // USE_FPGA
|
||||
/* Initialize ICall module */
|
||||
ICall_init();
|
||||
|
||||
// Enable iCache prefetching
|
||||
VIMSConfigure(VIMS_BASE, TRUE, TRUE);
|
||||
/* Start tasks of external images */
|
||||
ICall_createRemoteTasks();
|
||||
|
||||
// Enable cache
|
||||
VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);
|
||||
/* Kick off application */
|
||||
HostTestApp_createTask();
|
||||
|
||||
#if !defined( POWER_SAVING ) || defined( USE_FPGA )
|
||||
/* Set constraints for Standby, powerdown and idle mode */
|
||||
// PowerCC26XX_SB_DISALLOW may be redundant
|
||||
Power_setConstraint(PowerCC26XX_SB_DISALLOW);
|
||||
Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
|
||||
#endif // POWER_SAVING | USE_FPGA
|
||||
/* Kick off NPI */
|
||||
NPITask_createTask(ICALL_SERVICE_CLASS_BLE);
|
||||
|
||||
/* Initialize ICall module */
|
||||
ICall_init();
|
||||
/* enable interrupts and start SYS/BIOS */
|
||||
BIOS_start();
|
||||
|
||||
/* Start tasks of external images */
|
||||
ICall_createRemoteTasks();
|
||||
|
||||
/* Kick off application */
|
||||
HostTestApp_createTask();
|
||||
|
||||
/* Kick off NPI */
|
||||
NPITask_createTask(ICALL_SERVICE_CLASS_BLE);
|
||||
|
||||
/* enable interrupts and start SYS/BIOS */
|
||||
BIOS_start();
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/*
|
||||
* @fn AssertHandler
|
||||
*
|
||||
* @brief This is the Application's callback handler for asserts raised
|
||||
@@ -246,57 +161,9 @@ int main()
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
void AssertHandler(uint8 assertCause, uint8 assertSubcause)
|
||||
{
|
||||
// Open the display if the app has not already done so
|
||||
if ( !dispHandle )
|
||||
{
|
||||
dispHandle = Display_open(Display_Type_LCD, NULL);
|
||||
}
|
||||
void AssertHandler(uint8 assertCause, uint8 assertSubcause) {}
|
||||
|
||||
Display_print0(dispHandle, 0, 0, ">>>STACK ASSERT");
|
||||
|
||||
// check the assert cause
|
||||
switch (assertCause)
|
||||
{
|
||||
// This assert is raised from the BLE Stack when a malloc failure occurs.
|
||||
case HAL_ASSERT_CAUSE_OUT_OF_MEMORY:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> OUT OF MEMORY!");
|
||||
break;
|
||||
|
||||
case HAL_ASSERT_CAUSE_INTERNAL_ERROR:
|
||||
// check the subcause
|
||||
if (assertSubcause == HAL_ASSERT_SUBCAUSE_FW_INERNAL_ERROR)
|
||||
{
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> INTERNAL FW ERROR!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> INTERNAL ERROR!");
|
||||
}
|
||||
break;
|
||||
|
||||
// An assert originating from an ICall failure.
|
||||
case HAL_ASSERT_CAUSE_ICALL_ABORT:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> ICALL ABORT!");
|
||||
HAL_ASSERT_SPINLOCK;
|
||||
break;
|
||||
|
||||
default:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> DEFAULT SPINLOCK!");
|
||||
HAL_ASSERT_SPINLOCK;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
/*
|
||||
* @fn exceptionHandler
|
||||
*
|
||||
* @brief Generic spinlock to trap RTOS raised errors.
|
||||
@@ -311,13 +178,11 @@ void AssertHandler(uint8 assertCause, uint8 assertSubcause)
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
void exceptionHandler( void )
|
||||
{
|
||||
volatile uint8 i = 1;
|
||||
while(i);
|
||||
void exceptionHandler(void) {
|
||||
for (;;);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
/*
|
||||
* @fn smallErrorHook
|
||||
*
|
||||
* @brief Error handler to be hooked into TI-RTOS.
|
||||
@@ -332,45 +197,6 @@ void exceptionHandler( void )
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
void smallErrorHook(Error_Block *eb)
|
||||
{
|
||||
for (;;);
|
||||
void smallErrorHook(Error_Block *eb) {
|
||||
for (;;);
|
||||
}
|
||||
|
||||
#if defined (CC1350_LAUNCHXL) && defined (POWER_SAVING)
|
||||
/*******************************************************************************
|
||||
* @fn rFSwitchNotifyCb
|
||||
*
|
||||
* @brief Power driver callback to toggle RF switch on Power state
|
||||
* transitions.
|
||||
*
|
||||
* input parameters
|
||||
*
|
||||
* @param eventType - The state change.
|
||||
* @param eventArg - Not used.
|
||||
* @param clientArg - Not used.
|
||||
*
|
||||
* @return Power_NOTIFYDONE to indicate success.
|
||||
*/
|
||||
static uint8_t rFSwitchNotifyCb(uint8_t eventType, uint32_t *eventArg,
|
||||
uint32_t *clientArg)
|
||||
{
|
||||
if (eventType == PowerCC26XX_ENTERING_STANDBY)
|
||||
{
|
||||
// Power down RF Switch
|
||||
PIN_setOutputValue(radCtrlHandle, Board_DIO30_SWPWR, 0);
|
||||
}
|
||||
else if (eventType == PowerCC26XX_AWAKE_STANDBY)
|
||||
{
|
||||
// Power up RF Switch
|
||||
PIN_setOutputValue(radCtrlHandle, Board_DIO30_SWPWR, 1);
|
||||
}
|
||||
|
||||
// Notification handled successfully
|
||||
return Power_NOTIFYDONE;
|
||||
}
|
||||
#endif //CC1350_LAUNCHXL || POWER_SAVING
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*/
|
||||
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"name": "Elite-ZM",
|
||||
"version": "1.2.30",
|
||||
"match_rule": {
|
||||
"local_name_pattern": "Elite-ZM.+",
|
||||
"major_product_number": 0,
|
||||
"minor_product_number": 2,
|
||||
"major_version_number": 1,
|
||||
"minor_version_number": 2
|
||||
},
|
||||
"constant": {
|
||||
"ADC_CHANNEL_NUMBER": [
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15
|
||||
],
|
||||
"VOLT_MAX": 4095
|
||||
},
|
||||
"parameters": {
|
||||
"CHANNEL": {
|
||||
"description": "record channels",
|
||||
"record_meta": true,
|
||||
"domain": "property",
|
||||
"value": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
},
|
||||
"SAMPLE_RATE": {
|
||||
"description": "data sampling rate",
|
||||
"record_meta": true,
|
||||
"domain": "constant",
|
||||
"value": 1
|
||||
},
|
||||
"AMP_GAIN": {
|
||||
"description": "amp gain",
|
||||
"record_meta": true,
|
||||
"domain": "constant",
|
||||
"value": 1
|
||||
},
|
||||
"MODE": {
|
||||
"description": "working mode",
|
||||
"value": [
|
||||
"I-V Curve",
|
||||
"Cyclic Voltammetry",
|
||||
"Function Generator",
|
||||
"Z-T Curve",
|
||||
"V-T Curve",
|
||||
"I-T Curve",
|
||||
"ADC test"
|
||||
]
|
||||
},
|
||||
"VOLT_ORIGIN": {
|
||||
"description": "Origin Voltage of Scan",
|
||||
"domain": [
|
||||
"VOLT_MAX"
|
||||
]
|
||||
},
|
||||
"VOLT_FINAL": {
|
||||
"description": "The last Voltage of Scan",
|
||||
"domain": [
|
||||
"VOLT_MAX"
|
||||
],
|
||||
"value": "1365 * VALUE"
|
||||
},
|
||||
"VOLT_STEP": {
|
||||
"description": "Voltage Step",
|
||||
"domain": [
|
||||
5
|
||||
]
|
||||
},
|
||||
"STEP_TIME": {
|
||||
"description": "How much time between two step",
|
||||
"domain": [
|
||||
4
|
||||
]
|
||||
},
|
||||
"DAC_VOLT": {
|
||||
"description": "DAC output Voltage",
|
||||
"domain": [
|
||||
"VOLT_MAX"
|
||||
]
|
||||
},
|
||||
"ADC_CHANNEL": {
|
||||
"description": "read ADC data",
|
||||
"value": [
|
||||
"ANA0",
|
||||
"ANA1",
|
||||
"ANA2",
|
||||
"ANA3"
|
||||
]
|
||||
}
|
||||
},
|
||||
"instruction": {
|
||||
"start": [
|
||||
{
|
||||
"expression": "MODE",
|
||||
"when": {
|
||||
"0": "curve_iv",
|
||||
"1": "curve_cv",
|
||||
"2": "func_gen",
|
||||
"6": "adc_test"
|
||||
}
|
||||
}
|
||||
],
|
||||
"data_format": [
|
||||
"_data_format('TDC4VAF2')"
|
||||
],
|
||||
"curve_iv": [
|
||||
"data_format",
|
||||
"_notify(True)",
|
||||
"curve_iv0",
|
||||
"_sync(True)",
|
||||
"VIS_STI"
|
||||
],
|
||||
"curve_iv0": {
|
||||
"type": "RIS",
|
||||
"parameter": {
|
||||
"va": "(VOLT_ORIGIN + 1) * 0x0010",
|
||||
"vb": "(VOLT_FINAL + 1) * 0x0010",
|
||||
"dv": "VOLT_STEP * 0x40",
|
||||
"dt": "STEP_TIME * 0x12"
|
||||
},
|
||||
"data": [
|
||||
"1X10;2B>va;2B>vb;B>dv;B>dt"
|
||||
]
|
||||
},
|
||||
"curve_cv": [
|
||||
"data_format",
|
||||
"_notify(True)",
|
||||
"curve_cv0",
|
||||
"_sync(True)",
|
||||
"VIS_STI"
|
||||
],
|
||||
"curve_cv0": {
|
||||
"type": "RIS",
|
||||
"parameter": {
|
||||
"va": "(VOLT_ORIGIN + 1) * 0x0010",
|
||||
"vb": "(VOLT_FINAL + 1) * 0x0010",
|
||||
"dv": "VOLT_STEP * 0x40",
|
||||
"dt": "STEP_TIME * 0x12"
|
||||
},
|
||||
"data": [
|
||||
"1X20;2B>va;2B>vb;B>dv;B>dt"
|
||||
]
|
||||
},
|
||||
"func_gen": [
|
||||
"data_format",
|
||||
"func_gen0",
|
||||
"VIS_STI"
|
||||
],
|
||||
"func_gen0": {
|
||||
"type": "RIS",
|
||||
"parameter": {
|
||||
"v": "(DAC_VOLT + 1) * 0x0010"
|
||||
},
|
||||
"data": [
|
||||
"X30;X30;2B>v"
|
||||
]
|
||||
},
|
||||
"adc_test": [
|
||||
"data_format",
|
||||
"_notify(True)",
|
||||
"adc_test0",
|
||||
"_sync(True)",
|
||||
"VIS_STI"
|
||||
],
|
||||
"adc_test0": {
|
||||
"type": "RIS",
|
||||
"data": [
|
||||
"X90;B>ADC_CHANNEL"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
|
||||
#ifndef EliteADC
|
||||
#define EliteADC
|
||||
|
||||
#include "Elite_PIN.h"
|
||||
#include "EliteSPI.h"
|
||||
#include "EliteNotify.h"
|
||||
|
||||
|
||||
// Elite ADC macro
|
||||
// ADC command, Elite will use these cmd to control ADC
|
||||
#define CMD_CURRENT_MEASURE 0xC5
|
||||
#define CMD_VOLT_MEASURE 0xD5
|
||||
#define CMD_DAC_MEASURE 0xE5
|
||||
#define CMD_BATTERY_MEASURE 0xF5
|
||||
|
||||
// controller command, these are command from control box
|
||||
#define ADC_CH_CURRENT 0x00
|
||||
#define ADC_CH_VOLT 0x01
|
||||
#define ADC_CH_DAC 0x02
|
||||
#define ADC_CH_BAT 0x03
|
||||
|
||||
static void ADC_write(uint8_t ADCin) {
|
||||
/*
|
||||
* This function can only define [15]~[8] through ADCin
|
||||
* [7]~[0] should always be 0b11101011
|
||||
*
|
||||
* [15] : SS, 0 = no effect, 1 = start work, default 0b0
|
||||
* [14]~[12] : MUX[2:0], default 0b000
|
||||
* [11]~[9] : PGA[2:0], default 0b010 = FSR is ±2.048
|
||||
* [8] : mode, 0 = continuous, 1 = one shot, default 0b1 (Power-down and single-shot mode )
|
||||
*
|
||||
* [7]~[5] : data rate, default 0b100 = 128 SPS
|
||||
* [4] : Temperature? default 0b0 = ADC mode
|
||||
* [3] : Pullup enable, default 0b1 = Pullup resistor enabled
|
||||
* [2]~[1] : NOP, default 0b01
|
||||
* [0] : reserved, default 0b1
|
||||
*
|
||||
*/
|
||||
|
||||
// spi_ADC_txbuf[0] = 0b00000101;
|
||||
for(int i=0 ; i<SPI_ADC_SIZE ; i++){
|
||||
spi_ADC_txbuf[i] = 0;
|
||||
spi_ADC_rxbuf[i] = 0;
|
||||
}
|
||||
|
||||
spi_ADC_txbuf[0] = ADCin;
|
||||
spi_ADC_txbuf[1] = 0b11101011;
|
||||
|
||||
|
||||
ADC_SPI(2, spi_ADC_txbuf, spi_ADC_rxbuf);
|
||||
}
|
||||
|
||||
static void ADC_read(uint8_t *ADCdata){
|
||||
for(int i=0 ; i<SPI_ADC_SIZE ; i++){
|
||||
spi_ADC_txbuf[i] = 0;
|
||||
spi_ADC_rxbuf[i] = 0;
|
||||
}
|
||||
|
||||
ADC_SPI(SPI_ADC_SIZE, spi_ADC_txbuf, ADCdata);
|
||||
}
|
||||
|
||||
static void ADCGainControl(uint8_t ADCLevel){
|
||||
if(ADCLevel == 0){
|
||||
// ADC gain level = 0, using 200R resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
}
|
||||
else if(ADCLevel == 1){
|
||||
// ADC gain level = 1, using 10K resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 1);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
}
|
||||
else if(ADCLevel == 2){
|
||||
// ADC gain level = 2, using 100R resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 1);
|
||||
}
|
||||
else{
|
||||
// default using 200R resister
|
||||
PIN_setOutputValue(pin_handle, Turnon10K, 0);
|
||||
PIN_setOutputValue(pin_handle, Turnon100R, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void ADCChannelSelect(uint8_t ADCChannel){
|
||||
// set ADC parameter
|
||||
// 0xC1~F1 = reading AIN0~AIN3. Using FSR+-6V, resolution = 187.5uV
|
||||
// 0xC5~F5 = reading AIN0~AIN3. Using FSR+-2V, resolution = 62.5 uV
|
||||
switch(ADCChannel){
|
||||
// AINp is AIN0; AINn is GND
|
||||
// measure AIN0, which is a current measure
|
||||
case ADC_CH_CURRENT :{
|
||||
ADC_write(CMD_CURRENT_MEASURE);
|
||||
break;
|
||||
}
|
||||
|
||||
// AINp is AIN1; AINn is GND
|
||||
// AIN1, which is a volt measure
|
||||
case ADC_CH_VOLT :{
|
||||
ADC_write(CMD_VOLT_MEASURE);
|
||||
break;
|
||||
}
|
||||
|
||||
// AINp is AIN2; AINn is GND
|
||||
// AIN2, measure DAC voltage (Note that this is NOT DAC real output value!!)
|
||||
case ADC_CH_DAC :{
|
||||
ADC_write(CMD_DAC_MEASURE);
|
||||
break;
|
||||
}
|
||||
|
||||
// measure battery volt
|
||||
case ADC_CH_BAT :{
|
||||
ADC_write(CMD_BATTERY_MEASURE);
|
||||
break;
|
||||
}
|
||||
default :{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// this function turn ADC measure value (0xXXXX) into real voltage
|
||||
// unit should be mV
|
||||
static int32_t DecodeADCVolt(uint16_t ADC_measure){
|
||||
int32_t ADCRealVolt = 0;
|
||||
int32_t coeff = (-629), offset = 15447740;
|
||||
|
||||
ADCRealVolt = (coeff * ADC_measure + offset);
|
||||
ADCRealVolt = ADCRealVolt / 1000;
|
||||
return ADCRealVolt;
|
||||
}
|
||||
|
||||
// this function turn ADC measure value (0xXXXX) into real current
|
||||
// unit should be pA
|
||||
static int32_t DecodeADCCurrent(uint8_t ADCGain, uint16_t ADC_measure){
|
||||
int32_t ADCRealCurrent = 0;
|
||||
int32_t coeff[3] = {0}, offset[3] = {0};
|
||||
|
||||
coeff[0] = 3056;
|
||||
coeff[1] = 65461;
|
||||
coeff[2] = 3369;
|
||||
|
||||
offset[0] = -74771591;
|
||||
offset[1] = -1601786957;
|
||||
offset[2] = -82598293;
|
||||
|
||||
ADCRealCurrent = (coeff[ADCGain] * ADC_measure + offset[ADCGain]);
|
||||
return ADCRealCurrent;
|
||||
}
|
||||
|
||||
// Decode ADC measure value (could be a volt or current) and put it into notify buffer
|
||||
static int32_t DecodeADCValue(uint8_t ADCGain, uint8_t ADCChannel, uint8_t *ADC_raw){
|
||||
|
||||
uint16_t ADC_measure = (uint16_t) (ADC_raw[0] << 8) | (uint16_t) (ADC_raw[1]);
|
||||
int32_t ret = 0, ADCRealCurrent = 0, ADCRealVolt = 0;
|
||||
|
||||
// return real volt to controller
|
||||
if(ADCChannel == ADC_CH_VOLT){
|
||||
ADCRealVolt = DecodeADCVolt(ADC_measure);
|
||||
NotifyVolt[0] = (uint8_t) (ADCRealVolt >> 24);
|
||||
NotifyVolt[1] = (uint8_t) ((ADCRealVolt & 0x00FF0000) >> 16);
|
||||
NotifyVolt[2] = (uint8_t) ((ADCRealVolt & 0x0000FF00) >> 8);
|
||||
NotifyVolt[3] = (uint8_t) (ADCRealVolt & 0x000000FF);
|
||||
ret = ADCRealVolt;
|
||||
}
|
||||
|
||||
// return real current to controller
|
||||
else if(ADCChannel == ADC_CH_CURRENT){
|
||||
ADCRealCurrent = DecodeADCCurrent(ADCGain, ADC_measure);
|
||||
NotifyCurrent[0] = (uint8_t) (ADCRealCurrent >> 24);
|
||||
NotifyCurrent[1] = (uint8_t) ((ADCRealCurrent & 0x00FF0000) >> 16);
|
||||
NotifyCurrent[2] = (uint8_t) ((ADCRealCurrent & 0x0000FF00) >> 8);
|
||||
NotifyCurrent[3] = (uint8_t) (ADCRealCurrent & 0x000000FF);
|
||||
ret = ADCRealCurrent;
|
||||
}
|
||||
|
||||
else{
|
||||
// not support AIN2 / AIN3 yet
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
|
||||
#ifndef EliteDAC
|
||||
#define EliteDAC
|
||||
|
||||
static bool DACreset = true;
|
||||
|
||||
#ifdef ELITE_VERSION_1_3
|
||||
#define DACOUT 0x30
|
||||
|
||||
static void DAC_outputV(uint16_t voltLV) {
|
||||
// C = command, X = don't care, D = data
|
||||
// CCCC XXXX = command
|
||||
// DDDD DDDD = v1
|
||||
// DDDD XXXX = v2
|
||||
|
||||
uint8_t v1, v2 = 0;
|
||||
v1 = (uint8_t) (voltLV >> 4) & 0xFF;
|
||||
v2 = (uint8_t) ((voltLV & 0x000F) << 4) & 0xF0;
|
||||
|
||||
spi_DACtxbuf[0] = command;
|
||||
spi_DACtxbuf[1] = v1;
|
||||
spi_DACtxbuf[2] = v2;
|
||||
for (int i = 3; i < SPI_DAC_SIZE; i++) {
|
||||
spi_DACtxbuf[i] = 0;
|
||||
}
|
||||
|
||||
DAC_SPI(SPI_DAC_SIZE, spi_DACtxbuf, spi_rxbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ELITE_VERSION_1_4
|
||||
#define DACCLS 0x02
|
||||
#define DACOUT 0x31
|
||||
|
||||
static void DAC_outputV(uint16_t voltLV) {
|
||||
// C = command, X = don't care, D = data
|
||||
// CCCC CCCC = command
|
||||
// DDDD DDDD = v1
|
||||
// DDDD DDDD = v2
|
||||
|
||||
// command
|
||||
// 0x02 = clear
|
||||
// 0x31 = output voltage
|
||||
|
||||
uint8_t v1, v2 = 0;
|
||||
v1 = (uint8_t) ((voltLV & 0xFF00) >> 8);
|
||||
v2 = (uint8_t) (voltLV & 0x00FF);
|
||||
|
||||
spi_DACtxbuf[0] = DACOUT;
|
||||
spi_DACtxbuf[1] = v1;
|
||||
spi_DACtxbuf[2] = v2;
|
||||
|
||||
DAC_SPI(SPI_DAC_SIZE, spi_DACtxbuf, spi_rxbuf);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// User will enter -5V~+5V in UI.
|
||||
// websever and controler use 0~50000 represent -5~+5V
|
||||
// this function should turn 0~50000 into DACcode which output the exactly voltage user want
|
||||
|
||||
static uint16_t DACCorrectionDecode(uint16_t usercode)
|
||||
{
|
||||
// DACcode to real_voltage correction function
|
||||
int32_t usercode_32;
|
||||
uint16_t DACcode = 0;
|
||||
int16_t coeff = (-1054), offset = 60597718;
|
||||
|
||||
usercode_32 = (int32_t)(usercode);
|
||||
|
||||
DACcode = (uint16_t) (coeff * usercode_32 + offset)/1000;
|
||||
|
||||
return DACcode;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
|
||||
#ifndef EliteCorrection
|
||||
#define EliteCorrection
|
||||
|
||||
/* DAC reset parameter */
|
||||
#define DACzero 0x7FFF
|
||||
#define DACposMax 0x0000
|
||||
#define DACnegMax 0xFFFF
|
||||
|
||||
|
||||
#endif
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
|
||||
#ifndef ELITE_I2C
|
||||
#define ELITE_I2C
|
||||
|
||||
/*
|
||||
* Read I2C example in
|
||||
* http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_14_02_22/
|
||||
* exports/tirtos_full_2_14_02_22/docs/doxygen/html/_i2_c_c_c26_x_x_8h.html
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ti/drivers/I2C.h>
|
||||
#include <ti/drivers/Power.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// I2C
|
||||
static I2C_Handle I2Chandle;
|
||||
static I2C_Params I2Cparams;
|
||||
static I2C_Transaction i2cTrans;
|
||||
|
||||
#define I2CBufSize 4
|
||||
static uint8_t I2CtxBuf[I2CBufSize]; // Transmit buffer
|
||||
static uint8_t I2CrxBuf[I2CBufSize]; // Receive buffer
|
||||
bool transferDone = false;
|
||||
|
||||
static void I2CCallbackFunction(I2C_Handle handle, I2C_Transaction *msg, bool transfer) {
|
||||
if(transfer){
|
||||
transferDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void I2Cinit(){
|
||||
I2C_init();
|
||||
|
||||
// Configure I2C parameters.
|
||||
I2C_Params_init(&I2Cparams);
|
||||
|
||||
I2Cparams.transferMode = I2C_MODE_CALLBACK;
|
||||
I2Cparams.transferCallbackFxn = I2CCallbackFunction;
|
||||
I2Cparams.bitRate = I2C_100kHz;
|
||||
|
||||
// Initialize master I2C transaction structure
|
||||
i2cTrans.writeCount = I2CBufSize;
|
||||
i2cTrans.writeBuf = I2CtxBuf;
|
||||
i2cTrans.readCount = I2CBufSize;
|
||||
i2cTrans.readBuf = I2CrxBuf;
|
||||
i2cTrans.slaveAddress = 0xA0;
|
||||
|
||||
for(int i=0 ; i<10 ; i++){
|
||||
I2CtxBuf[i] = 0;
|
||||
I2CrxBuf[i] = 0;
|
||||
}
|
||||
|
||||
// Open I2C
|
||||
I2Chandle = I2C_open(Board_I2C, &I2Cparams);
|
||||
|
||||
}
|
||||
#define WriteMem 0b10100001
|
||||
#define ReadMem 0b10100000
|
||||
|
||||
static void I2CWrite(uint8_t addr, uint8_t data){
|
||||
for(int i=0 ; i<I2CBufSize ; i++){
|
||||
I2CtxBuf[i] = 0;
|
||||
I2CrxBuf[i] = 0;
|
||||
}
|
||||
|
||||
I2CtxBuf[0] = WriteMem;
|
||||
I2CtxBuf[1] = addr;
|
||||
I2CtxBuf[2] = data;
|
||||
|
||||
// I2Chandle = I2C_open(Board_I2C, &I2Cparams);
|
||||
I2C_transfer(I2Chandle, &i2cTrans);
|
||||
// I2C_close(I2Chandle);
|
||||
}
|
||||
|
||||
|
||||
static void I2CRead(uint8_t addr){
|
||||
for(int i=0 ; i<I2CBufSize ; i++){
|
||||
I2CtxBuf[i] = 0;
|
||||
I2CrxBuf[i] = 0;
|
||||
}
|
||||
|
||||
I2CtxBuf[0] = ReadMem;
|
||||
I2CtxBuf[1] = addr;
|
||||
|
||||
// I2Chandle = I2C_open(Board_I2C, &I2Cparams);
|
||||
I2C_transfer(I2Chandle, &i2cTrans);
|
||||
// I2C_close(I2Chandle);
|
||||
}
|
||||
|
||||
|
||||
#endif // ELITE_I2C
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
|
||||
#ifndef ELITENOTIFY
|
||||
#define ELITENOTIFY
|
||||
|
||||
/**
|
||||
* notify data buffer.
|
||||
* the length equals to the characteristic 4 which value is 20 bytes.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define NOT_BUF_OFFSET_INIT 8
|
||||
|
||||
/**
|
||||
* the index where to start insert data into buffer.
|
||||
* start from 6.
|
||||
*/
|
||||
static size_t not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
|
||||
static uint32_t not_time_stamp;
|
||||
|
||||
static uint8_t NotifyCurrent[4] = {0};
|
||||
static uint8_t NotifyVolt[4] = {0};
|
||||
static uint8_t NotifyImpedance[4] = {0};
|
||||
|
||||
/**
|
||||
* counter of notify send.
|
||||
*/
|
||||
static uint32_t notify_counter = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Notify format
|
||||
*
|
||||
*
|
||||
| | 1 | 2 | 3 |
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
|
||||
-----------------------------------------------------------------
|
||||
| header |
|
||||
| current |
|
||||
| voltage |
|
||||
| impedance |
|
||||
| time stamp |
|
||||
| cycle number |
|
||||
|
||||
cycle number
|
||||
for cyclic voltammetry use, we save it as channel number.
|
||||
0xFF
|
||||
|
||||
* header = device ID
|
||||
* I = current (0.001nA), V = voltage (mV),
|
||||
* Z = impedance (k ohm), T = time (ms)
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
|
||||
#ifndef ELITE_SPI
|
||||
#define ELITE_SPI
|
||||
|
||||
/*
|
||||
* Read SPI example in
|
||||
* http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_14_02_22/
|
||||
* exports/tirtos_full_2_14_02_22/docs/doxygen/html/_s_p_i_c_c26_x_x_d_m_a_8h.html
|
||||
*/
|
||||
|
||||
#include <Board.h>
|
||||
#include <ti/drivers/SPI.h>
|
||||
#include <ti/drivers/dma/UDMACC26XX.h>
|
||||
#include <ti/drivers/spi/SPICC26XXDMA.h>
|
||||
#include "Elite_PIN.h"
|
||||
|
||||
/* application use SPI parameters and buffers */
|
||||
#define SPI_LED_SIZE 28
|
||||
#define SPI_DAC_SIZE 3
|
||||
#define SPI_ADC_SIZE 4
|
||||
|
||||
static uint16_t spi_LEDtxbuf[SPI_LED_SIZE] = {0};
|
||||
static uint16_t spi_LEDrxbuf[SPI_LED_SIZE] = {0};
|
||||
|
||||
static uint8_t spi_DACtxbuf[SPI_DAC_SIZE] = {0};
|
||||
static uint8_t spi_rxbuf[SPI_DAC_SIZE] = {0};
|
||||
|
||||
static uint8_t spi_ADC_txbuf[SPI_ADC_SIZE] = {0};
|
||||
static uint8_t spi_ADC_rxbuf[SPI_ADC_SIZE] = {0};
|
||||
|
||||
/* system use SPI parameters */
|
||||
static SPI_Handle spiHandle0 = NULL; // SPI0 = LED
|
||||
static SPI_Handle spiHandle1 = NULL; // SPI1 = ADC +DAC
|
||||
static SPI_Params spiParams0;
|
||||
static SPI_Params spiParams1;
|
||||
static SPI_Transaction LED_transaction;
|
||||
static SPI_Transaction ADC_DAC_transaction;
|
||||
|
||||
|
||||
static void Elite_SPI_init(){
|
||||
SPI_init();
|
||||
SPI_Params_init(&spiParams0);
|
||||
spiParams0.bitRate = 2000; // 12k
|
||||
spiParams0.mode = SPI_MASTER;
|
||||
spiParams0.dataSize = 16;
|
||||
spiParams0.frameFormat = SPI_POL0_PHA1;
|
||||
spiHandle0 = SPI_open(Board_SPI0, &spiParams0); // LED SPI
|
||||
|
||||
SPI_Params_init(&spiParams1);
|
||||
spiParams1.bitRate = 1000000; // 1M
|
||||
spiParams1.mode = SPI_MASTER;
|
||||
spiParams1.dataSize = 8;
|
||||
spiParams1.frameFormat = SPI_POL0_PHA1;
|
||||
spiHandle1 = SPI_open(Board_SPI1, &spiParams1); // ADC DAC SPI
|
||||
}
|
||||
|
||||
static void LED_SPI(uint8_t length, uint16_t *spi_txbuf, uint16_t *spi_rxbuf) {
|
||||
LED_transaction.count = length;
|
||||
LED_transaction.txBuf = spi_txbuf;
|
||||
LED_transaction.rxBuf = spi_rxbuf;
|
||||
|
||||
SPI_transfer(spiHandle0, &LED_transaction);
|
||||
}
|
||||
|
||||
static void ADC_SPI(uint8_t length, uint8_t *spi_txbuf, uint8_t *spi_rxbuf) {
|
||||
ADC_DAC_transaction.count = length;
|
||||
ADC_DAC_transaction.txBuf = spi_txbuf;
|
||||
ADC_DAC_transaction.rxBuf = spi_rxbuf;
|
||||
|
||||
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
|
||||
PIN_setOutputValue(pin_handle, ADC_CS, 0); // ADC_CS LOW
|
||||
SPI_transfer(spiHandle1, &ADC_DAC_transaction);
|
||||
PIN_setOutputValue(pin_handle, ADC_CS, 1); // ADC_CS HIGH
|
||||
|
||||
}
|
||||
|
||||
static void DAC_SPI(uint8_t length, uint8_t *spi_txbuf, uint8_t *spi_rxbuf) {
|
||||
ADC_DAC_transaction.count = length;
|
||||
ADC_DAC_transaction.txBuf = spi_txbuf;
|
||||
ADC_DAC_transaction.rxBuf = spi_rxbuf;
|
||||
|
||||
PIN_setOutputValue(pin_handle, ADC_CS, 1); // ADC_CS HIGH
|
||||
PIN_setOutputValue(pin_handle, DAC_CS, 0); // DAC_CS LOW
|
||||
SPI_transfer(spiHandle1, &ADC_DAC_transaction);
|
||||
PIN_setOutputValue(pin_handle, DAC_CS, 1); // DAC_CS HIGH
|
||||
}
|
||||
|
||||
#endif // ELITE_SPI
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
|
||||
#ifndef Elite_PIN
|
||||
#define Elite_PIN
|
||||
|
||||
#include <ti/drivers/pin/PINCC26XX.h>
|
||||
#include <Board.h>
|
||||
#include <ti/drivers/PIN.h>
|
||||
|
||||
/* SPI Board */
|
||||
#define Board_SPI0_MISO PIN_UNASSIGNED
|
||||
#define Board_SPI0_MOSI IOID_1
|
||||
#define Board_SPI0_CLK IOID_0
|
||||
#define Board_SPI0_CS PIN_UNASSIGNED
|
||||
|
||||
#define Board_SPI1_MISO IOID_3
|
||||
#define Board_SPI1_MOSI IOID_2
|
||||
#define Board_SPI1_CLK IOID_4
|
||||
#define Board_SPI1_CS PIN_UNASSIGNED
|
||||
|
||||
#define ADC_CS IOID_8
|
||||
#define DAC_CS IOID_9
|
||||
|
||||
#define Turnon100R IOID_5
|
||||
#define Turnon10K IOID_6
|
||||
|
||||
/* I2C */
|
||||
#ifdef ELITE_VERSION_1_4
|
||||
#define Board_I2C0_SCL0 IOID_7
|
||||
#define Board_I2C0_SDA0 IOID_1
|
||||
#endif
|
||||
|
||||
#define shutdown_6994 IOID_10
|
||||
#define switch_on IOID_11
|
||||
#define enable_10v IOID_12
|
||||
#define enable_5v IOID_13
|
||||
|
||||
PIN_Handle pin_handle;
|
||||
static PIN_State ZM_rst;
|
||||
|
||||
const PIN_Config BLE_IO[] = {
|
||||
//
|
||||
ADC_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // ADC_CS
|
||||
DAC_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // DAC_CS
|
||||
|
||||
enable_10v | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // 10V_enable
|
||||
enable_5v | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // 5V_enable
|
||||
shutdown_6994 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // turn off power
|
||||
Turnon100R | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
Turnon10K | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
switch_on | PIN_INPUT_EN | PIN_PULLDOWN,
|
||||
Turnon100R | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
Turnon10K | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
|
||||
|
||||
PIN_TERMINATE
|
||||
};
|
||||
|
||||
/*!
|
||||
* @def BOOSTXL_CC2650MA_SPIName
|
||||
* @brief Enum of SPI names on the CC2650 Booster Pack
|
||||
*/
|
||||
typedef enum BOOSTXL_CC2650MA_SPIName {
|
||||
BOOSTXL_CC2650MA_SPI0 = 0,
|
||||
BOOSTXL_CC2650MA_SPI1 = 1,
|
||||
|
||||
BOOSTXL_CC2650MA_SPICOUNT
|
||||
} BOOSTXL_CC2650MA_SPIName;
|
||||
|
||||
/*
|
||||
* ========================== SPI DMA begin ===================================
|
||||
*/
|
||||
/* Place into subsections to allow the TI linker to remove items properly */
|
||||
#if defined(__TI_COMPILER_VERSION__)
|
||||
#pragma DATA_SECTION(SPI_config, ".const:SPI_config")
|
||||
#pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
|
||||
#endif
|
||||
|
||||
/* Include drivers */
|
||||
#include <ti/drivers/spi/SPICC26XXDMA.h>
|
||||
|
||||
/* SPI objects */
|
||||
SPICC26XXDMA_Object spiCC26XXDMAObjects[BOOSTXL_CC2650MA_SPICOUNT];
|
||||
|
||||
/* SPI configuration structure, describing which pins are to be used */
|
||||
const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[BOOSTXL_CC2650MA_SPICOUNT] = {
|
||||
{
|
||||
.baseAddr = SSI0_BASE,
|
||||
.intNum = INT_SSI0_COMB,
|
||||
.intPriority = ~0,
|
||||
.swiPriority = 0,
|
||||
.powerMngrId = PowerCC26XX_PERIPH_SSI0,
|
||||
.defaultTxBufValue = 0,
|
||||
.rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
|
||||
.txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
|
||||
.mosiPin = Board_SPI0_MOSI,
|
||||
.misoPin = Board_SPI0_MISO,
|
||||
.clkPin = Board_SPI0_CLK,
|
||||
.csnPin = Board_SPI0_CS
|
||||
},
|
||||
{
|
||||
.baseAddr = SSI1_BASE,
|
||||
.intNum = INT_SSI1_COMB,
|
||||
.intPriority = ~0,
|
||||
.swiPriority = 0,
|
||||
.powerMngrId = PowerCC26XX_PERIPH_SSI1,
|
||||
.defaultTxBufValue = 0,
|
||||
.rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
|
||||
.txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
|
||||
.mosiPin = Board_SPI1_MOSI,
|
||||
.misoPin = Board_SPI1_MISO,
|
||||
.clkPin = Board_SPI1_CLK,
|
||||
.csnPin = Board_SPI1_CS
|
||||
},
|
||||
};
|
||||
|
||||
/* SPI configuration structure */
|
||||
const SPI_Config SPI_config[] = {
|
||||
{
|
||||
.fxnTablePtr = &SPICC26XXDMA_fxnTable,
|
||||
.object = &spiCC26XXDMAObjects[0],
|
||||
.hwAttrs = &spiCC26XXDMAHWAttrs[0]
|
||||
},
|
||||
{
|
||||
.fxnTablePtr = &SPICC26XXDMA_fxnTable,
|
||||
.object = &spiCC26XXDMAObjects[1],
|
||||
.hwAttrs = &spiCC26XXDMAHWAttrs[1]
|
||||
},
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
/*
|
||||
* ========================== SPI DMA end =====================================
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* ============================= I2C Begin=====================================
|
||||
*/
|
||||
|
||||
#ifdef ELITE_VERSION_1_4
|
||||
|
||||
/* Generic I2C instance identifiers */
|
||||
#define Board_I2C CC2650_MA_I2C0
|
||||
/*!
|
||||
* @def CC2650_LAUNCHXL_I2CName
|
||||
* @brief Enum of I2C names on the CC2650 dev board
|
||||
*/
|
||||
typedef enum CC2650_MA_I2CName {
|
||||
CC2650_MA_I2C0 = 0,
|
||||
|
||||
CC2650_MA_I2CCOUNT
|
||||
} CC2650_MA_I2CName;
|
||||
|
||||
/* Place into subsections to allow the TI linker to remove items properly */
|
||||
#if defined(__TI_COMPILER_VERSION__)
|
||||
#pragma DATA_SECTION(I2C_config, ".const:I2C_config")
|
||||
#pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
|
||||
#endif
|
||||
|
||||
/* Include drivers */
|
||||
#include <ti/drivers/i2c/I2CCC26XX.h>
|
||||
|
||||
/* I2C objects */
|
||||
I2CCC26XX_Object i2cCC26xxObjects[CC2650_MA_I2CCOUNT];
|
||||
|
||||
/* I2C configuration structure, describing which pins are to be used */
|
||||
const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_MA_I2CCOUNT] = {
|
||||
{
|
||||
.baseAddr = I2C0_BASE,
|
||||
.powerMngrId = PowerCC26XX_PERIPH_I2C0,
|
||||
.intNum = INT_I2C_IRQ,
|
||||
.intPriority = ~0,
|
||||
.swiPriority = 0,
|
||||
.sdaPin = Board_I2C0_SDA0,
|
||||
.sclPin = Board_I2C0_SCL0,
|
||||
}
|
||||
};
|
||||
|
||||
/* I2C configuration structure */
|
||||
const I2C_Config I2C_config[] = {
|
||||
{
|
||||
.fxnTablePtr = &I2CCC26XX_fxnTable,
|
||||
.object = &i2cCC26xxObjects[0],
|
||||
.hwAttrs = &i2cCC26xxHWAttrs[0]
|
||||
},
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
/*
|
||||
* ========================== I2C end =========================================
|
||||
*/
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+1226
File diff suppressed because it is too large
Load Diff
+305
@@ -0,0 +1,305 @@
|
||||
|
||||
#ifndef HEADSTAGE_H
|
||||
#error "headstage.h not include"
|
||||
#endif
|
||||
|
||||
#ifdef HEADSTAGE_H_H
|
||||
#error "headstage_*.h has be included"
|
||||
#endif
|
||||
|
||||
#ifndef HEADSTAGE_TNI_H
|
||||
#define HEADSTAGE_H_H
|
||||
#define HEADSTAGE_TNI_H
|
||||
|
||||
// product information
|
||||
#define DEVICE_NAME "Elite-v0.1"
|
||||
#define MAJOR_PRODUCT_NUMBER 0
|
||||
#define MINOR_PRODUCT_NUMBER 1
|
||||
#define MAJOR_VERSION_NUMBER 0
|
||||
#define MINOR_VERSION_NUMBER 1
|
||||
|
||||
// header
|
||||
#include <ti/drivers/PIN.h>
|
||||
#include "board.h"
|
||||
|
||||
/*============
|
||||
==== SPI ====
|
||||
===========*/
|
||||
|
||||
/* application use SPI parameters and buffers */
|
||||
|
||||
#define SPI_BUFFER_SIZE 16
|
||||
|
||||
static uint8_t spi_txbuf[SPI_BUFFER_SIZE] = {0};
|
||||
static uint8_t spi_rxbuf[SPI_BUFFER_SIZE] = {0};
|
||||
|
||||
/*=============================
|
||||
==== headstage variable ====
|
||||
============================*/
|
||||
|
||||
PIN_Handle pin_handle;
|
||||
static PIN_State DBS_rst;
|
||||
|
||||
// DBS reset pin
|
||||
|
||||
const PIN_Config BLE_IO[] = {
|
||||
//
|
||||
IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
IOID_2 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
IOID_3 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
IOID_13 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_TERMINATE //
|
||||
};
|
||||
|
||||
/**
|
||||
* ADC clock switch signal.
|
||||
*/
|
||||
static bool adc_clock_signal = FALSE;
|
||||
|
||||
/*=======================================
|
||||
==== headstage function declaration ====
|
||||
======================================*/
|
||||
|
||||
static void headstage_tni_update_instruction_callback(uint8_t ins_type, uint8_t ins_op, uint8_t ins_len, uint8_t *ins);
|
||||
|
||||
/*=============================
|
||||
==== ramp data generating ====
|
||||
============================*/
|
||||
|
||||
static uint16_t ramp_data_counter = 0;
|
||||
|
||||
static void create_ramp(uint8_t *buff) {
|
||||
buff[0] = 0b10110000 | (0b00001111 & (uint8_t)(ramp_data_counter >> 6));
|
||||
buff[1] = (uint8_t)(ramp_data_counter << 2);
|
||||
ramp_data_counter += 1;
|
||||
}
|
||||
|
||||
/*=======================================
|
||||
==== headstage function implemented ====
|
||||
======================================*/
|
||||
|
||||
/**
|
||||
* change channel value to little endian
|
||||
*/
|
||||
static uint8 encode_channel(uint8 channel) {
|
||||
return 0x0F & (((channel & 0b1000) >> 3) | //
|
||||
((channel & 0b0100) >> 1) | //
|
||||
((channel & 0b0010) << 1) | //
|
||||
((channel & 0b0001) << 3));
|
||||
}
|
||||
|
||||
static void headstage_init() {
|
||||
set_update_instruction_callback(headstage_tni_update_instruction_callback);
|
||||
|
||||
// initialize the DBS reset pin
|
||||
pin_handle = PIN_open(&DBS_rst, BLE_IO);
|
||||
PIN_setOutputValue(pin_handle, IOID_9, 1);
|
||||
PIN_setOutputValue(pin_handle, IOID_2, 0);
|
||||
PIN_setOutputValue(pin_handle, IOID_3, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* change the recording clock bit in the instruction buffer.
|
||||
*/
|
||||
static void update_ins_rec_clock(uint8_t *buf, bool adc_clock_signal) {
|
||||
buf[3] = (buf[3] & 0b11110000) | ((adc_clock_signal) ? 0b1000 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* change the recording channel bit in the instruction buffer.
|
||||
*/
|
||||
static void update_ins_rec_channel(uint8_t *buf, uint8 channel) {
|
||||
buf[1] = (buf[1] & 0b00001111) | (encode_channel(channel) << 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* change the stimulation enable bit in the instruction buffer.
|
||||
*/
|
||||
static void update_ins_sti_enable(uint8_t *buf, bool enable) {
|
||||
buf[1] = (buf[1] & 0b11111101) | ((enable) ? 0b10 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* change the stimulating channel bit in the instruction buffer.
|
||||
*/
|
||||
static void update_ins_sti_channel(uint8_t *buf, uint8 sti_chp, uint8 sti_chn) {
|
||||
buf[2] = (buf[2] & 0b11110000) | encode_channel(sti_chp);
|
||||
buf[3] = (buf[3] & 0b00001111) | (encode_channel(sti_chn) << 4);
|
||||
}
|
||||
|
||||
static void update_ins_buffer() {
|
||||
uint8 header = 0b10100000;
|
||||
uint8 amp_gain = (INSTRUCTION.amp_gain & 0b11) << 3;
|
||||
uint8 amp_lbf = INSTRUCTION.amp_low_band_freq & 0b111;
|
||||
uint8 channel = 0; // should be call update_ins_channel to modify this value
|
||||
uint8 chopper = (INSTRUCTION.chopper) ? 0b00001000 : 0;
|
||||
uint8 fast_settle = (INSTRUCTION.fast_settle) ? 0b00000100 : 0;
|
||||
uint8 sti_enable = (INSTRUCTION.work_mode != STI_MODE_DISABLE) ? 0b00000010 : 0;
|
||||
uint8 sti_volt_l = (INSTRUCTION.sti_volt & 0b11111) >> 4;
|
||||
uint8 sti_volt_h = (INSTRUCTION.sti_volt & 0b01111) << 4;
|
||||
uint8 sti_chp = INSTRUCTION.sti_channel_pmos & 0b1111;
|
||||
uint8 sti_chn = (INSTRUCTION.sti_channel_nmos & 0b1111) << 4;
|
||||
uint8 clk_signal = 0; // should be call update_ins_clock to modify this value
|
||||
|
||||
spi_txbuf[0] = header | amp_gain | amp_lbf;
|
||||
spi_txbuf[1] = channel | chopper | fast_settle | sti_enable | sti_volt_l;
|
||||
spi_txbuf[2] = sti_volt_h | sti_chp;
|
||||
spi_txbuf[3] = sti_chn | clk_signal;
|
||||
}
|
||||
|
||||
static bool update_ins_rec_buffer() {
|
||||
adc_clock_signal = (adc_clock_signal) ? FALSE : TRUE; // switch adc_clock
|
||||
update_ins_rec_clock(spi_txbuf, adc_clock_signal);
|
||||
|
||||
if (adc_clock_signal) {
|
||||
// change to next channel
|
||||
|
||||
if (next_active_channel()) {
|
||||
update_ins_rec_channel(spi_txbuf, channel_pointer);
|
||||
} else {
|
||||
// no channel active
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the instruction content for SPI buffer, which is depended on the
|
||||
* work_mode. Expend the remind instruction according to the base instruction
|
||||
* which allocated at the beginning 4 bytes of the SPI buffer.
|
||||
*
|
||||
* ========= ===========
|
||||
* work_mode ins pattern
|
||||
* ========= ===========
|
||||
* POS, NEG 4 F D 0
|
||||
* P2N, N2P 4 4' F D
|
||||
* AWF not impl
|
||||
* ========= ===========
|
||||
*
|
||||
* pattern *4*
|
||||
* stimulation instruction.
|
||||
*
|
||||
* pattern *F*
|
||||
* set pmos channel to 0xF, release the remain voltage in the capacitance.
|
||||
*
|
||||
* pattern *D*
|
||||
* disable stimulation
|
||||
*
|
||||
* pattern *0*
|
||||
* nop.
|
||||
*
|
||||
* @param: buf: pointer of the SPI buffer.
|
||||
*/
|
||||
static void update_ins_sti_buffer() {
|
||||
switch (INSTRUCTION.work_mode) {
|
||||
case STI_MODE_POS:
|
||||
case STI_MODE_NEG:
|
||||
// copy [4:7]
|
||||
spi_txbuf[4] = spi_txbuf[0];
|
||||
spi_txbuf[5] = spi_txbuf[1];
|
||||
spi_txbuf[6] = spi_txbuf[2];
|
||||
spi_txbuf[7] = spi_txbuf[3];
|
||||
// copy [8:B]
|
||||
spi_txbuf[8] = spi_txbuf[0];
|
||||
spi_txbuf[9] = spi_txbuf[1];
|
||||
spi_txbuf[10] = spi_txbuf[2];
|
||||
spi_txbuf[11] = spi_txbuf[3];
|
||||
// reset [C:F]
|
||||
spi_txbuf[12] = 0;
|
||||
spi_txbuf[13] = 0;
|
||||
spi_txbuf[14] = 0;
|
||||
spi_txbuf[15] = 0;
|
||||
// change content
|
||||
update_ins_sti_enable(spi_txbuf, TRUE);
|
||||
// ins buf [4:7]
|
||||
update_ins_sti_enable(spi_txbuf + 4, TRUE);
|
||||
update_ins_sti_channel(spi_txbuf + 4, 0xF, INSTRUCTION.sti_channel_pmos);
|
||||
// ins buf [8:B]
|
||||
update_ins_sti_enable(spi_txbuf + 8, FALSE);
|
||||
break;
|
||||
case STI_MODE_P2N:
|
||||
case STI_MODE_N2P:
|
||||
// copy [4:7]
|
||||
spi_txbuf[4] = spi_txbuf[0];
|
||||
spi_txbuf[5] = spi_txbuf[1];
|
||||
spi_txbuf[6] = spi_txbuf[2];
|
||||
spi_txbuf[7] = spi_txbuf[3];
|
||||
// copy [8:B]
|
||||
spi_txbuf[8] = spi_txbuf[0];
|
||||
spi_txbuf[9] = spi_txbuf[1];
|
||||
spi_txbuf[10] = spi_txbuf[2];
|
||||
spi_txbuf[11] = spi_txbuf[3];
|
||||
// copy [C:F]
|
||||
spi_txbuf[12] = spi_txbuf[0];
|
||||
spi_txbuf[13] = spi_txbuf[1];
|
||||
spi_txbuf[14] = spi_txbuf[2];
|
||||
spi_txbuf[15] = spi_txbuf[3];
|
||||
// change content
|
||||
update_ins_sti_enable(spi_txbuf + 0, TRUE);
|
||||
update_ins_sti_channel(spi_txbuf + 0, INSTRUCTION.sti_channel_pmos, INSTRUCTION.sti_channel_nmos);
|
||||
// ins buf [4:7]
|
||||
update_ins_sti_enable(spi_txbuf + 4, TRUE);
|
||||
update_ins_sti_channel(spi_txbuf + 4, INSTRUCTION.sti_channel_nmos, INSTRUCTION.sti_channel_pmos);
|
||||
// ins buf [8:B]
|
||||
update_ins_sti_enable(spi_txbuf + 8, TRUE);
|
||||
update_ins_sti_channel(spi_txbuf + 8, 0xF, INSTRUCTION.sti_channel_nmos);
|
||||
// ins buf [C:F]
|
||||
update_ins_sti_enable(spi_txbuf + 12, FALSE);
|
||||
break;
|
||||
case STI_MODE_AWF:
|
||||
// XXX define the voltage change
|
||||
break;
|
||||
default:
|
||||
// do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void headstage_tni_update_instruction_callback(uint8_t ins_type, uint8_t ins_op, uint8_t ins_len, uint8_t *ins) {
|
||||
switch (ins_type) {
|
||||
case INS_TYPE_VIS: {
|
||||
// reset
|
||||
case VIS_RST:
|
||||
// reset. reset all variable
|
||||
adc_clock_signal = FALSE;
|
||||
memset(spi_txbuf, 0, SPI_BUFFER_SIZE);
|
||||
break;
|
||||
|
||||
// interrupt
|
||||
case VIS_INT:
|
||||
// stop. reset channel table
|
||||
ramp_data_counter = 0;
|
||||
memset(spi_txbuf, 0, SPI_BUFFER_SIZE);
|
||||
break;
|
||||
}
|
||||
case INS_TYPE_RIS:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t *spi_transact_rec_instruction() {
|
||||
if (IS_REC_MODE(INSTRUCTION.work_mode)) {
|
||||
PIN_setOutputValue(pin_handle, IOID_13, 1); // DBS_P2S turn on
|
||||
headstage_spi_transaction(SPI_BUFFER_SIZE, spi_txbuf, spi_rxbuf);
|
||||
PIN_setOutputValue(pin_handle, IOID_13, 0); // DBS_P2S turn off
|
||||
|
||||
} else if (IS_ARM_MODE(INSTRUCTION.work_mode) && !adc_clock_signal) {
|
||||
create_ramp(spi_rxbuf);
|
||||
}
|
||||
|
||||
if (adc_clock_signal) {
|
||||
return NULL;
|
||||
} else {
|
||||
return spi_rxbuf;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t *spi_transact_sti_instruction() {
|
||||
headstage_spi_transaction(16, spi_txbuf, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
+1075
File diff suppressed because it is too large
Load Diff
@@ -136,7 +136,7 @@ PIN_Handle radCtrlHandle;
|
||||
|
||||
extern void AssertHandler(uint8 assertCause, uint8 assertSubcause);
|
||||
|
||||
extern Display_Handle dispHandle;
|
||||
//extern Display_Handle dispHandle;
|
||||
|
||||
/*******************************************************************************
|
||||
* @fn Main
|
||||
@@ -252,47 +252,47 @@ int main()
|
||||
void AssertHandler(uint8 assertCause, uint8 assertSubcause)
|
||||
{
|
||||
// Open the display if the app has not already done so
|
||||
if ( !dispHandle )
|
||||
{
|
||||
dispHandle = Display_open(Display_Type_LCD, NULL);
|
||||
}
|
||||
// if ( !dispHandle )
|
||||
// {
|
||||
// dispHandle = Display_open(Display_Type_LCD, NULL);
|
||||
// }
|
||||
|
||||
|
||||
Display_print0(dispHandle, 0, 0, ">>>STACK ASSERT");
|
||||
// Display_print0(dispHandle, 0, 0, ">>>STACK ASSERT");
|
||||
|
||||
// check the assert cause
|
||||
switch (assertCause)
|
||||
{
|
||||
case HAL_ASSERT_CAUSE_OUT_OF_MEMORY:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> OUT OF MEMORY!");
|
||||
break;
|
||||
|
||||
case HAL_ASSERT_CAUSE_INTERNAL_ERROR:
|
||||
// check the subcause
|
||||
if (assertSubcause == HAL_ASSERT_SUBCAUSE_FW_INERNAL_ERROR)
|
||||
{
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> INTERNAL FW ERROR!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> INTERNAL ERROR!");
|
||||
}
|
||||
break;
|
||||
|
||||
case HAL_ASSERT_CAUSE_ICALL_ABORT:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> ICALL ABORT!");
|
||||
HAL_ASSERT_SPINLOCK;
|
||||
break;
|
||||
|
||||
default:
|
||||
Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
Display_print0(dispHandle, 2, 0, ">> DEFAULT SPINLOCK!");
|
||||
HAL_ASSERT_SPINLOCK;
|
||||
}
|
||||
// switch (assertCause)
|
||||
// {
|
||||
// case HAL_ASSERT_CAUSE_OUT_OF_MEMORY:
|
||||
// Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
// Display_print0(dispHandle, 2, 0, ">> OUT OF MEMORY!");
|
||||
// break;
|
||||
//
|
||||
// case HAL_ASSERT_CAUSE_INTERNAL_ERROR:
|
||||
// // check the subcause
|
||||
// if (assertSubcause == HAL_ASSERT_SUBCAUSE_FW_INERNAL_ERROR)
|
||||
// {
|
||||
// Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
// Display_print0(dispHandle, 2, 0, ">> INTERNAL FW ERROR!");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
// Display_print0(dispHandle, 2, 0, ">> INTERNAL ERROR!");
|
||||
// }
|
||||
// break;
|
||||
//
|
||||
// case HAL_ASSERT_CAUSE_ICALL_ABORT:
|
||||
// Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
// Display_print0(dispHandle, 2, 0, ">> ICALL ABORT!");
|
||||
// HAL_ASSERT_SPINLOCK;
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// Display_print0(dispHandle, 0, 0, "***ERROR***");
|
||||
// Display_print0(dispHandle, 2, 0, ">> DEFAULT SPINLOCK!");
|
||||
// HAL_ASSERT_SPINLOCK;
|
||||
// }
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+534
-840
File diff suppressed because it is too large
Load Diff
-1366
File diff suppressed because it is too large
Load Diff
-1352
File diff suppressed because it is too large
Load Diff
Executable → Regular
Executable → Regular
+263
-422
@@ -9,7 +9,7 @@
|
||||
Target Device: CC2650, CC2640
|
||||
|
||||
******************************************************************************
|
||||
|
||||
|
||||
Copyright (c) 2010-2018, Texas Instruments Incorporated
|
||||
All rights reserved.
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "bcomdef.h"
|
||||
#include "osal.h"
|
||||
#include "linkdb.h"
|
||||
#include "att.h"
|
||||
#include "bcomdef.h"
|
||||
#include "gapbondmgr.h"
|
||||
#include "gatt.h"
|
||||
#include "gatt_uuid.h"
|
||||
#include "gattservapp.h"
|
||||
#include "gapbondmgr.h"
|
||||
#include "linkdb.h"
|
||||
#include "osal.h"
|
||||
|
||||
#include "simple_gatt_profile.h"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
#define SERVAPP_NUM_ATTR_SUPPORTED 17
|
||||
#define SERVAPP_NUM_ATTR_SUPPORTED 17
|
||||
|
||||
/*********************************************************************
|
||||
* TYPEDEFS
|
||||
@@ -79,40 +79,22 @@
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
// Simple GATT Profile Service UUID: 0xFFF0
|
||||
CONST uint8 simpleProfileServUUID[ATT_BT_UUID_SIZE] =
|
||||
{
|
||||
LO_UINT16(SIMPLEPROFILE_SERV_UUID), HI_UINT16(SIMPLEPROFILE_SERV_UUID)
|
||||
};
|
||||
CONST uint8 simpleProfileServUUID[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_SERV_UUID), HI_UINT16(SIMPLEPROFILE_SERV_UUID)};
|
||||
|
||||
// Characteristic 1 UUID: 0xFFF1
|
||||
CONST uint8 simpleProfilechar1UUID[ATT_BT_UUID_SIZE] =
|
||||
{
|
||||
LO_UINT16(SIMPLEPROFILE_CHAR1_UUID), HI_UINT16(SIMPLEPROFILE_CHAR1_UUID)
|
||||
};
|
||||
CONST uint8 simpleProfilechar1UUID[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_CHAR1_UUID), HI_UINT16(SIMPLEPROFILE_CHAR1_UUID)};
|
||||
|
||||
// Characteristic 2 UUID: 0xFFF2
|
||||
CONST uint8 simpleProfilechar2UUID[ATT_BT_UUID_SIZE] =
|
||||
{
|
||||
LO_UINT16(SIMPLEPROFILE_CHAR2_UUID), HI_UINT16(SIMPLEPROFILE_CHAR2_UUID)
|
||||
};
|
||||
CONST uint8 simpleProfilechar2UUID[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_CHAR2_UUID), HI_UINT16(SIMPLEPROFILE_CHAR2_UUID)};
|
||||
|
||||
// Characteristic 3 UUID: 0xFFF3
|
||||
CONST uint8 simpleProfilechar3UUID[ATT_BT_UUID_SIZE] =
|
||||
{
|
||||
LO_UINT16(SIMPLEPROFILE_CHAR3_UUID), HI_UINT16(SIMPLEPROFILE_CHAR3_UUID)
|
||||
};
|
||||
CONST uint8 simpleProfilechar3UUID[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_CHAR3_UUID), HI_UINT16(SIMPLEPROFILE_CHAR3_UUID)};
|
||||
|
||||
// Characteristic 4 UUID: 0xFFF4
|
||||
CONST uint8 simpleProfilechar4UUID[ATT_BT_UUID_SIZE] =
|
||||
{
|
||||
LO_UINT16(SIMPLEPROFILE_CHAR4_UUID), HI_UINT16(SIMPLEPROFILE_CHAR4_UUID)
|
||||
};
|
||||
CONST uint8 simpleProfilechar4UUID[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_CHAR4_UUID), HI_UINT16(SIMPLEPROFILE_CHAR4_UUID)};
|
||||
|
||||
// Characteristic 5 UUID: 0xFFF5
|
||||
CONST uint8 simpleProfilechar5UUID[ATT_BT_UUID_SIZE] =
|
||||
{
|
||||
LO_UINT16(SIMPLEPROFILE_CHAR5_UUID), HI_UINT16(SIMPLEPROFILE_CHAR5_UUID)
|
||||
};
|
||||
CONST uint8 simpleProfilechar5UUID[ATT_BT_UUID_SIZE] = {LO_UINT16(SIMPLEPROFILE_CHAR5_UUID), HI_UINT16(SIMPLEPROFILE_CHAR5_UUID)};
|
||||
|
||||
/*********************************************************************
|
||||
* EXTERNAL VARIABLES
|
||||
@@ -133,29 +115,27 @@ static simpleProfileCBs_t *simpleProfile_AppCBs = NULL;
|
||||
*/
|
||||
|
||||
// Simple Profile Service attribute
|
||||
static CONST gattAttrType_t simpleProfileService = { ATT_BT_UUID_SIZE, simpleProfileServUUID };
|
||||
|
||||
static CONST gattAttrType_t simpleProfileService = {ATT_BT_UUID_SIZE, simpleProfileServUUID};
|
||||
|
||||
// Simple Profile Characteristic 1 Properties
|
||||
static uint8 simpleProfileChar1Props = GATT_PROP_READ | GATT_PROP_WRITE;
|
||||
static uint8 simpleProfileChar1Props = GATT_PROP_READ;
|
||||
|
||||
// Characteristic 1 Value
|
||||
static uint8 simpleProfileChar1 = 0;
|
||||
#define SIMPLEPROFILE_CHAR1_LEN 20
|
||||
static uint8 simpleProfileChar1[SIMPLEPROFILE_CHAR1_LEN] = {0};
|
||||
|
||||
// Simple Profile Characteristic 1 User Description
|
||||
static uint8 simpleProfileChar1UserDesp[17] = "Characteristic 1";
|
||||
|
||||
|
||||
// Simple Profile Characteristic 2 Properties
|
||||
static uint8 simpleProfileChar2Props = GATT_PROP_READ;
|
||||
|
||||
// Characteristic 2 Value
|
||||
static uint8 simpleProfileChar2 = 0;
|
||||
static uint8 simpleProfileChar2[SIMPLEPROFILE_CHAR2_LEN] = {0};
|
||||
|
||||
// Simple Profile Characteristic 2 User Description
|
||||
static uint8 simpleProfileChar2UserDesp[17] = "Characteristic 2";
|
||||
|
||||
|
||||
// Simple Profile Characteristic 3 Properties
|
||||
static uint8 simpleProfileChar3Props = GATT_PROP_WRITE;
|
||||
|
||||
@@ -165,7 +145,6 @@ static uint8 simpleProfileChar3[SIMPLEPROFILE_CHAR3_LEN] = {0};
|
||||
// Simple Profile Characteristic 3 User Description
|
||||
static uint8 simpleProfileChar3UserDesp[17] = "Characteristic 3";
|
||||
|
||||
|
||||
// Simple Profile Characteristic 4 Properties
|
||||
static uint8 simpleProfileChar4Props = GATT_PROP_NOTIFY;
|
||||
|
||||
@@ -181,12 +160,11 @@ static gattCharCfg_t *simpleProfileChar4Config;
|
||||
// Simple Profile Characteristic 4 User Description
|
||||
static uint8 simpleProfileChar4UserDesp[17] = "Characteristic 4";
|
||||
|
||||
|
||||
// Simple Profile Characteristic 5 Properties
|
||||
static uint8 simpleProfileChar5Props = GATT_PROP_READ;
|
||||
|
||||
// Characteristic 5 Value
|
||||
static uint8 simpleProfileChar5[SIMPLEPROFILE_CHAR5_LEN] = { 0, 0, 0, 0, 0 };
|
||||
static uint8 simpleProfileChar5[SIMPLEPROFILE_CHAR5_LEN] = {0, 0, 0, 0, 0};
|
||||
|
||||
// Simple Profile Characteristic 5 User Description
|
||||
static uint8 simpleProfileChar5UserDesp[17] = "Characteristic 5";
|
||||
@@ -195,157 +173,69 @@ static uint8 simpleProfileChar5UserDesp[17] = "Characteristic 5";
|
||||
* Profile Attributes - Table
|
||||
*/
|
||||
|
||||
static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] =
|
||||
{
|
||||
// Simple Profile Service
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */
|
||||
GATT_PERMIT_READ, /* permissions */
|
||||
0, /* handle */
|
||||
(uint8 *)&simpleProfileService /* pValue */
|
||||
},
|
||||
static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] = {
|
||||
// Simple Profile Service
|
||||
{
|
||||
{ATT_BT_UUID_SIZE, primaryServiceUUID}, /* type */
|
||||
GATT_PERMIT_READ, /* permissions */
|
||||
0, /* handle */
|
||||
(uint8 *)&simpleProfileService /* pValue */
|
||||
},
|
||||
|
||||
// Characteristic 1 Declaration
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, characterUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
&simpleProfileChar1Props
|
||||
},
|
||||
{{ATT_BT_UUID_SIZE, characterUUID}, GATT_PERMIT_READ, 0, &simpleProfileChar1Props},
|
||||
|
||||
// Characteristic Value 1
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, simpleProfilechar1UUID },
|
||||
GATT_PERMIT_READ | GATT_PERMIT_WRITE,
|
||||
0,
|
||||
&simpleProfileChar1
|
||||
},
|
||||
// Characteristic Value 1
|
||||
{{ATT_BT_UUID_SIZE, simpleProfilechar1UUID}, GATT_PERMIT_READ, 0, simpleProfileChar1},
|
||||
|
||||
// Characteristic 1 User Description
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, charUserDescUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
simpleProfileChar1UserDesp
|
||||
},
|
||||
// Characteristic 1 User Description
|
||||
{{ATT_BT_UUID_SIZE, charUserDescUUID}, GATT_PERMIT_READ, 0, simpleProfileChar1UserDesp},
|
||||
|
||||
// Characteristic 2 Declaration
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, characterUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
&simpleProfileChar2Props
|
||||
},
|
||||
{{ATT_BT_UUID_SIZE, characterUUID}, GATT_PERMIT_READ, 0, &simpleProfileChar2Props},
|
||||
|
||||
// Characteristic Value 2
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, simpleProfilechar2UUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
&simpleProfileChar2
|
||||
},
|
||||
// Characteristic Value 2
|
||||
{{ATT_BT_UUID_SIZE, simpleProfilechar2UUID}, GATT_PERMIT_READ, 0, simpleProfileChar2},
|
||||
|
||||
// Characteristic 2 User Description
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, charUserDescUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
simpleProfileChar2UserDesp
|
||||
},
|
||||
// Characteristic 2 User Description
|
||||
{{ATT_BT_UUID_SIZE, charUserDescUUID}, GATT_PERMIT_READ, 0, simpleProfileChar2UserDesp},
|
||||
|
||||
// Characteristic 3 Declaration
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, characterUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
&simpleProfileChar3Props
|
||||
},
|
||||
{{ATT_BT_UUID_SIZE, characterUUID}, GATT_PERMIT_READ, 0, &simpleProfileChar3Props},
|
||||
|
||||
// Characteristic Value 3
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, simpleProfilechar3UUID },
|
||||
GATT_PERMIT_WRITE,
|
||||
0,
|
||||
simpleProfileChar3
|
||||
},
|
||||
// Characteristic Value 3
|
||||
{{ATT_BT_UUID_SIZE, simpleProfilechar3UUID}, GATT_PERMIT_WRITE, 0, simpleProfileChar3},
|
||||
|
||||
// Characteristic 3 User Description
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, charUserDescUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
simpleProfileChar3UserDesp
|
||||
},
|
||||
// Characteristic 3 User Description
|
||||
{{ATT_BT_UUID_SIZE, charUserDescUUID}, GATT_PERMIT_READ, 0, simpleProfileChar3UserDesp},
|
||||
|
||||
// Characteristic 4 Declaration
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, characterUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
&simpleProfileChar4Props
|
||||
},
|
||||
{{ATT_BT_UUID_SIZE, characterUUID}, GATT_PERMIT_READ, 0, &simpleProfileChar4Props},
|
||||
|
||||
// Characteristic Value 4
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, simpleProfilechar4UUID },
|
||||
0,
|
||||
0,
|
||||
simpleProfileChar4
|
||||
},
|
||||
// Characteristic Value 4
|
||||
{{ATT_BT_UUID_SIZE, simpleProfilechar4UUID}, 0, 0, simpleProfileChar4},
|
||||
|
||||
// Characteristic 4 configuration
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, clientCharCfgUUID },
|
||||
GATT_PERMIT_READ | GATT_PERMIT_WRITE,
|
||||
0,
|
||||
(uint8 *)&simpleProfileChar4Config
|
||||
},
|
||||
// Characteristic 4 configuration
|
||||
{{ATT_BT_UUID_SIZE, clientCharCfgUUID}, GATT_PERMIT_READ | GATT_PERMIT_WRITE, 0, (uint8 *)&simpleProfileChar4Config},
|
||||
|
||||
// Characteristic 4 User Description
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, charUserDescUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
simpleProfileChar4UserDesp
|
||||
},
|
||||
// Characteristic 4 User Description
|
||||
{{ATT_BT_UUID_SIZE, charUserDescUUID}, GATT_PERMIT_READ, 0, simpleProfileChar4UserDesp},
|
||||
|
||||
// Characteristic 5 Declaration
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, characterUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
&simpleProfileChar5Props
|
||||
},
|
||||
{{ATT_BT_UUID_SIZE, characterUUID}, GATT_PERMIT_READ, 0, &simpleProfileChar5Props},
|
||||
|
||||
// Characteristic Value 5
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, simpleProfilechar5UUID },
|
||||
GATT_PERMIT_AUTHEN_READ,
|
||||
0,
|
||||
simpleProfileChar5
|
||||
},
|
||||
// Characteristic Value 5
|
||||
{{ATT_BT_UUID_SIZE, simpleProfilechar5UUID}, GATT_PERMIT_AUTHEN_READ, 0, simpleProfileChar5},
|
||||
|
||||
// Characteristic 5 User Description
|
||||
{
|
||||
{ ATT_BT_UUID_SIZE, charUserDescUUID },
|
||||
GATT_PERMIT_READ,
|
||||
0,
|
||||
simpleProfileChar5UserDesp
|
||||
},
|
||||
// Characteristic 5 User Description
|
||||
{{ATT_BT_UUID_SIZE, charUserDescUUID}, GATT_PERMIT_READ, 0, simpleProfileChar5UserDesp},
|
||||
};
|
||||
|
||||
/*********************************************************************
|
||||
* LOCAL FUNCTIONS
|
||||
*/
|
||||
static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle,
|
||||
gattAttribute_t *pAttr,
|
||||
uint8_t *pValue, uint16_t *pLen,
|
||||
uint16_t offset, uint16_t maxLen,
|
||||
uint8_t method);
|
||||
static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle,
|
||||
gattAttribute_t *pAttr,
|
||||
uint8_t *pValue, uint16_t len,
|
||||
uint16_t offset, uint8_t method);
|
||||
static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle, gattAttribute_t *pAttr, uint8_t *pValue, uint16_t *pLen, uint16_t offset, uint16_t maxLen, uint8_t method);
|
||||
static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle, gattAttribute_t *pAttr, uint8_t *pValue, uint16_t len, uint16_t offset, uint8_t method);
|
||||
|
||||
/*********************************************************************
|
||||
* PROFILE CALLBACKS
|
||||
@@ -359,11 +249,10 @@ static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle,
|
||||
// pfnAuthorizeAttrCB to check a client's authorization prior to calling
|
||||
// pfnReadAttrCB or pfnWriteAttrCB, so no checks for authorization need to be
|
||||
// made within these functions.
|
||||
CONST gattServiceCBs_t simpleProfileCBs =
|
||||
{
|
||||
simpleProfile_ReadAttrCB, // Read callback function pointer
|
||||
simpleProfile_WriteAttrCB, // Write callback function pointer
|
||||
NULL // Authorization callback function pointer
|
||||
CONST gattServiceCBs_t simpleProfileCBs = {
|
||||
simpleProfile_ReadAttrCB, // Read callback function pointer
|
||||
simpleProfile_WriteAttrCB, // Write callback function pointer
|
||||
NULL // Authorization callback function pointer
|
||||
};
|
||||
|
||||
/*********************************************************************
|
||||
@@ -381,35 +270,26 @@ CONST gattServiceCBs_t simpleProfileCBs =
|
||||
*
|
||||
* @return Success or Failure
|
||||
*/
|
||||
bStatus_t SimpleProfile_AddService( uint32 services )
|
||||
{
|
||||
uint8 status;
|
||||
bStatus_t SimpleProfile_AddService(uint32 services) {
|
||||
uint8 status;
|
||||
|
||||
// Allocate Client Characteristic Configuration table
|
||||
simpleProfileChar4Config = (gattCharCfg_t *)ICall_malloc( sizeof(gattCharCfg_t) *
|
||||
linkDBNumConns );
|
||||
if ( simpleProfileChar4Config == NULL )
|
||||
{
|
||||
return ( bleMemAllocError );
|
||||
}
|
||||
// Allocate Client Characteristic Configuration table
|
||||
simpleProfileChar4Config = (gattCharCfg_t *)ICall_malloc(sizeof(gattCharCfg_t) * linkDBNumConns);
|
||||
if (simpleProfileChar4Config == NULL) {
|
||||
return (bleMemAllocError);
|
||||
}
|
||||
|
||||
// Initialize Client Characteristic Configuration attributes
|
||||
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, simpleProfileChar4Config );
|
||||
// Initialize Client Characteristic Configuration attributes
|
||||
GATTServApp_InitCharCfg(INVALID_CONNHANDLE, simpleProfileChar4Config);
|
||||
|
||||
if ( services & SIMPLEPROFILE_SERVICE )
|
||||
{
|
||||
// Register GATT attribute list and CBs with GATT Server App
|
||||
status = GATTServApp_RegisterService( simpleProfileAttrTbl,
|
||||
GATT_NUM_ATTRS( simpleProfileAttrTbl ),
|
||||
GATT_MAX_ENCRYPT_KEY_SIZE,
|
||||
&simpleProfileCBs );
|
||||
}
|
||||
else
|
||||
{
|
||||
status = SUCCESS;
|
||||
}
|
||||
if (services & SIMPLEPROFILE_SERVICE) {
|
||||
// Register GATT attribute list and CBs with GATT Server App
|
||||
status = GATTServApp_RegisterService(simpleProfileAttrTbl, GATT_NUM_ATTRS(simpleProfileAttrTbl), GATT_MAX_ENCRYPT_KEY_SIZE, &simpleProfileCBs);
|
||||
} else {
|
||||
status = SUCCESS;
|
||||
}
|
||||
|
||||
return ( status );
|
||||
return (status);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -422,18 +302,14 @@ bStatus_t SimpleProfile_AddService( uint32 services )
|
||||
*
|
||||
* @return SUCCESS or bleAlreadyInRequestedMode
|
||||
*/
|
||||
bStatus_t SimpleProfile_RegisterAppCBs( simpleProfileCBs_t *appCallbacks )
|
||||
{
|
||||
if ( appCallbacks )
|
||||
{
|
||||
simpleProfile_AppCBs = appCallbacks;
|
||||
bStatus_t SimpleProfile_RegisterAppCBs(simpleProfileCBs_t *appCallbacks) {
|
||||
if (appCallbacks) {
|
||||
simpleProfile_AppCBs = appCallbacks;
|
||||
|
||||
return ( SUCCESS );
|
||||
}
|
||||
else
|
||||
{
|
||||
return ( bleAlreadyInRequestedMode );
|
||||
}
|
||||
return (SUCCESS);
|
||||
} else {
|
||||
return (bleAlreadyInRequestedMode);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -450,77 +326,61 @@ bStatus_t SimpleProfile_RegisterAppCBs( simpleProfileCBs_t *appCallbacks )
|
||||
*
|
||||
* @return bStatus_t
|
||||
*/
|
||||
bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value )
|
||||
{
|
||||
bStatus_t ret = SUCCESS;
|
||||
switch ( param )
|
||||
{
|
||||
bStatus_t SimpleProfile_SetParameter(uint8 param, uint8 len, void *value) {
|
||||
bStatus_t ret = SUCCESS;
|
||||
switch (param) {
|
||||
case SIMPLEPROFILE_CHAR1:
|
||||
if ( len == sizeof ( uint8 ) )
|
||||
{
|
||||
simpleProfileChar1 = *((uint8*)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
if (len <= SIMPLEPROFILE_CHAR1_LEN) {
|
||||
memcpy(simpleProfileChar1, value, len);
|
||||
// simpleProfileChar1 = *((uint8*)value);
|
||||
} else {
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR2:
|
||||
if ( len == sizeof ( uint8 ) )
|
||||
{
|
||||
simpleProfileChar2 = *((uint8*)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
if (len <= SIMPLEPROFILE_CHAR2_LEN) {
|
||||
memcpy(simpleProfileChar2, value, len);
|
||||
// simpleProfileChar2 = *((uint8*)value);
|
||||
|
||||
} else {
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR3:
|
||||
if ( len <= SIMPLEPROFILE_CHAR3_LEN )
|
||||
{
|
||||
memcpy(simpleProfileChar3,value,len);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
if (len <= SIMPLEPROFILE_CHAR3_LEN) {
|
||||
memcpy(simpleProfileChar3, value, len);
|
||||
} else {
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR4:
|
||||
if ( len <= SIMPLEPROFILE_CHAR4_LEN )
|
||||
{
|
||||
memcpy( simpleProfileChar4, value, len);
|
||||
if (len <= SIMPLEPROFILE_CHAR4_LEN) {
|
||||
memcpy(simpleProfileChar4, value, len);
|
||||
|
||||
// See if Notification has been enabled
|
||||
GATTServApp_ProcessCharCfg( simpleProfileChar4Config, simpleProfileChar4, FALSE,
|
||||
simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ),
|
||||
INVALID_TASK_ID, simpleProfile_ReadAttrCB );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
// See if Notification has been enabled
|
||||
GATTServApp_ProcessCharCfg(simpleProfileChar4Config, simpleProfileChar4, FALSE, simpleProfileAttrTbl, GATT_NUM_ATTRS(simpleProfileAttrTbl), INVALID_TASK_ID, simpleProfile_ReadAttrCB);
|
||||
} else {
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR5:
|
||||
if ( len == SIMPLEPROFILE_CHAR5_LEN )
|
||||
{
|
||||
VOID memcpy( simpleProfileChar5, value, SIMPLEPROFILE_CHAR5_LEN );
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
if (len == SIMPLEPROFILE_CHAR5_LEN) {
|
||||
VOID memcpy(simpleProfileChar5, value, SIMPLEPROFILE_CHAR5_LEN);
|
||||
} else {
|
||||
ret = bleInvalidRange;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = INVALIDPARAMETER;
|
||||
break;
|
||||
}
|
||||
ret = INVALIDPARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
return ( ret );
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -536,37 +396,37 @@ bStatus_t SimpleProfile_SetParameter( uint8 param, uint8 len, void *value )
|
||||
*
|
||||
* @return bStatus_t
|
||||
*/
|
||||
bStatus_t SimpleProfile_GetParameter( uint8 param, void *value )
|
||||
{
|
||||
bStatus_t ret = SUCCESS;
|
||||
switch ( param )
|
||||
{
|
||||
bStatus_t SimpleProfile_GetParameter(uint8 param, void *value) {
|
||||
bStatus_t ret = SUCCESS;
|
||||
switch (param) {
|
||||
case SIMPLEPROFILE_CHAR1:
|
||||
*((uint8*)value) = simpleProfileChar1;
|
||||
break;
|
||||
memcpy(value, simpleProfileChar1, SIMPLEPROFILE_CHAR1_LEN);
|
||||
// *((uint8*)value) = simpleProfileChar1;
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR2:
|
||||
*((uint8*)value) = simpleProfileChar2;
|
||||
break;
|
||||
memcpy(value, simpleProfileChar2, SIMPLEPROFILE_CHAR2_LEN);
|
||||
// *((uint8*)value) = simpleProfileChar2;
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR3:
|
||||
memcpy( value, simpleProfileChar3, SIMPLEPROFILE_CHAR3_LEN );
|
||||
break;
|
||||
memcpy(value, simpleProfileChar3, SIMPLEPROFILE_CHAR3_LEN);
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR4:
|
||||
memcpy( value, simpleProfileChar4, SIMPLEPROFILE_CHAR4_LEN );
|
||||
break;
|
||||
memcpy(value, simpleProfileChar4, SIMPLEPROFILE_CHAR4_LEN);
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR5:
|
||||
VOID memcpy( value, simpleProfileChar5, SIMPLEPROFILE_CHAR5_LEN );
|
||||
break;
|
||||
VOID memcpy(value, simpleProfileChar5, SIMPLEPROFILE_CHAR5_LEN);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = INVALIDPARAMETER;
|
||||
break;
|
||||
}
|
||||
ret = INVALIDPARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
return ( ret );
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -584,65 +444,62 @@ bStatus_t SimpleProfile_GetParameter( uint8 param, void *value )
|
||||
*
|
||||
* @return SUCCESS, blePending or Failure
|
||||
*/
|
||||
static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle,
|
||||
gattAttribute_t *pAttr,
|
||||
uint8_t *pValue, uint16_t *pLen,
|
||||
uint16_t offset, uint16_t maxLen,
|
||||
uint8_t method)
|
||||
{
|
||||
bStatus_t status = SUCCESS;
|
||||
static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle, gattAttribute_t *pAttr, uint8_t *pValue, uint16_t *pLen, uint16_t offset, uint16_t maxLen, uint8_t method) {
|
||||
bStatus_t status = SUCCESS;
|
||||
|
||||
// Make sure it's not a blob operation (no attributes in the profile are long)
|
||||
if ( offset > 0 )
|
||||
{
|
||||
return ( ATT_ERR_ATTR_NOT_LONG );
|
||||
}
|
||||
|
||||
if ( pAttr->type.len == ATT_BT_UUID_SIZE )
|
||||
{
|
||||
// 16-bit UUID
|
||||
uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]);
|
||||
switch ( uuid )
|
||||
{
|
||||
// No need for "GATT_SERVICE_UUID" or "GATT_CLIENT_CHAR_CFG_UUID" cases;
|
||||
// gattserverapp handles those reads
|
||||
|
||||
// characteristics 1 and 2 have read permissions
|
||||
// characteritisc 3 does not have read permissions; therefore it is not
|
||||
// included here
|
||||
// characteristic 4 does not have read permissions, but because it
|
||||
// can be sent as a notification, it is included here
|
||||
case SIMPLEPROFILE_CHAR1_UUID:
|
||||
case SIMPLEPROFILE_CHAR2_UUID:
|
||||
|
||||
*pLen = 1;
|
||||
pValue[0] = *pAttr->pValue;
|
||||
break;
|
||||
case SIMPLEPROFILE_CHAR4_UUID:
|
||||
*pLen = SIMPLEPROFILE_CHAR4_LEN;
|
||||
VOID memcpy( pValue, pAttr->pValue, SIMPLEPROFILE_CHAR4_LEN );
|
||||
break;
|
||||
case SIMPLEPROFILE_CHAR5_UUID:
|
||||
|
||||
*pLen = SIMPLEPROFILE_CHAR5_LEN;
|
||||
VOID memcpy( pValue, pAttr->pValue, SIMPLEPROFILE_CHAR5_LEN );
|
||||
break;
|
||||
|
||||
default:
|
||||
// Should never get here! (characteristics 3 and 4 do not have read permissions)
|
||||
*pLen = 0;
|
||||
status = ATT_ERR_ATTR_NOT_FOUND;
|
||||
break;
|
||||
// Make sure it's not a blob operation (no attributes in the profile are long)
|
||||
if (offset > 0) {
|
||||
return (ATT_ERR_ATTR_NOT_LONG);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 128-bit UUID
|
||||
*pLen = 0;
|
||||
status = ATT_ERR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
return ( status );
|
||||
if (pAttr->type.len == ATT_BT_UUID_SIZE) {
|
||||
// 16-bit UUID
|
||||
uint16 uuid = BUILD_UINT16(pAttr->type.uuid[0], pAttr->type.uuid[1]);
|
||||
switch (uuid) {
|
||||
// No need for "GATT_SERVICE_UUID" or "GATT_CLIENT_CHAR_CFG_UUID" cases;
|
||||
// gattserverapp handles those reads
|
||||
|
||||
// characteristics 1 and 2 have read permissions
|
||||
// characteritisc 3 does not have read permissions; therefore it is not
|
||||
// included here
|
||||
// characteristic 4 does not have read permissions, but because it
|
||||
// can be sent as a notification, it is included here
|
||||
case SIMPLEPROFILE_CHAR1_UUID:
|
||||
*pLen = SIMPLEPROFILE_CHAR1_LEN;
|
||||
VOID memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR1_LEN);
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR2_UUID:
|
||||
// *pLen = 1;
|
||||
// pValue[0] = *pAttr->pValue;
|
||||
|
||||
*pLen = SIMPLEPROFILE_CHAR2_LEN;
|
||||
VOID memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR2_LEN);
|
||||
break;
|
||||
|
||||
case SIMPLEPROFILE_CHAR4_UUID:
|
||||
*pLen = SIMPLEPROFILE_CHAR4_LEN;
|
||||
VOID memcpy(pValue, pAttr->pValue, SIMPLEPROFILE_CHAR4_LEN);
|
||||
break;
|
||||
// case SIMPLEPROFILE_CHAR5_UUID:
|
||||
|
||||
// *pLen = SIMPLEPROFILE_CHAR5_LEN;
|
||||
// VOID memcpy( pValue, pAttr->pValue, SIMPLEPROFILE_CHAR5_LEN );
|
||||
// break;
|
||||
|
||||
default:
|
||||
// Should never get here! (characteristics 3 and 4 do not have read permissions)
|
||||
*pLen = 0;
|
||||
status = ATT_ERR_ATTR_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// 128-bit UUID
|
||||
*pLen = 0;
|
||||
status = ATT_ERR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
return (status);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@@ -659,99 +516,83 @@ static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle,
|
||||
*
|
||||
* @return SUCCESS, blePending or Failure
|
||||
*/
|
||||
static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle,
|
||||
gattAttribute_t *pAttr,
|
||||
uint8_t *pValue, uint16_t len,
|
||||
uint16_t offset, uint8_t method)
|
||||
{
|
||||
bStatus_t status = SUCCESS;
|
||||
uint8 notifyApp = 0xFF;
|
||||
static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle, gattAttribute_t *pAttr, uint8_t *pValue, uint16_t len, uint16_t offset, uint8_t method) {
|
||||
bStatus_t status = SUCCESS;
|
||||
uint8 notifyApp = 0xFF;
|
||||
|
||||
if ( pAttr->type.len == ATT_BT_UUID_SIZE )
|
||||
{
|
||||
// 16-bit UUID
|
||||
uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]);
|
||||
switch ( uuid )
|
||||
{
|
||||
case SIMPLEPROFILE_CHAR1_UUID:
|
||||
|
||||
//Validate the value
|
||||
// Make sure it's not a blob oper
|
||||
if ( offset == 0 )
|
||||
{
|
||||
if ( len != 1 )
|
||||
{
|
||||
status = ATT_ERR_INVALID_VALUE_SIZE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
status = ATT_ERR_ATTR_NOT_LONG;
|
||||
}
|
||||
|
||||
//Write the value
|
||||
if ( status == SUCCESS )
|
||||
{
|
||||
uint8 *pCurValue = (uint8 *)pAttr->pValue;
|
||||
*pCurValue = pValue[0];
|
||||
|
||||
if( pAttr->pValue == &simpleProfileChar1 )
|
||||
{
|
||||
notifyApp = SIMPLEPROFILE_CHAR1;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case SIMPLEPROFILE_CHAR3_UUID:
|
||||
if ( offset == 0 )
|
||||
{
|
||||
if ( len > SIMPLEPROFILE_CHAR3_LEN )
|
||||
if (pAttr->type.len == ATT_BT_UUID_SIZE) {
|
||||
// 16-bit UUID
|
||||
uint16 uuid = BUILD_UINT16(pAttr->type.uuid[0], pAttr->type.uuid[1]);
|
||||
switch (uuid) {
|
||||
// Validate the value
|
||||
// Make sure it's not a blob oper
|
||||
/*
|
||||
if ( offset == 0 )
|
||||
{
|
||||
status = ATT_ERR_INVALID_VALUE_SIZE;
|
||||
if ( len != 1 )
|
||||
{
|
||||
status = ATT_ERR_INVALID_VALUE_SIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
status = ATT_ERR_ATTR_NOT_LONG;
|
||||
}
|
||||
|
||||
//Write the value
|
||||
if ( status == SUCCESS )
|
||||
{
|
||||
// Copy pValue into the variable we point to from the attribute table.
|
||||
memcpy(pAttr->pValue + offset, pValue, len);
|
||||
|
||||
if( pAttr->pValue == simpleProfileChar3 )
|
||||
else
|
||||
{
|
||||
notifyApp = SIMPLEPROFILE_CHAR3;
|
||||
status = ATT_ERR_ATTR_NOT_LONG;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case GATT_CLIENT_CHAR_CFG_UUID:
|
||||
status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,
|
||||
offset, GATT_CLIENT_CFG_NOTIFY );
|
||||
break;
|
||||
//Write the value
|
||||
if ( status == SUCCESS )
|
||||
{
|
||||
uint8 *pCurValue = (uint8 *)pAttr->pValue;
|
||||
*pCurValue = pValue[0];
|
||||
|
||||
default:
|
||||
// Should never get here! (characteristics 2 and 4 do not have write permissions)
|
||||
status = ATT_ERR_ATTR_NOT_FOUND;
|
||||
break;
|
||||
if( pAttr->pValue == &simpleProfileChar1 )
|
||||
{
|
||||
notifyApp = SIMPLEPROFILE_CHAR1;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
*/
|
||||
case SIMPLEPROFILE_CHAR3_UUID:
|
||||
if (offset == 0) {
|
||||
if (len > SIMPLEPROFILE_CHAR3_LEN) {
|
||||
status = ATT_ERR_INVALID_VALUE_SIZE;
|
||||
}
|
||||
} else {
|
||||
status = ATT_ERR_ATTR_NOT_LONG;
|
||||
}
|
||||
|
||||
// Write the value
|
||||
if (status == SUCCESS) {
|
||||
// Copy pValue into the variable we point to from the attribute table.
|
||||
memcpy(pAttr->pValue + offset, pValue, len);
|
||||
memset(pAttr->pValue + len, 0, SIMPLEPROFILE_CHAR3_LEN - len);
|
||||
|
||||
if (pAttr->pValue == simpleProfileChar3) {
|
||||
notifyApp = SIMPLEPROFILE_CHAR3;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case GATT_CLIENT_CHAR_CFG_UUID:
|
||||
status = GATTServApp_ProcessCCCWriteReq(connHandle, pAttr, pValue, len, offset, GATT_CLIENT_CFG_NOTIFY);
|
||||
break;
|
||||
default:
|
||||
// Should never get here! (characteristics 2 and 4 do not have write permissions)
|
||||
status = ATT_ERR_ATTR_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// 128-bit UUID
|
||||
status = ATT_ERR_INVALID_HANDLE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 128-bit UUID
|
||||
status = ATT_ERR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
// If a characteristic value changed then callback function to notify application of change
|
||||
if ( (notifyApp != 0xFF ) && simpleProfile_AppCBs && simpleProfile_AppCBs->pfnSimpleProfileChange )
|
||||
{
|
||||
simpleProfile_AppCBs->pfnSimpleProfileChange( notifyApp );
|
||||
}
|
||||
// If a characteristic value changed then callback function to notify application of change
|
||||
if ((notifyApp != 0xFF) && simpleProfile_AppCBs && simpleProfile_AppCBs->pfnSimpleProfileChange) {
|
||||
simpleProfile_AppCBs->pfnSimpleProfileChange(notifyApp);
|
||||
}
|
||||
|
||||
return ( status );
|
||||
return (status);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
@@ -334,7 +334,7 @@ bStatus_t SimpleProfile_RegisterAppCB(simpleProfileWrite_t writeCB,
|
||||
* @param value - pointer to data to write. This is dependent on
|
||||
* the parameter ID and WILL be cast to the appropriate
|
||||
* data type (example: data type of uint16 will be cast to
|
||||
* uint16 pointer).
|
||||
* uint16 pointer).1
|
||||
*
|
||||
* @return bStatus_t
|
||||
*/
|
||||
|
||||
@@ -85,8 +85,9 @@ extern "C"
|
||||
|
||||
// Length of Characteristic 5 in bytes
|
||||
#define SIMPLEPROFILE_CHAR5_LEN 5
|
||||
#define SIMPLEPROFILE_CHAR4_LEN 8
|
||||
#define SIMPLEPROFILE_CHAR3_LEN 8
|
||||
#define SIMPLEPROFILE_CHAR4_LEN 20
|
||||
#define SIMPLEPROFILE_CHAR3_LEN 20
|
||||
#define SIMPLEPROFILE_CHAR2_LEN 20
|
||||
|
||||
/*********************************************************************
|
||||
* TYPEDEFS
|
||||
@@ -97,7 +98,7 @@ extern "C"
|
||||
* MACROS
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
/*********************************************************************c
|
||||
* Profile Callbacks
|
||||
*/
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user