Skip to content

Commit

Permalink
fix restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh committed Jun 10, 2023
1 parent 3177ece commit 7d5bfc3
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@

#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1

#define CHIP_BLE_DEVICE_NAME "MatterLight"
#define CHIP_BLE_DEVICE_NAME "MatterLight"
2 changes: 1 addition & 1 deletion examples/lighting-app/bouffalolab/bl702/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ chip_detail_logging = false
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
"$dir_pw_log:impl",
]
]
2 changes: 1 addition & 1 deletion examples/lighting-app/bouffalolab/common/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
#endif

#if CHIP_ENABLE_OPENTHREAD
#include <platform/bouffalolab/common/ThreadStackManagerImpl.h>
#include <platform/OpenThread/OpenThreadUtils.h>
#include <platform/ThreadStackManager.h>
#include <platform/bouffalolab/common/ThreadStackManagerImpl.h>
#include <utils_list.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/platform/bouffalolab/common/plat/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
#endif

#if CHIP_ENABLE_OPENTHREAD
#include <platform/bouffalolab/common/ThreadStackManagerImpl.h>
#include <platform/OpenThread/OpenThreadUtils.h>
#include <platform/ThreadStackManager.h>
#include <platform/bouffalolab/common/ThreadStackManagerImpl.h>
#include <utils_list.h>
#endif

Expand Down
20 changes: 9 additions & 11 deletions src/platform/bouffalolab/BL602/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -53,7 +51,7 @@ static_library("BL602") {
"../common/OTAImageProcessorImpl.h",
]
}

if (chip_enable_ble) {
sources += [
"../common/BLEManagerImpl.cpp",
Expand Down
9 changes: 5 additions & 4 deletions src/platform/bouffalolab/BL602/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*/

#include <lib/support/CHIPMemString.h>
#include <platform/internal/CHIPDeviceLayerInternal.h>
#include <platform/DiagnosticDataProvider.h>
#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>
#include <platform/internal/CHIPDeviceLayerInternal.h>

#include <lwip/tcpip.h>

extern "C" {
#include <bl_sys.h>
#include <bl_efuse.h>
#include <bl_sys.h>

#include <bl60x_fw_api.h>
#include <bl60x_wifi_driver/bl_main.h>
Expand Down Expand Up @@ -56,10 +56,11 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason
{
bootReason = BootReasonType::kSoftwareReset;
}
else {
else
{
bootReason = BootReasonType::kUnspecified;
}

return CHIP_NO_ERROR;
}

Expand Down
2 changes: 1 addition & 1 deletion src/platform/bouffalolab/BL602/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <platform/internal/CHIPDeviceLayerInternal.h>

#include <platform/PlatformManager.h>
#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>
#include <platform/bouffalolab/BL602/NetworkCommissioningDriver.h>
#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>
#include <platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp>

#include <lwip/tcpip.h>
Expand Down
6 changes: 3 additions & 3 deletions src/platform/bouffalolab/BL702/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down
5 changes: 3 additions & 2 deletions src/platform/bouffalolab/BL702/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

#include <platform/internal/CHIPDeviceLayerInternal.h>
#include <platform/DiagnosticDataProvider.h>
#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>
#include <platform/internal/CHIPDeviceLayerInternal.h>

extern "C" {
#include <bl_sys.h>
Expand Down Expand Up @@ -45,7 +45,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(BootReasonType & bootReason
{
bootReason = BootReasonType::kSoftwareReset;
}
else {
else
{
bootReason = BootReasonType::kUnspecified;
}
return CHIP_NO_ERROR;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/bouffalolab/BL702/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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"
"${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk"
2 changes: 1 addition & 1 deletion src/platform/bouffalolab/common/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "BLEManagerImpl.h"

#include <ble/CHIPBleServiceData.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/CHIPMemString.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/logging/CHIPLogging.h>
#include <platform/internal/BLEManager.h>
#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING
Expand Down
1 change: 0 additions & 1 deletion src/platform/bouffalolab/common/ConfigurationManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,5 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp
static void DoFactoryReset(intptr_t arg);
};


} // namespace DeviceLayer
} // namespace chip
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include <platform/internal/CHIPDeviceLayerInternal.h>

#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>
#include <platform/DiagnosticDataProvider.h>
#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>

#include <FreeRTOS.h>

Expand All @@ -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<uint64_t>(freeHeapSize);
Expand All @@ -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;
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/platform/bouffalolab/common/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <platform/PlatformManager.h>
#include <platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp>


namespace chip {
namespace DeviceLayer {

Expand Down

0 comments on commit 7d5bfc3

Please sign in to comment.