From 9d19f8ef282395d8ab03d4ed1b49074e66747c0c Mon Sep 17 00:00:00 2001 From: Doru Gucea Date: Thu, 22 Feb 2024 04:42:49 -0800 Subject: [PATCH] [nxp][k32w0][k32w0] add restyle and wording fixes Signed-off-by: Doru Gucea --- .github/.wordlist.txt | 1 + .../nxp/k32w/k32w0/BUILD.gn | 14 +++------- .../nxp/k32w/k32w0/README.md | 10 +++++-- .../nxp/k32w/k32w0/main/AppTask.cpp | 2 +- .../nxp/k32w/k32w1/BUILD.gn | 14 +++------- .../nxp/k32w/k32w1/README.md | 28 +++++++++++-------- third_party/nxp/k32w0_sdk/k32w0_sdk.gni | 10 +++---- third_party/nxp/nxp_sdk.gni | 10 +++---- 8 files changed, 43 insertions(+), 46 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 155e909a43f526..6862e2a903950e 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -817,6 +817,7 @@ libwebkitgtk lifecycle lightbulb lightin +lit-icd LightingApp LightingColor LightingState diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn b/examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn index 552dc2320e6598..c9b50a84ceb770 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn @@ -19,10 +19,10 @@ import("//build_overrides/openthread.gni") import("${k32w0_sdk_build_root}/k32w0_executable.gni") import("${k32w0_sdk_build_root}/k32w0_sdk.gni") +import("${chip_root}/src/app/icd/icd.gni") import("${chip_root}/src/crypto/crypto.gni") import("${chip_root}/src/lib/core/core.gni") import("${chip_root}/src/platform/device.gni") -import("${chip_root}/src/app/icd/icd.gni") declare_args() { chip_software_version = 0 @@ -123,17 +123,11 @@ k32w0_executable("contact_sensor_app") { #lit and sit are using different zap files if (chip_enable_icd_lit) { - deps += [ - "${chip_root}/examples/contact-sensor-app/nxp/zap-lit/", - ] + deps += [ "${chip_root}/examples/contact-sensor-app/nxp/zap-lit/" ] - defines += [ - "CHIP_ENABLE_LIT=1", - ] + defines += [ "CHIP_ENABLE_LIT=1" ] } else { - deps += [ - "${chip_root}/examples/contact-sensor-app/nxp/zap-sit/", - ] + deps += [ "${chip_root}/examples/contact-sensor-app/nxp/zap-sit/" ] } cflags = [ "-Wconversion" ] diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md b/examples/contact-sensor-app/nxp/k32w/k32w0/README.md index e30d79cdfba8c2..d9f649acd75fc0 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/README.md @@ -265,7 +265,9 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-contact-example. ## Long Idle Time ICD Support -By default, contact-sensor is compiled as SIT ICD (Short Idle Time Intermittently Connected Device) - see rules from k32w0_sdk.gni: + +By default, contact-sensor is compiled as SIT ICD (Short Idle Time +Intermittently Connected Device) - see rules from k32w0_sdk.gni: ``` chip_ot_idle_interval_ms = 2000 # 2s Idle Intervals @@ -277,8 +279,10 @@ nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric ``` -If LIT ICD support is needed then `chip_enable_icd_lit=true` must be specified as gn argument and the above parameters can be modified to -comply with LIT requirements (e.g.: LIT devices must configure `chip_ot_idle_interval_ms > 15000`). Example LIT configuration: +If LIT ICD support is needed then `chip_enable_icd_lit=true` must be specified +as gn argument and the above parameters can be modified to comply with LIT +requirements (e.g.: LIT devices must configure +`chip_ot_idle_interval_ms > 15000`). Example LIT configuration: ``` chip_ot_idle_interval_ms = 15000 # 15s Idle Intervals diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp index 4101e99f01066d..17aea9d5897907 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -524,7 +524,7 @@ void AppTask::HandleKeyboard(void) else #endif - ButtonEventHandler(BLE_BUTTON, BLE_BUTTON_PUSH); + ButtonEventHandler(BLE_BUTTON, BLE_BUTTON_PUSH); break; #if !(defined OM15082) case gKBD_EventLongPB1_c: diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn index 59ee5cfb4e38d4..e44c1a9c71bd40 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn @@ -23,11 +23,11 @@ import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") +import("${chip_root}/src/app/icd/icd.gni") import("${chip_root}/src/crypto/crypto.gni") import("${chip_root}/src/lib/core/core.gni") import("${chip_root}/src/platform/device.gni") import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") -import("${chip_root}/src/app/icd/icd.gni") declare_args() { chip_software_version = 0 @@ -113,17 +113,11 @@ k32w1_executable("contact_sensor_app") { #lit and sit are using different zap files if (chip_enable_icd_lit) { - deps += [ - "${chip_root}/examples/contact-sensor-app/nxp/zap-lit/", - ] + deps += [ "${chip_root}/examples/contact-sensor-app/nxp/zap-lit/" ] - defines += [ - "CHIP_ENABLE_LIT=1", - ] + defines += [ "CHIP_ENABLE_LIT=1" ] } else { - deps += [ - "${chip_root}/examples/contact-sensor-app/nxp/zap-sit/", - ] + deps += [ "${chip_root}/examples/contact-sensor-app/nxp/zap-sit/" ] } cflags = [ "-Wconversion" ] diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/README.md b/examples/contact-sensor-app/nxp/k32w/k32w1/README.md index f20f20df22344a..88c5e875e1b84d 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w1/README.md +++ b/examples/contact-sensor-app/nxp/k32w/k32w1/README.md @@ -101,15 +101,15 @@ will not work. **RGB LED** shows the state of the simulated contact sensor. when the LED is lit, the sensor is contacted, when not lit, the sensor is non-contacted. -**Button SW2**. SHORT press function is overloaded depending on the device type and -commissioning state. If the device is not commissioned, a SHORT press of the buttton -will enable Bluetooth LE advertising for a predefined period of time. If the device -is commissioned and is acting as a LIT ICD then a SHORT press of the button will enable -Active Mode. -A LONG Press of Button SW2 initiates a factory reset. After an initial period of 3 -seconds, LED 2 and RGB LED will flash in unison to signal the pending reset. -After 6 seconds will cause the device to reset its persistent configuration and initiate -a reboot. The reset action can be cancelled by press SW2 button at any point before the 6 second limit. +**Button SW2**. SHORT press function is overloaded depending on the device type +and commissioning state. If the device is not commissioned, a SHORT press of the +button will enable Bluetooth LE advertising for a predefined period of time. If +the device is commissioned and is acting as a LIT ICD then a SHORT press of the +button will enable Active Mode. A LONG Press of Button SW2 initiates a factory +reset. After an initial period of 3 seconds, LED 2 and RGB LED will flash in +unison to signal the pending reset. After 6 seconds will cause the device to +reset its persistent configuration and initiate a reboot. The reset action can +be cancelled by press SW2 button at any point before the 6 second limit. **Button SW3** can be used to change the state of the simulated contact sensor. The button behaves as a toggle, swapping the state every time it is short @@ -145,7 +145,9 @@ build, the `elf` and `srec` files are found in `out/debug/` - `see the files prefixed with chip-k32w1-contact-example`. ## Long Idle Time ICD Support -By default, contact-sensor is compiled as SIT ICD (Short Idle Time Intermittently Connected Device) - see rules from k32w1_sdk.gni: + +By default, contact-sensor is compiled as SIT ICD (Short Idle Time +Intermittently Connected Device) - see rules from k32w1_sdk.gni: ``` chip_ot_idle_interval_ms = 2000 # 2s Idle Intervals @@ -157,8 +159,10 @@ nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric ``` -If LIT ICD support is needed then `chip_enable_icd_lit=true` must be specified as gn argument and the above parameters can be modified to -comply with LIT requirements (e.g.: LIT devices must configure `chip_ot_idle_interval_ms > 15000`). Example LIT configuration: +If LIT ICD support is needed then `chip_enable_icd_lit=true` must be specified +as gn argument and the above parameters can be modified to comply with LIT +requirements (e.g.: LIT devices must configure +`chip_ot_idle_interval_ms > 15000`). Example LIT configuration: ``` chip_ot_idle_interval_ms = 15000 # 15s Idle Intervals diff --git a/third_party/nxp/k32w0_sdk/k32w0_sdk.gni b/third_party/nxp/k32w0_sdk/k32w0_sdk.gni index 4e2c4a4c67a813..754ac91df80875 100644 --- a/third_party/nxp/k32w0_sdk/k32w0_sdk.gni +++ b/third_party/nxp/k32w0_sdk/k32w0_sdk.gni @@ -54,12 +54,12 @@ declare_args() { chip_with_sdk_package = 1 # ICD Matter Configuration flags - nxp_ot_idle_interval_ms = 2000 # 2s Idle Intervals - nxp_ot_active_interval_ms = 500 # 500ms Active Intervals + nxp_ot_idle_interval_ms = 2000 # 2s Idle Intervals + nxp_ot_active_interval_ms = 500 # 500ms Active Intervals - nxp_idle_mode_duration_s = 600 # 10min Idle Mode Interval - nxp_active_mode_duration_ms = 10000 # 10s Active Mode Interval - nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold + nxp_idle_mode_duration_s = 600 # 10min Idle Mode Interval + nxp_active_mode_duration_ms = 10000 # 10s Active Mode Interval + nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric } diff --git a/third_party/nxp/nxp_sdk.gni b/third_party/nxp/nxp_sdk.gni index b1b358ae2e7d61..da66a0d51c5721 100644 --- a/third_party/nxp/nxp_sdk.gni +++ b/third_party/nxp/nxp_sdk.gni @@ -48,12 +48,12 @@ declare_args() { nxp_software_version_string = "1.3" # ICD Matter Configuration flags - nxp_ot_idle_interval_ms = 2000 # 2s Idle Intervals - nxp_ot_active_interval_ms = 500 # 500ms Active Intervals + nxp_ot_idle_interval_ms = 2000 # 2s Idle Intervals + nxp_ot_active_interval_ms = 500 # 500ms Active Intervals - nxp_idle_mode_duration_s = 600 # 10min Idle Mode Interval - nxp_active_mode_duration_ms = 10000 # 10s Active Mode Interval - nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold + nxp_idle_mode_duration_s = 600 # 10min Idle Mode Interval + nxp_active_mode_duration_ms = 10000 # 10s Active Mode Interval + nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric }