Skip to content

Commit 73c1a71

Browse files
committed
rename customapptask to commonapptask
1 parent da0140c commit 73c1a71

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

examples/lighting-app/silabs/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ silabs_executable("lighting_app") {
131131
sources = [
132132
"${examples_common_plat_dir}/main.cpp",
133133
"src/AppTask.cpp",
134-
"src/CustomAppTask.cpp",
134+
"${examples_common_plat_dir}/CommonAppTask.cpp",
135135
"src/DataModelCallbacks.cpp",
136136
]
137137

examples/lighting-app/silabs/src/AppTask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ OnOffEffect gEffect = {
9494
using namespace chip::TLV;
9595
using namespace ::chip::DeviceLayer;
9696

97-
// Singleton provided by CustomAppTask.cpp (AppTask::GetAppTask() returns CustomAppTask::GetAppTask()).
97+
// Singleton provided by CommonAppTask.cpp (AppTask::GetAppTask() returns CommonAppTask::GetAppTask()).
9898

9999
CHIP_ERROR AppTask::AppInit()
100100
{

examples/platform/silabs/CustomAppTask.cpp renamed to examples/platform/silabs/CommonAppTask.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919

20-
#include "CustomAppTask.h"
20+
#include "CommonAppTask.h"
2121
#include "AppTask.h"
2222
#include "AppConfig.h"
2323
#include "AppEvent.h"
@@ -31,27 +31,27 @@ using namespace ::chip::DeviceLayer::Silabs;
3131
#define APP_FUNCTION_BUTTON 0
3232
#define APP_LIGHT_SWITCH 1
3333

34-
CustomAppTask CustomAppTask::sAppTask;
34+
CommonAppTask CommonAppTask::sAppTask;
3535

3636
AppTask & AppTask::GetAppTask()
3737
{
38-
return CustomAppTask::GetAppTask();
38+
return CommonAppTask::GetAppTask();
3939
}
4040

41-
CHIP_ERROR CustomAppTask::AppInitImpl()
41+
CHIP_ERROR CommonAppTask::AppInitImpl()
4242
{
43-
SILABS_LOG("CustomAppTask: custom implementation (AppInitImpl)");
43+
SILABS_LOG("CommonAppTask: custom implementation (AppInitImpl)");
4444
CHIP_ERROR err = this->AppTask::AppInit();
4545
if (err == CHIP_NO_ERROR)
4646
{
47-
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(CustomAppTask::ButtonEventHandler);
47+
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(CommonAppTask::ButtonEventHandler);
4848
}
4949
return err;
5050
}
5151

52-
void CustomAppTask::ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction)
52+
void CommonAppTask::ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction)
5353
{
54-
SILABS_LOG("CustomAppTask: custom implementation (ButtonEventHandlerImpl)");
54+
SILABS_LOG("CommonAppTask: custom implementation (ButtonEventHandlerImpl)");
5555
AppEvent button_event = {};
5656
button_event.Type = AppEvent::kEventType_Button;
5757
button_event.ButtonEvent.Action = btnAction;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
* ButtonEventHandlerImpl() and add AppInitImpl() / GetAppTask() / sAppTask
2929
* as required by the CRTP base.
3030
*/
31-
class CustomAppTask : public AppTaskImpl<CustomAppTask>
31+
class CommonAppTask : public AppTaskImpl<CommonAppTask>
3232
{
3333
public:
34-
static CustomAppTask & GetAppTask() { return sAppTask; }
34+
static CommonAppTask & GetAppTask() { return sAppTask; }
3535

3636
private:
37-
friend class AppTaskImpl<CustomAppTask>;
37+
friend class AppTaskImpl<CommonAppTask>;
3838

3939
CHIP_ERROR AppInitImpl();
4040
void ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction);
4141

42-
static CustomAppTask sAppTask;
42+
static CommonAppTask sAppTask;
4343
};

0 commit comments

Comments
 (0)