nRF Connect SDK API 0.1.0
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
12class AppTask {
13public:
14 static AppTask &Instance()
15 {
16 static AppTask sAppTask;
17 return sAppTask;
18 };
19
20 CHIP_ERROR StartApp();
21#ifdef CONFIG_BRIDGE_SMART_PLUG_SUPPORT
22 static constexpr chip::EndpointId kSmartplugEndpointId = 2;
23 static void ButtonEventHandler(Nrf::ButtonState state, Nrf::ButtonMask hasChanged);
24 static void SmartplugOnOffEventHandler();
25#endif /* CONFIG_BRIDGE_SMART_PLUG_SUPPORT */
26
27private:
28 CHIP_ERROR Init();
29
30 static CHIP_ERROR RestoreBridgedDevices();
31};
CHIP_ERROR StartApp()
static AppTask & Instance()
Definition: app_task.h:14
Definition: app_task.h:12
enum state_type state