[nxp] Fix/lit icd: enable MaximumCheckInBackoff and simplify ButtonManager code (#35695)

* [mcxw71_k32w1] lit icd: enable MaximumCheckInBackoff attribute

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>

* [mcxw71_k32w1] lit icd: simplify code around ButtonManager

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>

---------

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter
index 25deeed..cad462d 100644
--- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter
+++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter
@@ -2008,6 +2008,7 @@
     ram      attribute userActiveModeTriggerHint default = 4096;
     ram      attribute userActiveModeTriggerInstruction default = "Push setup button for Active Mode";
     ram      attribute operatingMode default = 0;
+    callback attribute maximumCheckInBackOff;
     callback attribute generatedCommandList;
     callback attribute acceptedCommandList;
     callback attribute eventList;
diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap
index 31c3577..f2e73f9 100644
--- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap
+++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap
@@ -3727,6 +3727,22 @@
               "reportableChange": 0
             },
             {
+              "name": "MaximumCheckInBackOff",
+              "code": 9,
+              "mfgCode": null,
+              "side": "server",
+              "type": "int32u",
+              "included": 1,
+              "storageOption": "External",
+              "singleton": 0,
+              "bounded": 0,
+              "defaultValue": "",
+              "reportable": 1,
+              "minInterval": 1,
+              "maxInterval": 65534,
+              "reportableChange": 0
+            },
+            {
               "name": "GeneratedCommandList",
               "code": 65528,
               "mfgCode": null,
diff --git a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp
index 8bc61ee..c94e6e4 100644
--- a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp
+++ b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp
@@ -52,10 +52,6 @@
 
 TimerHandle_t resetTimer;
 
-#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS)
-static bool sitModeRequested;
-#endif // CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS
-
 CHIP_ERROR ButtonManager::Init()
 {
     resetTimer = xTimerCreate("FnTmr", 1, false, (void *) this, [](TimerHandle_t xTimer) {
@@ -65,10 +61,6 @@
     });
     VerifyOrReturnError(resetTimer != NULL, APP_ERROR_CREATE_TIMER_FAILED);
 
-#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS)
-    static bool sitModeRequested;
-#endif // CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS
-
     return CHIP_NO_ERROR;
 }
 
@@ -208,6 +200,9 @@
 #if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS)
 void ButtonManager::DSLSActionEventHandler(const AppEvent & event)
 {
+
+    static bool sitModeRequested = false;
+
     if (chip::DeviceLayer::ConfigurationMgr().IsFullyProvisioned())
     {
         if (!sitModeRequested)
diff --git a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h
index 7f4f6cf..4ed6553 100644
--- a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h
+++ b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h
@@ -25,6 +25,7 @@
 
 #include "fsl_component_button.h"
 
+#include <app/icd/server/ICDServerConfig.h>
 #include <lib/core/CHIPError.h>
 
 // Application-defined error codes in the CHIP_ERROR space.
@@ -87,12 +88,14 @@
      */
     static void ResetActionEventHandler(const AppEvent & event);
 
+#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS)
     /**
      * @brief This callback schedules a DSLS LIT action (Dynamic SIT LIT Support).
      *
      * It is used when the app requests SIT mode (check spec, "Runtime Operating Mode Switching")
      */
     static void DSLSActionEventHandler(const AppEvent & event);
+#endif /* CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS */
 
     /**
      * @brief This callback performs a factory reset.