Skip to content

Commit

Permalink
Use anonymous namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
erjiaqing committed Jul 8, 2020
1 parent 92a4026 commit de20f5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
30 changes: 17 additions & 13 deletions examples/lighting-app/nrf5/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,25 @@

APP_TIMER_DEF(sFunctionTimer);

static SemaphoreHandle_t sCHIPEventLock;
namespace {

static TaskHandle_t sAppTaskHandle;
static QueueHandle_t sAppEventQueue;
SemaphoreHandle_t sCHIPEventLock;

static LEDWidget sStatusLED;
static LEDWidget sUnusedLED;
static LEDWidget sUnusedLED_1;
TaskHandle_t sAppTaskHandle;
QueueHandle_t sAppEventQueue;

static bool sIsThreadProvisioned = false;
static bool sIsThreadEnabled = false;
static bool sIsThreadAttached = false;
static bool sIsPairedToAccount = false;
static bool sHaveBLEConnections = false;
static bool sHaveServiceConnectivity = false;
LEDWidget sStatusLED;
LEDWidget sUnusedLED;
LEDWidget sUnusedLED_1;

bool sIsThreadProvisioned = false;
bool sIsThreadEnabled = false;
bool sIsThreadAttached = false;
bool sIsPairedToAccount = false;
bool sHaveBLEConnections = false;
bool sHaveServiceConnectivity = false;

} // namespace

using namespace ::chip::DeviceLayer;

Expand Down Expand Up @@ -130,7 +134,7 @@ int AppTask::Init()
APP_ERROR_HANDLER(ret);
}

ret = LightingMgr().Init(1);
ret = LightingMgr().Init(LIGHTING_GPIO);
if (ret != NRF_SUCCESS)
{
NRF_LOG_INFO("LightingMgr().Init() failed");
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/nrf5/main/include/app_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
#define FUNCTION_BUTTON_DEBOUNCE_PERIOD_MS 50

#define SYSTEM_STATE_LED BSP_LED_0
#define LIGHTING_GPIO NRF_GPIO_PIN_MAP(0, 14)

// Time it takes in ms for the simulated actuator to move from one
// state to another.
Expand Down

0 comments on commit de20f5f

Please sign in to comment.