Skip to content

Commit 6b3b750

Browse files
author
Sean Lyons
committed
Audio projects are building in CCS
1 parent f564ac9 commit 6b3b750

File tree

44 files changed

+295
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+295
-293
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Introduction
1414

15-
These examples and demos are for **TI SimpleLink CC26x2 SDK 1.60.00.43**
15+
These examples and demos are for **TI SimpleLink CC26x2 SDK 2.10.00.44**
1616

1717
This repository contains *Bluetooth®* 5 sample applications for
1818
Texas Instruments' SimpleLink CC2640R2 SDK. These examples have not been
@@ -170,7 +170,7 @@ Maintenace update
170170
* Bugfixes on i2secho example
171171

172172
### 1.60.00.00
173-
Initial offering of SimpleLink CC26x2 SDK 1.60.00.43 examples.
173+
Initial offering of SimpleLink CC26x2 SDK 2.10.00.44 examples.
174174
* Bidirectional Audio Demo (Central/Peripheral): now on BLE5-Stack
175175
* Created i2secho application that demonstrates audio sampling and playback
176176
with the CC3200AUDBOOST
@@ -194,7 +194,7 @@ location.
194194

195195
By default the SimpleLink CC26x2 SDK will install to:
196196

197-
C:\ti\simplelink_cc26x2_sdk_1_60_00_43
197+
C:\ti\simplelink_cc26x2_sdk_2_10_00_44
198198

199199
If the SimpleLink CC26x2 SDK must be installed to a different location, then
200200
see the [FAQ page](docs/faq.md) for IDE specific instructions for changing

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/central_bidirectional_audio/src/app/central_bidirectional_audio.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ static void CentralAudio_pairStateCb(uint16_t connHandle, uint8_t state,
309309
uint8_t status);
310310

311311
static void CentralAudio_keyChangeHandler(uint8 keys);
312+
313+
#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG)
312314
static void CentralAudio_clockHandler(UArg arg);
315+
#endif // PRIVACY_1_2_CFG
313316

314317
static uint8_t CentralAudio_enqueueMsg(uint8_t event, uint8_t status,
315318
uint8_t *pData);
@@ -409,7 +412,7 @@ static void CentralAudio_init(void)
409412
// Initialize internal data
410413
for (i = 0; i < MAX_NUM_BLE_CONNS; i++)
411414
{
412-
connList[i].connHandle = CONNHANDLE_INVALID;
415+
connList[i].connHandle = LINKDB_CONNHANDLE_INVALID;
413416
}
414417

415418
Board_initKeys(CentralAudio_keyChangeHandler);
@@ -868,7 +871,7 @@ static bool CentralAudio_alreadyConnected(uint8_t *addr)
868871
{
869872
for(uint8_t idx = 0; idx < MAX_NUM_BLE_CONNS; idx++)
870873
{
871-
if(connList[idx].connHandle != CONNHANDLE_INVALID &&
874+
if(connList[idx].connHandle != LINKDB_CONNHANDLE_INVALID &&
872875
(!memcmp(addr, connList[idx].addr, B_ADDR_LEN)))
873876
{
874877
return true;
@@ -1563,7 +1566,7 @@ static uint8_t CentralAudio_addConnInfo(uint16_t connHandle, uint8_t *pAddr)
15631566

15641567
for (i = 0; i < MAX_NUM_BLE_CONNS; i++)
15651568
{
1566-
if (connList[i].connHandle == CONNHANDLE_INVALID)
1569+
if (connList[i].connHandle == LINKDB_CONNHANDLE_INVALID)
15671570
{
15681571
// Found available entry to put a new connection info in
15691572
connList[i].connHandle = connHandle;
@@ -1595,7 +1598,7 @@ static uint8_t CentralAudio_removeConnInfo(uint16_t connHandle)
15951598
if (connList[i].connHandle == connHandle)
15961599
{
15971600
// Found the entry to mark as deleted
1598-
connList[i].connHandle = CONNHANDLE_INVALID;
1601+
connList[i].connHandle = LINKDB_CONNHANDLE_INVALID;
15991602
numConn--;
16001603

16011604
break;
@@ -1712,6 +1715,7 @@ static void CentralAudio_keyChangeHandler(uint8 keys)
17121715
CentralAudio_enqueueMsg(CA_EVT_KEY_CHANGE, keys, NULL);
17131716
}
17141717

1718+
#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG)
17151719
/*********************************************************************
17161720
* @fn CentralAudio_clockHandler
17171721
*
@@ -1738,6 +1742,7 @@ void CentralAudio_clockHandler(UArg arg)
17381742
break;
17391743
}
17401744
}
1745+
#endif // PRIVACY_1_2_CFG
17411746

17421747
/*********************************************************************
17431748
* @fn CentralAudio_enqueueMsg

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/central_bidirectional_audio/tirtos/ble_debug.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Defaults.common$.namedModule = true;
103103
/* Compile out all Assert's */
104104
//Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
105105
106-
/* Allow Mod_create() and Mod_construct() as well as delete() and destruct() */
106+
/* Allow Mod_create() and Mod_construct() but not delete() or destruct() */
107107
Defaults.common$.memoryPolicy = Types.DELETE_POLICY;
108108
109109
@@ -229,9 +229,6 @@ m3Hwi.resetVectorAddress = 0x0;
229229
/* Put interrupt vector at start of RAM so interrupts can be configured at runtime */
230230
m3Hwi.vectorTableAddress = 0x20000000;
231231
232-
/* CC2650 has 50 interrupts */
233-
m3Hwi.NUM_INTERRUPTS = 50;
234-
235232
236233
237234
/* ================ Idle configuration ================ */
@@ -565,7 +562,7 @@ var Diags = xdc.useModule('xdc.runtime.Diags');
565562
* within that module, disabling these statements yields
566563
* code savings.
567564
*/
568-
Semaphore.common$.diags_ASSERT = Diags.ALWAYS_OFF;
565+
569566

570567

571568
/* ================ Logging configuration ================ */
@@ -752,3 +749,6 @@ else if (HEAPMGR_CONFIG === 0 || HEAPMGR_CONFIG === 0x80)
752749
Program.global.HEAPMGR_SIZE = 0;
753750
}
754751
}
752+
753+
/* ================ GateMutexPri configuration ================ */
754+
var GateMutexPri = xdc.useModule('ti.sysbios.gates.GateMutexPri');

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/central_bidirectional_audio/tirtos/ble_release.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Defaults.common$.namedModule = false;
119119
//Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
120120
121121
/* Allow Mod_create() and Mod_construct() but not delete() or destruct() */
122-
Defaults.common$.memoryPolicy = Types.CREATE_POLICY;
122+
Defaults.common$.memoryPolicy = Types.DELETE_POLICY;
123123
124124
125125
@@ -244,9 +244,6 @@ m3Hwi.resetVectorAddress = 0x0;
244244
/* Put interrupt vector at start of RAM so interrupts can be configured at runtime */
245245
m3Hwi.vectorTableAddress = 0x20000000;
246246
247-
/* CC2650 has 50 interrupts */
248-
m3Hwi.NUM_INTERRUPTS = 50;
249-
250247
251248
252249
/* ================ Idle configuration ================ */
@@ -748,3 +745,6 @@ else if (HEAPMGR_CONFIG === 0 || HEAPMGR_CONFIG === 0x80)
748745
Program.global.HEAPMGR_SIZE = 0;
749746
}
750747
}
748+
749+
/* ================ GateMutexPri configuration ================ */
750+
var GateMutexPri = xdc.useModule('ti.sysbios.gates.GateMutexPri');

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/central_bidirectional_audio/tirtos/ccs/ble5_central_bidirectional_audio_cc26x2r1lp_app.projectspec

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
<!-- Project properties -->
2020
<property name="type" value="rtsc"/>
21-
<property name="products" value="com.ti.SIMPLELINK_CC26X2_SDK:1.60.00.43"/>
22-
<property name="xdcToolsVersion" value="3.50.04.43"/>
21+
<property name="products" value="com.ti.SIMPLELINK_CC26X2_SDK:2.10.00.44"/>
22+
<property name="xdcToolsVersion" value="3.50.05.12"/>
2323
<property name="target" value="ti.targets.arm.elf.M4F"/>
2424
<property name="platform" value="ti.platforms.simplelink:CC2642R1F"/>
2525
<property name="buildProfile" value="release"/>
@@ -59,17 +59,17 @@
5959
-I${SRC_COMMON_DIR}/osal/src/inc
6060
-I${SRC_COMMON_DIR}/services/src/saddr
6161
-I${SRC_COMMON_DIR}/services/src/sdata
62-
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2"
62+
-I${SRC_COMMON_DIR}/services/src/nv
63+
-I${SRC_COMMON_DIR}/services/src/nv/cc26xx
64+
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1"
6365
linkerBuildOptions="
64-
-l${WORKSPACE_LOC}/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library/FlashROM_Library/ble_r2.symbols
65-
-l${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib
66-
-l${SRC_BLE_DIR}/../../../kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x2.aem4f
67-
-l${SRC_BLE_DIR}/../../../source/ti/drivers/lib/drivers_cc26x2.aem4f
68-
-l${SRC_BLE_DIR}/../../../source/ti/drivers/rf/lib/rf_multiMode_cc26x2.aem4f
66+
-l${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1/driverlib/bin/ccs/driverlib.lib
67+
-l${SRC_BLE_DIR}/../../../kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x2_v1.aem4f
68+
-l${SRC_BLE_DIR}/../../../source/ti/drivers/lib/drivers_cc26x2_v1.aem4f
69+
-l${SRC_BLE_DIR}/../../../source/ti/drivers/rf/lib/rf_multiMode_cc26x2_v1.aem4f
6970
-l${SRC_BLE_DIR}/../../../source/ti/display/lib/display.aem4f
70-
-l${SRC_BLE_DIR}/../../../source/ti/mw/lcd/lib/lcd.aem4f
71-
-l${SRC_BLE_DIR}/../../../source/ti/grlib/lib/grlib.aem4f
72-
-l${SRC_BLE_DIR}/../../../source/ti/drivers/pdm/lib/pdm_cc26x2.aem4f
71+
-l${SRC_BLE_DIR}/../../../source/ti/grlib/lib/ccs/m4f/grlib.a
72+
-l${SRC_BLE_DIR}/../../../source/ti/drivers/pdm/lib/pdm_cc26x2_v1.aem4f
7373
7474
-l${WORKSPACE_LOC}/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library/FlashROM_Library/lib_linker.cmd
7575
-l${WORKSPACE_LOC}/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library/FlashROM_Library/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library.lib
@@ -117,17 +117,17 @@
117117
-I${SRC_COMMON_DIR}/osal/src/inc
118118
-I${SRC_COMMON_DIR}/services/src/saddr
119119
-I${SRC_COMMON_DIR}/services/src/sdata
120-
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2"
120+
-I${SRC_COMMON_DIR}/services/src/nv
121+
-I${SRC_COMMON_DIR}/services/src/nv/cc26xx
122+
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1"
121123
linkerBuildOptions="
122-
-l${WORKSPACE_LOC}/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library/FlashROM_Library/ble_r2.symbols
123-
-l${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2/driverlib/bin/ccs/driverlib.lib
124-
-l${SRC_BLE_DIR}/../../../kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x2.aem4f
125-
-l${SRC_BLE_DIR}/../../../source/ti/drivers/lib/drivers_cc26x2.aem4f
126-
-l${SRC_BLE_DIR}/../../../source/ti/drivers/rf/lib/rf_multiMode_cc26x2.aem4f
124+
-l${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1/driverlib/bin/ccs/driverlib.lib
125+
-l${SRC_BLE_DIR}/../../../kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x2_v1.aem4f
126+
-l${SRC_BLE_DIR}/../../../source/ti/drivers/lib/drivers_cc26x2_v1.aem4f
127+
-l${SRC_BLE_DIR}/../../../source/ti/drivers/rf/lib/rf_multiMode_cc26x2_v1.aem4f
127128
-l${SRC_BLE_DIR}/../../../source/ti/display/lib/display.aem4f
128-
-l${SRC_BLE_DIR}/../../../source/ti/mw/lcd/lib/lcd.aem4f
129-
-l${SRC_BLE_DIR}/../../../source/ti/grlib/lib/grlib.aem4f
130-
-l${SRC_BLE_DIR}/../../../source/ti/drivers/pdm/lib/pdm_cc26x2.aem4f
129+
-l${SRC_BLE_DIR}/../../../source/ti/grlib/lib/ccs/m4f/grlib.a
130+
-l${SRC_BLE_DIR}/../../../source/ti/drivers/pdm/lib/pdm_cc26x2_v1.aem4f
131131
132132
-l${WORKSPACE_LOC}/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library/FlashROM_Library/lib_linker.cmd
133133
-l${WORKSPACE_LOC}/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library/FlashROM_Library/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library.lib
@@ -200,6 +200,13 @@
200200
<file path="SRC_COMMON_DIR/hal/src/target/_common/TRNGCC26XX.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/TRNG" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
201201
<file path="SRC_COMMON_DIR/hal/src/target/_common/TRNGCC26XX.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/TRNG" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
202202

203+
<!-- Drivers/NV Folder -->
204+
<file path="SRC_BLE_DIR/services/src/nv/cc26xx/nvoctp.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/nv" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
205+
<file path="SRC_BLE_DIR/services/src/nv/cc26xx/nvoctp.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/nv" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
206+
<file path="SRC_BLE_DIR/services/src/nv/cc26xx/crc.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/nv" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
207+
<file path="SRC_BLE_DIR/services/src/nv/cc26xx/crc.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/nv" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
208+
<file path="SRC_BLE_DIR/services/src/nv/nvintf.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Drivers/nv" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
209+
203210
<!-- ICall Folder -->
204211
<file path="SRC_COMMON_DIR/icall/src/icall.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="ICall" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>
205212
<file path="SRC_COMMON_DIR/icall/src/inc/icall.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="ICall" createVirtualFolders="true" applicableConfigurations="FlashROM_Release, FlashROM_Debug"/>

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/central_bidirectional_audio/tirtos/ccs/ble5_central_bidirectional_audio_cc26x2r1lp_stack_library.projectspec

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
>
2323

2424
<!-- Project properties -->
25-
<property name="products" value="com.ti.rtsc.XDCtools:3.50.04.43;com.ti.SIMPLELINK_CC26X2_SDK:1.60.00.43"/>
25+
<property name="products" value="com.ti.rtsc.XDCtools:3.50.04.43;com.ti.SIMPLELINK_CC26X2_SDK:2.10.00.44"/>
2626
<property name="target" value="ti.targets.arm.elf.M4F"/>
2727
<property name="platform" value="ti.platforms.simplelink:CC2642R1F"/>
2828
<property name="buildProfile" value="release"/>
@@ -59,9 +59,9 @@
5959
-I${SRC_COMMON_DIR}/services/src/nv/cc26xx
6060
-I${SRC_COMMON_DIR}/services/src/nv
6161
-I${SRC_COMMON_DIR}/services/src/saddr
62-
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2
63-
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2/rf_patches
64-
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2/inc
62+
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1
63+
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1/rf_patches
64+
-I${SRC_BLE_DIR}/../../../source/ti/devices/cc13x2_cc26x2_v1/inc
6565
-I${SRC_BLE_DIR}/../../../source
6666
-I${SRC_BLE_DIR}/../../../kernel/tirtos/packages
6767
-I${XDC_CG_ROOT}/packages"
@@ -153,9 +153,9 @@
153153
<file path="SRC_COMMON_DIR/osal/src/inc/osal_timers.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="OSAL" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
154154

155155
<!-- ROM Folder -->
156-
<file path="SRC_BLE_DIR/rom/r2/common_rom_init.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="ROM" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
157-
<file path="SRC_BLE_DIR/rom/r2/rom_flash_jt.h" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="ROM" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
158-
<file path="SRC_BLE_DIR/rom/r2/rom_init.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="ROM" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
156+
<file path="SRC_BLE_DIR/rom/r2/common_rom_init.c" openOnCreation="" excludeFromBuild="true" action="link" targetDirectory="ROM" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
157+
<file path="SRC_BLE_DIR/rom/r2/rom_flash_jt.h" openOnCreation="" excludeFromBuild="true" action="link" targetDirectory="ROM" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
158+
<file path="SRC_BLE_DIR/rom/r2/rom_init.c" openOnCreation="" excludeFromBuild="true" action="link" targetDirectory="ROM" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
159159

160160
<!-- Startup Folder -->
161161
<file path="SRC_BLE_DIR/icall/stack/ble_user_config.c" openOnCreation="" excludeFromBuild="false" action="link" targetDirectory="Startup" createVirtualFolders="true" applicableConfigurations="FlashROM_Library"/>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
-DCC26X2
2+
-DCC26X2R1_LAUNCHXL
23
-DCC26XX
34
-DDeviceFamily_CC26X2
45
-DEXT_HAL_ASSERT
5-
-DFLASH_ROM_BUILD
6+
-DFLASH_ONLY_BUILD
67
-DICALL_EVENTS
78
-DICALL_JT
89
-DICALL_LITE
910
-DOSAL_CBTIMER_NUM_TASKS=1
10-
-DOSAL_SNV=2
1111
-DPOWER_SAVING
1212
-DSTACK_LIBRARY
1313
-DUSE_ICALL

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/central_bidirectional_audio/tirtos/iar/ble5_central_bidirectional_audio.custom_argvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<group active="true" name="SIMPLELINK_CC2640R2_SDK">
55
<variable>
66
<name>SIMPLELINK_CORE_SDK_INSTALL_DIR</name>
7-
<value>C:\ti\simplelink_cc26x2_sdk_1_60_00_43</value>
7+
<value>C:\ti\simplelink_cc26x2_sdk_2_10_00_44</value>
88
</variable>
99
<variable>
1010
<name>XDCROOT</name>
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
-DCC26X2
2+
-DCC26X2R1_LAUNCHXL
23
-DCC26XX
34
-DxDEBUG
45
-DxDEBUG_ENC
56
-DxDEBUG_GPIO
67
-DxDEBUG_SW_TRACE
78
-DDeviceFamily_CC26X2
89
-DEXT_HAL_ASSERT
9-
-DFLASH_ROM_BUILD
10+
-DFLASH_ONLY_BUILD
1011
-DICALL_EVENTS
1112
-DICALL_JT
1213
-DICALL_LITE
1314
-DOSAL_CBTIMER_NUM_TASKS=1
14-
-DOSAL_SNV=2
1515
-DPOWER_SAVING
1616
-DSTACK_LIBRARY
1717
-DUSE_ICALL

examples/rtos/CC26X2R1_LAUNCHXL/ble5apps/peripheral_bidirectional_audio/src/app/peripheral_bidirectional_audio.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ static void PeripheralAudio_processAdvEvent(paGapAdvEventData_t *pEventData);
366366
static void PeripheralAudio_processAppMsg(paEvt_t *pMsg);
367367
#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG)
368368
static void PeripheralAudio_updateRPA(void);
369-
#endif // PRIVACY_1_2_CFG
370369
static void PeripheralAudio_clockHandler(UArg arg);
370+
#endif // PRIVACY_1_2_CFG
371371
static void PeripheralAudio_passcodeCb(uint8_t *pDeviceAddr, uint16_t connHandle,
372372
uint8_t uiInputs, uint8_t uiOutputs,
373373
uint32_t numComparison);
@@ -533,7 +533,7 @@ static void PeripheralAudio_init(void)
533533
Board_initKeys(PeripheralAudio_keyChangeHandler);
534534

535535
// Initialize Connection List
536-
PeripheralAudio_clearConnListEntry(CONNHANDLE_ALL);
536+
PeripheralAudio_clearConnListEntry(LINKDB_CONNHANDLE_ALL);
537537

538538
//Initialize GAP layer for Peripheral role and register to receive GAP events
539539
GAP_DeviceInit(GAP_PROFILE_PERIPHERAL, selfEntity, addrMode, NULL);
@@ -693,10 +693,6 @@ static uint8_t PeripheralAudio_processStackMsg(ICall_Hdr *pMsg)
693693
PeripheralAudio_updatePHYStat(HCI_LE_SET_PHY, (uint8_t *)pMsg);
694694
break;
695695
}
696-
697-
case HCI_EXT_CONN_EVENT_NOTICE:
698-
default:
699-
break;
700696
}
701697
break;
702698
}
@@ -1187,7 +1183,6 @@ static void PeripheralAudio_updateRPA(void)
11871183
// complete event.
11881184
HCI_LE_ReadLocalResolvableAddressCmd(0, rpa);
11891185
}
1190-
#endif // PRIVACY_1_2_CFG
11911186

11921187
/*********************************************************************
11931188
* @fn PeripheralAudio_clockHandler
@@ -1211,6 +1206,7 @@ static void PeripheralAudio_clockHandler(UArg arg)
12111206
PeripheralAudio_enqueueMsg(PA_READ_RPA_EVT, 0, NULL);
12121207
}
12131208
}
1209+
#endif // PRIVACY_1_2_CFG
12141210

12151211
/*********************************************************************
12161212
* @fn PeripheralAudio_keyChangeHandler
@@ -1515,7 +1511,7 @@ static uint8_t PeripheralAudio_addConn(uint16_t connHandle)
15151511
// Try to find an available entry
15161512
for (i = 0; i < MAX_NUM_BLE_CONNS; i++)
15171513
{
1518-
if (connList[i].connHandle == CONNHANDLE_INVALID)
1514+
if (connList[i].connHandle == LINKDB_CONNHANDLE_INVALID)
15191515
{
15201516
// Found available entry to put a new connection info in
15211517
connList[i].connHandle = connHandle;
@@ -1559,15 +1555,15 @@ static uint8_t PeripheralAudio_getConnIndex(uint16_t connHandle)
15591555
* @brief Find index in the connected device list by connHandle
15601556
*
15611557
* @return SUCCESS if connHandle found valid index or bleInvalidRange
1562-
* if index wasn't found. CONNHANDLE_ALL will always succeed.
1558+
* if index wasn't found. LINKDB_CONNHANDLE_ALL will always succeed.
15631559
*/
15641560
static uint8_t PeripheralAudio_clearConnListEntry(uint16_t connHandle)
15651561
{
15661562
uint8_t i;
15671563
// Set to invalid connection index initially
15681564
uint8_t connIndex = MAX_NUM_BLE_CONNS;
15691565

1570-
if(connHandle != CONNHANDLE_ALL)
1566+
if(connHandle != LINKDB_CONNHANDLE_ALL)
15711567
{
15721568
// Get connection index from handle
15731569
connIndex = PeripheralAudio_getConnIndex(connHandle);
@@ -1580,9 +1576,9 @@ static uint8_t PeripheralAudio_clearConnListEntry(uint16_t connHandle)
15801576
// Clear specific handle or all handles
15811577
for(i = 0; i < MAX_NUM_BLE_CONNS; i++)
15821578
{
1583-
if((connIndex == i) || (connHandle == CONNHANDLE_ALL))
1579+
if((connIndex == i) || (connHandle == LINKDB_CONNHANDLE_ALL))
15841580
{
1585-
connList[i].connHandle = CONNHANDLE_INVALID;
1581+
connList[i].connHandle = LINKDB_CONNHANDLE_INVALID;
15861582
connList[i].currPhy = 0;
15871583
connList[i].phyCngRq = 0;
15881584
connList[i].phyRqFailCnt = 0;

0 commit comments

Comments
 (0)