From 7d5bfc3b1c66bc305875965c913c44c4ecfaddea Mon Sep 17 00:00:00 2001 From: wyhong Date: Sat, 10 Jun 2023 22:50:43 +0800 Subject: [PATCH] fix restyle --- .../bouffalolab/bl702/CHIPProjectConfig.h | 2 +- .../lighting-app/bouffalolab/bl702/args.gni | 2 +- .../bouffalolab/common/AppTask.cpp | 2 +- .../bouffalolab/common/plat/platform.cpp | 2 +- src/platform/bouffalolab/BL602/BUILD.gn | 20 +++++++++---------- .../BL602/DiagnosticDataProviderImpl.cpp | 9 +++++---- .../bouffalolab/BL602/PlatformManagerImpl.cpp | 2 +- src/platform/bouffalolab/BL702/BUILD.gn | 6 +++--- .../BL702/DiagnosticDataProviderImpl.cpp | 5 +++-- src/platform/bouffalolab/BL702/args.gni | 2 +- .../bouffalolab/common/BLEManagerImpl.cpp | 2 +- .../common/ConfigurationManagerImpl.h | 1 - .../common/ConnectivityManagerImpl.cpp | 1 - .../common/DiagnosticDataProviderImpl.cpp | 9 ++++----- .../common/PlatformManagerImpl.cpp | 1 - 15 files changed, 31 insertions(+), 35 deletions(-) diff --git a/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h index 97a4b844c9b37e..1a357d1b10ccbc 100644 --- a/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl702/CHIPProjectConfig.h @@ -132,4 +132,4 @@ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 -#define CHIP_BLE_DEVICE_NAME "MatterLight" \ No newline at end of file +#define CHIP_BLE_DEVICE_NAME "MatterLight" diff --git a/examples/lighting-app/bouffalolab/bl702/args.gni b/examples/lighting-app/bouffalolab/bl702/args.gni index 18ddc9efc51c9a..8087dc1470f236 100644 --- a/examples/lighting-app/bouffalolab/bl702/args.gni +++ b/examples/lighting-app/bouffalolab/bl702/args.gni @@ -34,4 +34,4 @@ chip_detail_logging = false pw_build_LINK_DEPS = [ "$dir_pw_assert:impl", "$dir_pw_log:impl", -] \ No newline at end of file +] diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index 3c2ae20e51cf05..3e7171dd75aa18 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -40,9 +40,9 @@ #endif #if CHIP_ENABLE_OPENTHREAD -#include #include #include +#include #include #endif diff --git a/examples/platform/bouffalolab/common/plat/platform.cpp b/examples/platform/bouffalolab/common/plat/platform.cpp index f95fd18d4138f2..dc2f2a02fbfc1f 100644 --- a/examples/platform/bouffalolab/common/plat/platform.cpp +++ b/examples/platform/bouffalolab/common/plat/platform.cpp @@ -38,9 +38,9 @@ #endif #if CHIP_ENABLE_OPENTHREAD -#include #include #include +#include #include #endif diff --git a/src/platform/bouffalolab/BL602/BUILD.gn b/src/platform/bouffalolab/BL602/BUILD.gn index 1696d5bdd96f50..0f414afb036db6 100644 --- a/src/platform/bouffalolab/BL602/BUILD.gn +++ b/src/platform/bouffalolab/BL602/BUILD.gn @@ -20,31 +20,29 @@ import("${chip_root}/src/platform/device.gni") assert(chip_device_platform == "bl602") static_library("BL602") { - sources = [ + "ConfigurationManagerImpl.cpp", "ConnectivityManagerImpl.cpp", + "DiagnosticDataProviderImpl.cpp", "NetworkCommissioningDriver.cpp", "PlatformManagerImpl.cpp", "wifi_mgmr_portable.c", - "ConfigurationManagerImpl.cpp", - "DiagnosticDataProviderImpl.cpp", ] common_sources = [ + "${chip_root}/src/credentials/CHIPCert.h", + "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", "../../FreeRTOS/SystemTimeSupport.cpp", "../../SingletonConfigurationManager.cpp", "../common/BLConfig.cpp", "../common/ConfigurationManagerImpl.cpp", - "../common/DiagnosticDataProviderImpl.cpp", - "../common/Logging.cpp", - "../common/KeyValueStoreManagerImpl.cpp", "../common/ConnectivityManagerImpl.cpp", - "../common/PlatformManagerImpl.cpp", - - "${chip_root}/src/credentials/CHIPCert.h", - "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", + "../common/DiagnosticDataProviderImpl.cpp", "../common/FactoryDataProvider.cpp", "../common/FactoryDataProvider.h", + "../common/KeyValueStoreManagerImpl.cpp", + "../common/Logging.cpp", + "../common/PlatformManagerImpl.cpp", ] if (chip_enable_ota_requestor) { @@ -53,7 +51,7 @@ static_library("BL602") { "../common/OTAImageProcessorImpl.h", ] } - + if (chip_enable_ble) { sources += [ "../common/BLEManagerImpl.cpp", diff --git a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp index 59a72edc9006d6..b49fa9cbde9a5a 100644 --- a/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp @@ -16,15 +16,15 @@ */ #include -#include #include #include +#include #include extern "C" { -#include #include +#include #include #include @@ -56,10 +56,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason { bootReason = BootReasonType::kSoftwareReset; } - else { + else + { bootReason = BootReasonType::kUnspecified; } - + return CHIP_NO_ERROR; } diff --git a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp index 51598add057c4b..56761846061dc2 100644 --- a/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp @@ -19,8 +19,8 @@ #include #include -#include #include +#include #include #include diff --git a/src/platform/bouffalolab/BL702/BUILD.gn b/src/platform/bouffalolab/BL702/BUILD.gn index dc894839fdaf5c..dd0279175bfd50 100644 --- a/src/platform/bouffalolab/BL702/BUILD.gn +++ b/src/platform/bouffalolab/BL702/BUILD.gn @@ -34,15 +34,15 @@ static_library("BL702") { "../../SingletonConfigurationManager.cpp", "../common/BLConfig.cpp", "../common/ConfigurationManagerImpl.cpp", + "../common/ConnectivityManagerImpl.cpp", "../common/DiagnosticDataProviderImpl.cpp", - "../common/Logging.cpp", "../common/KeyValueStoreManagerImpl.cpp", - "../common/ConnectivityManagerImpl.cpp", + "../common/Logging.cpp", "../common/PlatformManagerImpl.cpp", # "${chip_root}/src/credentials/CHIPCert.h", # "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", - + # "../common/FactoryDataProvider.cpp", # "../common/FactoryDataProvider.h", ] diff --git a/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp index 1f5290ed7ab743..62fe129c0a9685 100644 --- a/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp @@ -15,9 +15,9 @@ * limitations under the License. */ -#include #include #include +#include extern "C" { #include @@ -45,7 +45,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason { bootReason = BootReasonType::kSoftwareReset; } - else { + else + { bootReason = BootReasonType::kUnspecified; } return CHIP_NO_ERROR; diff --git a/src/platform/bouffalolab/BL702/args.gni b/src/platform/bouffalolab/BL702/args.gni index 343f4f3b1926d0..47a03c6f7bd268 100644 --- a/src/platform/bouffalolab/BL702/args.gni +++ b/src/platform/bouffalolab/BL702/args.gni @@ -36,4 +36,4 @@ openthread_core_config_platform_check_file = openthread_project_include_dirs = [ "${chip_root}/src/platform/bouffalolab/BL702" ] openthread_external_platform = - "${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk" \ No newline at end of file + "${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk" diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.cpp b/src/platform/bouffalolab/common/BLEManagerImpl.cpp index d70979268d0778..ff26daf1167bd8 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/common/BLEManagerImpl.cpp @@ -23,8 +23,8 @@ #include "BLEManagerImpl.h" #include -#include #include +#include #include #include #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING diff --git a/src/platform/bouffalolab/common/ConfigurationManagerImpl.h b/src/platform/bouffalolab/common/ConfigurationManagerImpl.h index e7125ae998c42d..1d69d582185e75 100644 --- a/src/platform/bouffalolab/common/ConfigurationManagerImpl.h +++ b/src/platform/bouffalolab/common/ConfigurationManagerImpl.h @@ -67,6 +67,5 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; - } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp index 2e00cbf8d0a25e..f1a47e5a68de06 100644 --- a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp @@ -71,7 +71,6 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() return CHIP_NO_ERROR; } - void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { // Forward the event to the generic base classes as needed. diff --git a/src/platform/bouffalolab/common/DiagnosticDataProviderImpl.cpp b/src/platform/bouffalolab/common/DiagnosticDataProviderImpl.cpp index 6b1e99457df3cb..6e11e6f91d261e 100644 --- a/src/platform/bouffalolab/common/DiagnosticDataProviderImpl.cpp +++ b/src/platform/bouffalolab/common/DiagnosticDataProviderImpl.cpp @@ -19,8 +19,8 @@ #include -#include #include +#include #include @@ -43,7 +43,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeap #ifdef CFG_USE_PSRAM size_t freeHeapSize = xPortGetFreeHeapSize() + xPortGetFreeHeapSizePsram(); #else - size_t freeHeapSize = xPortGetFreeHeapSize(); + size_t freeHeapSize = xPortGetFreeHeapSize(); #endif currentHeapFree = static_cast(freeHeapSize); @@ -55,7 +55,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeap #ifdef CFG_USE_PSRAM currentHeapUsed = (get_heap_size() + get_heap3_size() - xPortGetFreeHeapSize() - xPortGetFreeHeapSizePsram()); #else - currentHeapUsed = (get_heap_size() - xPortGetFreeHeapSize()); + currentHeapUsed = (get_heap_size() - xPortGetFreeHeapSize()); #endif return CHIP_NO_ERROR; @@ -67,8 +67,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & cu currentHeapHighWatermark = get_heap_size() + get_heap3_size() - xPortGetMinimumEverFreeHeapSize() - xPortGetMinimumEverFreeHeapSizePsram(); #else - currentHeapHighWatermark = - get_heap_size() - xPortGetMinimumEverFreeHeapSize(); + currentHeapHighWatermark = get_heap_size() - xPortGetMinimumEverFreeHeapSize(); #endif return CHIP_NO_ERROR; diff --git a/src/platform/bouffalolab/common/PlatformManagerImpl.cpp b/src/platform/bouffalolab/common/PlatformManagerImpl.cpp index 76a3fc61c47f6e..f31ae77999db64 100644 --- a/src/platform/bouffalolab/common/PlatformManagerImpl.cpp +++ b/src/platform/bouffalolab/common/PlatformManagerImpl.cpp @@ -21,7 +21,6 @@ #include #include - namespace chip { namespace DeviceLayer {