nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
app_task.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#pragma once
8
9#include "board/board.h"
10#include <platform/CHIPDeviceLayer.h>
11
12struct k_timer;
13struct Identify;
14
15class AppTask {
16public:
17 static AppTask &Instance()
18 {
19 static AppTask sAppTask;
20 return sAppTask;
21 };
22
23 CHIP_ERROR StartApp();
24#ifdef CONFIG_BRIDGE_SMART_PLUG_SUPPORT
25 static constexpr chip::EndpointId kSmartplugEndpointId = 2;
26 static void ButtonEventHandler(Nrf::ButtonState state, Nrf::ButtonMask hasChanged);
27 static void SmartplugOnOffEventHandler();
28#endif /* CONFIG_BRIDGE_SMART_PLUG_SUPPORT */
29
30static void IdentifyStartHandler(Identify *);
31static void IdentifyStopHandler(Identify *);
32static void TriggerIdentifyEffectHandler(Identify *);
33static void TriggerEffectTimerTimeoutCallback(k_timer *timer);
34
35private:
36 CHIP_ERROR Init();
37
38 static CHIP_ERROR RestoreBridgedDevices();
39};
CHIP_ERROR StartApp()
static void IdentifyStopHandler(Identify *)
static void TriggerIdentifyEffectHandler(Identify *)
static void TriggerEffectTimerTimeoutCallback(k_timer *timer)
static AppTask & Instance()
Definition app_task.h:17
static void IdentifyStartHandler(Identify *)
Definition app_task.h:15