Skip to content

Commit c54603e

Browse files
committed
Apply restyled
1 parent d896e06 commit c54603e

File tree

18 files changed

+647
-672
lines changed

18 files changed

+647
-672
lines changed

docs/guides/ti/matter-migration-guide/matter_cc2674_migration.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ The GPIO pin values for SPI will need to be adjusted based on your design.
5050
4. Select _Board_ as _None_ and _Device_ as _`CC2674P10RGZ`_, Unselect
5151
_`Lock PinMux`_, and click _Confirm_.
5252
5. To fix errors, make the following module changes:
53-
- _RF Design_ and _RF Stacks -> Bluetooth LE -> Radio_: click on _accepting the
54-
current value_, which should be _`LP_CC2674P10_RGZ`_ in the drop down menu
55-
for _Based On RF Design_
53+
- _RF Design_ and _RF Stacks -> Bluetooth LE -> Radio_: click on _accepting
54+
the current value_, which should be _`LP_CC2674P10_RGZ`_ in the drop down
55+
menu for _Based On RF Design_
5656
- _TI DEVICES -> Device Configuration_: Clear
5757
_`XOSC Cap Array Modification`_
5858
- _TI DRIVERS -> RF_: Set _Global Event Mask_ as _None_ and _No. of Antenna

docs/guides/ti/matter-users-guide/ti_factory_data_user_guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Each element is described in more detail below:
5050
## How to use
5151

5252
Out of box factory data location is configured to be on second to last page of
53-
flash. For CC13x4_CC26x4, the starting address is `0xFE800`. This can be configured in
54-
the linker file.
53+
flash. For CC13x4_CC26x4, the starting address is `0xFE800`. This can be
54+
configured in the linker file.
5555

5656
To configure:
5757

docs/guides/ti/matter-users-guide/ti_matter_overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ as reference for your own application.
107107
- [pump-app](../../../../examples/pump-app/cc13x4_26x4/README.md)
108108
- [pump-controller-app](../../../../examples/pump-controller-app/cc13x4_26x4/README.md)
109109
- [lighting-app](../../../../examples/lighting-app/cc13x4_26x4/README.md)
110-
<hr>
110+
<hr>
111111

112112
### Build system
113113

docs/guides/ti/matter-users-guide/ti_openthread_library_usage.md

+17-8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

33
## Overview
44

5-
TI Matter example applications provide configuration options for how Thread code is included in the build. Thread code can be included in as:
5+
TI Matter example applications provide configuration options for how Thread code
6+
is included in the build. Thread code can be included in as:
67

7-
1. Thread certified library optimized for Matter (recommended for development and production)
8-
2. Full Source (can be used for development)
9-
3. Custom option where customers can update the Thread config file to change the included OpenThread feature set
8+
1. Thread certified library optimized for Matter (recommended for development
9+
and production)
10+
2. Full Source (can be used for development)
11+
3. Custom option where customers can update the Thread config file to change the
12+
included OpenThread feature set
1013

11-
The library builds have been optimized for Matter to disable features such as Thread Joiner capability in order to save on Flash/RAM usage. Refer to the `ti_matter_production_certification.md` to get the cert ID for your Matter certification application when using the certified Thread libraries from TI.
14+
The library builds have been optimized for Matter to disable features such as
15+
Thread Joiner capability in order to save on Flash/RAM usage. Refer to the
16+
`ti_matter_production_certification.md` to get the cert ID for your Matter
17+
certification application when using the certified Thread libraries from TI.
1218

1319
Build arguments have been added to enable Matter applications to link against
1420
certified OpenThread FTD/MTD libraries or custom user libraries.
@@ -26,8 +32,8 @@ chip_openthread_ftd = true
2632
```
2733

2834
- **TI Certified OpenThread Library**:
29-
30-
* Typically this is used for development.
35+
36+
- Typically this is used for development.
3137

3238
1. `ot_ti_lib_dir` Is set to an empty string
3339

@@ -66,7 +72,10 @@ chip_openthread_ftd = true
6672
```
6773
6874
- **Custom OpenThread Library**:
69-
* The custom OpenThread library is used to implement extra features, or when modifying the stack in anyway.
75+
76+
- The custom OpenThread library is used to implement extra features, or
77+
when modifying the stack in anyway.
78+
7079
1. `ot_ti_lib_dir` Points to a library directory containing a custom
7180
`libopenthread-ftd/mtd` variant
7281

examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp

+34-32
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ TimerHandle_t sOTAInitTimer = 0;
106106

107107
// The OTA Init Timer is only started upon the first Thread State Change
108108
// detected if the device is already on a Thread Network, or during the AppTask
109-
// Init sequence if the device is not yet on a Thread Network. Once the timer
109+
// Init sequence if the device is not yet on a Thread Network. Once the timer
110110
// has been started once, it does not need to be started again so the flag will
111111
// be set to false.
112112
bool isAppStarting = true;
@@ -157,13 +157,15 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
157157
PLAT_LOG("Thread State Change");
158158
bool isThreadAttached = ThreadStackMgrImpl().IsThreadAttached();
159159

160-
if(isThreadAttached){
160+
if (isThreadAttached)
161+
{
161162
PLAT_LOG("Device is on the Thread Network");
162163
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
163-
if(isAppStarting){
164+
if (isAppStarting)
165+
{
164166
StartTimer(OTAREQUESTOR_INIT_TIMER_DELAY_MS);
165167
isAppStarting = false;
166-
}
168+
}
167169
#endif
168170
}
169171
break;
@@ -174,7 +176,8 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg)
174176
#endif
175177
}
176178

177-
void OTAInitTimerEventHandler(TimerHandle_t xTimer){
179+
void OTAInitTimerEventHandler(TimerHandle_t xTimer)
180+
{
178181
InitializeOTARequestor();
179182
}
180183

@@ -222,17 +225,17 @@ int AppTask::Init()
222225
}
223226

224227
// Create FreeRTOS sw timer for OTA timer.
225-
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
226-
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
227-
false, // no timer reload (==one-shot)
228-
(void *) this, // init timer id = light obj context
229-
OTAInitTimerEventHandler // timer callback handler
228+
sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel
229+
OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS)
230+
false, // no timer reload (==one-shot)
231+
(void *) this, // init timer id = light obj context
232+
OTAInitTimerEventHandler // timer callback handler
230233
);
231234

232235
if (sOTAInitTimer == NULL)
233236
{
234237
PLAT_LOG("sOTAInitTimer timer create failed");
235-
}
238+
}
236239
else
237240
{
238241
PLAT_LOG("sOTAInitTimer timer created successfully ");
@@ -286,8 +289,8 @@ int AppTask::Init()
286289
PLAT_LOG("Initialize Server");
287290
static chip::CommonCaseDeviceServerInitParams initParams;
288291
static DefaultTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) };
289-
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
290-
292+
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
293+
291294
(void) initParams.InitializeStaticResourcesBeforeServerInit();
292295

293296
// Initialize info provider
@@ -309,17 +312,17 @@ int AppTask::Init()
309312
// We only have network commissioning on endpoint 0.
310313
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false);
311314

312-
313315
// Register a function to receive events from the CHIP device layer. Note that calls to
314316
// this function will happen on the CHIP event loop thread, not the app_main thread.
315317
PlatformMgr().AddEventHandler(DeviceEventCallback, reinterpret_cast<intptr_t>(nullptr));
316318

317319
bool isThreadEnabled = ThreadStackMgrImpl().IsThreadEnabled();
318-
if(!isThreadEnabled && isAppStarting){
320+
if (!isThreadEnabled && isAppStarting)
321+
{
319322
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
320-
PLAT_LOG("Thread is Disabled, enable OTA Requestor");
321-
StartTimer(OTAREQUESTOR_INIT_TIMER_DELAY_MS);
322-
isAppStarting = false;
323+
PLAT_LOG("Thread is Disabled, enable OTA Requestor");
324+
StartTimer(OTAREQUESTOR_INIT_TIMER_DELAY_MS);
325+
isAppStarting = false;
323326
#endif
324327
}
325328
// QR code will be used with CHIP Tool
@@ -346,20 +349,20 @@ void AppTask::AppTaskMain(void * pvParameter)
346349

347350
void StartTimer(uint32_t aTimeoutMs)
348351
{
349-
PLAT_LOG("Start OTA Init Timer")
350-
if (xTimerIsTimerActive(sOTAInitTimer))
351-
{
352-
PLAT_LOG("app timer already started!");
353-
CancelTimer();
354-
}
352+
PLAT_LOG("Start OTA Init Timer")
353+
if (xTimerIsTimerActive(sOTAInitTimer))
354+
{
355+
PLAT_LOG("app timer already started!");
356+
CancelTimer();
357+
}
355358

356-
// timer is not active, change its period to required value (== restart).
357-
// FreeRTOS- Block for a maximum of 100 ticks if the change period command
358-
// cannot immediately be sent to the timer command queue.
359-
if (xTimerChangePeriod(sOTAInitTimer, pdMS_TO_TICKS(aTimeoutMs), 100) != pdPASS)
360-
{
361-
PLAT_LOG("sOTAInitTimer timer start() failed");
362-
}
359+
// timer is not active, change its period to required value (== restart).
360+
// FreeRTOS- Block for a maximum of 100 ticks if the change period command
361+
// cannot immediately be sent to the timer command queue.
362+
if (xTimerChangePeriod(sOTAInitTimer, pdMS_TO_TICKS(aTimeoutMs), 100) != pdPASS)
363+
{
364+
PLAT_LOG("sOTAInitTimer timer start() failed");
365+
}
363366
}
364367

365368
void CancelTimer(void)
@@ -370,7 +373,6 @@ void CancelTimer(void)
370373
}
371374
}
372375

373-
374376
void AppTask::PostEvent(const AppEvent * aEvent)
375377
{
376378
if (xQueueSend(sAppEventQueue, aEvent, 0) != pdPASS)

0 commit comments

Comments
 (0)