|
|
@@ -54,19 +54,19 @@ constexpr int kFactoryResetTriggerCntr = 3;
|
|
|
constexpr int kAppEventQueueSize = 10;
|
|
|
|
|
|
#if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE
|
|
|
-const struct gpio_dt_spec sFactoryResetButtonDt = BUTTON_FACTORY_RESET;
|
|
|
-const struct gpio_dt_spec sBleStartButtonDt = BUTTON_BLE_START;
|
|
|
+const struct gpio_dt_spec sFactoryResetButtonDt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_1), gpios);
|
|
|
+const struct gpio_dt_spec sBleStartButtonDt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_2), gpios);
|
|
|
#if APP_USE_THREAD_START_BUTTON
|
|
|
-const struct gpio_dt_spec sThreadStartButtonDt = BUTTON_THREAD_START;
|
|
|
+const struct gpio_dt_spec sThreadStartButtonDt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_3), gpios);
|
|
|
#endif
|
|
|
#if APP_USE_EXAMPLE_START_BUTTON
|
|
|
-const struct gpio_dt_spec sExampleActionButtonDt = BUTTON_EXAMPLE_ACTION;
|
|
|
+const struct gpio_dt_spec sExampleActionButtonDt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_4), gpios);
|
|
|
#endif
|
|
|
#else
|
|
|
-const struct gpio_dt_spec sButtonCol1Dt = BUTTON_COL_1;
|
|
|
-const struct gpio_dt_spec sButtonCol2Dt = BUTTON_COL_2;
|
|
|
-const struct gpio_dt_spec sButtonRow1Dt = BUTTON_ROW_1;
|
|
|
-const struct gpio_dt_spec sButtonRow2Dt = BUTTON_ROW_2;
|
|
|
+const struct gpio_dt_spec sButtonCol1Dt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_col1), gpios);
|
|
|
+const struct gpio_dt_spec sButtonCol2Dt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_col2), gpios);
|
|
|
+const struct gpio_dt_spec sButtonRow1Dt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_row1), gpios);
|
|
|
+const struct gpio_dt_spec sButtonRow2Dt = GPIO_DT_SPEC_GET(DT_NODELABEL(key_matrix_row2), gpios);
|
|
|
#endif
|
|
|
|
|
|
#if APP_USE_IDENTIFY_PWM
|
|
|
@@ -78,7 +78,7 @@ constexpr uint32_t kIdentifyFinishOffRateMs = 50;
|
|
|
constexpr uint32_t kIdentifyChannelChangeRateMs = 1000;
|
|
|
constexpr uint32_t kIdentifyBreatheRateMs = 1000;
|
|
|
|
|
|
-const struct pwm_dt_spec sPwmIdentifySpecGreenLed = LIGHTING_PWM_SPEC_IDENTIFY_GREEN;
|
|
|
+const struct pwm_dt_spec sPwmIdentifySpecGreenLed = PWM_DT_SPEC_GET(DT_ALIAS(pwm_led3));
|
|
|
#endif
|
|
|
|
|
|
#if APP_SET_NETWORK_COMM_ENDPOINT_SEC
|
|
|
@@ -247,9 +247,8 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void)
|
|
|
|
|
|
// Initialize status LED
|
|
|
#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED
|
|
|
- LEDWidget::InitGpio(LEDS_PORT);
|
|
|
LEDWidget::SetStateUpdateCallback(LEDStateUpdateHandler);
|
|
|
- sStatusLED.Init(SYSTEM_STATE_LED);
|
|
|
+ sStatusLED.Init(GPIO_DT_SPEC_GET(DT_ALIAS(system_state_led), gpios));
|
|
|
|
|
|
UpdateStatusLED();
|
|
|
#endif
|