Skip to content

Commit

Permalink
clenup
Browse files Browse the repository at this point in the history
  • Loading branch information
NeethuVisw committed Feb 26, 2024
1 parent 691e79c commit 680663c
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 111 deletions.
9 changes: 4 additions & 5 deletions examples/lock-app/renesas/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
*/

/**
* @file
* Example project configuration file for CHIP.
*
* This is a place to put application or project-specific overrides
* to the default configuration values for general CHIP features.
* @file
* Example project configuration file for CHIP.
* This is a place to put application or project-specific overrides
* to the default configuration values for general CHIP features.
*
*/

Expand Down
1 change: 0 additions & 1 deletion examples/platform/renesas/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#chip_ble_project_config_include = "<CHIPProjectConfig.h>"
chip_device_project_config_include = "<CHIPProjectConfig.h>"
chip_project_config_include = "<CHIPProjectConfig.h>"
chip_inet_project_config_include = "<CHIPProjectConfig.h>"
Expand Down
7 changes: 3 additions & 4 deletions src/platform/renesas/BlePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
*/

/**
* @file
* Platform-specific configuration overrides for the CHIP BLE
* Layer on renesas platforms.
* @file
* Platform-specific configuration overrides for the CHIP BLE Layer on Renesas platforms.
*
*/

Expand All @@ -31,4 +30,4 @@

// ========== Platform-specific Configuration Overrides =========

/* none so far */
// TODO
4 changes: 2 additions & 2 deletions src/platform/renesas/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/

/**
* @file
* Defines compile-time configuration overrides for the chip Device Layer.
* @file
* Defines compile-time configuration overrides for the chip Device Layer.
*/

#pragma once
Expand Down
5 changes: 2 additions & 3 deletions src/platform/renesas/CHIPDevicePlatformEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
*/

/**
* @file
* Defines platform-specific event types and data for the Chip
* Device Layer on the platform.
* @file
* Defines platform-specific event types and data for the Chip Device Layer on the platform.
*/

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions src/platform/renesas/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

/**
* @file
* Platform-specific configuration overrides for CHIP.
* @file
* Platform-specific configuration overrides for CHIP.
*/

#pragma once
Expand Down
5 changes: 2 additions & 3 deletions src/platform/renesas/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
*/

/**
* @file
* Provides the implementation of the Device Layer ConfigurationManager object
* for Renesas platform.
* @file
* Provides the implementation of the Device Layer ConfigurationManager object for Renesas platform.
*/
/* this file behaves like a config.h, comes first */
#include <platform/internal/CHIPDeviceLayerInternal.h>
Expand Down
12 changes: 2 additions & 10 deletions src/platform/renesas/ConfigurationManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
*/

/**
* @file
* Provides an implementation of the ConfigurationManager object
* for Renesas platform.
* @file
* Provides an implementation of the ConfigurationManager object for Renesas platform.
*/

#pragma once
Expand All @@ -37,25 +36,20 @@ namespace DeviceLayer {
class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImpl<Internal::RenesasConfig>
{
public:
// This returns an instance of this class.
static ConfigurationManagerImpl & GetDefaultInstance();
CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override;
CHIP_ERROR StoreRebootCount(uint32_t rebootCount) override;
CHIP_ERROR GetBootReason(uint32_t & bootReason) override;
CHIP_ERROR StoreBootReason(uint32_t bootReason) override;

private:
// ===== Members that implement the ConfigurationManager public interface.

CHIP_ERROR Init(void) override;
bool CanFactoryReset(void) override;
void InitiateFactoryReset(void) override;
CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override;
CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override;

// NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>.

// ===== Members that implement the GenericConfigurationManagerImpl protected interface.
CHIP_ERROR ReadConfigValue(Key key, bool & val) override;
CHIP_ERROR ReadConfigValue(Key key, uint32_t & val) override;
CHIP_ERROR ReadConfigValue(Key key, uint64_t & val) override;
Expand All @@ -69,14 +63,12 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp
CHIP_ERROR WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) override;
void RunConfigUnitTest(void) override;

// ===== Private members reserved for use by this class only.

static void DoFactoryReset(intptr_t arg);
};

/**
* Returns the platform-specific implementation of the ConfigurationManager object.
*
* Applications can use this to gain access to features of the ConfigurationManager
* that are specific to the selected platform.
*/
Expand Down
8 changes: 0 additions & 8 deletions src/platform/renesas/ConnectivityManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,13 @@ class ConnectivityManagerImpl final : public ConnectivityManager,
public Internal::GenericConnectivityManagerImpl_NoThread<ConnectivityManagerImpl>
#endif
{
// Allow the ConnectivityManager interface class to delegate method calls to
// the implementation methods provided by this class.
friend class ConnectivityManager;

private:
// ===== Members that implement the ConnectivityManager abstract interface.

bool _HaveServiceConnectivity(void);
CHIP_ERROR _Init(void);
void _OnPlatformEvent(const ChipDeviceEvent * event);

// ===== Members for internal use by the following friends.

friend ConnectivityManager & ConnectivityMgr(void);
friend ConnectivityManagerImpl & ConnectivityMgrImpl(void);

Expand All @@ -82,7 +76,6 @@ class ConnectivityManagerImpl final : public ConnectivityManager,

/**
* Returns the public interface of the ConnectivityManager singleton object.
*
* Chip applications should use this to access features of the ConnectivityManager object
* that are common to all platforms.
*/
Expand All @@ -93,7 +86,6 @@ inline ConnectivityManager & ConnectivityMgr(void)

/**
* Returns the platform-specific implementation of the ConnectivityManager singleton object.
*
* Chip applications can use this to gain access to features of the ConnectivityManager
* that are specific to the renesas platform.
*/
Expand Down
11 changes: 2 additions & 9 deletions src/platform/renesas/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
*/

/**
* @file
* Provides an implementation of the DiagnosticDataProvider object
* for renesas platform.
* @file
* Provides an implementation of the DiagnosticDataProvider object for renesas platform.
*/

#include <platform/internal/CHIPDeviceLayerInternal.h>
Expand All @@ -39,17 +38,13 @@ DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance()

CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree)
{
// @Neethu If you get errors on xPortGetFreeHeapSize, check if this function call is enabled in FreeRTOSConfig.h.
// Note that there are multiple in the Smart-Bridge project. Make sure that you modify the correct one.
size_t freeHeapSize = xPortGetFreeHeapSize();
currentHeapFree = static_cast<uint64_t>(freeHeapSize);
return CHIP_NO_ERROR;
}

CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed)
{
// @Neethu If you get errors on xPortGetFreeHeapSize, check if this function call is enabled in FreeRTOSConfig.h.
// Note that there are multiple in the Smart-Bridge project. Make sure that you modify the correct one.
// Calculate the Heap used based on Total heap - Free heap
int64_t heapUsed = (configTOTAL_HEAP_SIZE - xPortGetFreeHeapSize());

Expand All @@ -61,8 +56,6 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeap

CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark)
{
// @Neethu If you get errors on xPortGetFreeHeapSize, check if this function call is enabled in FreeRTOSConfig.h.
// Note that there are multiple in the Smart-Bridge project. Make sure that you modify the correct one.
// FreeRTOS records the lowest amount of available heap during runtime
// currentHeapHighWatermark wants the highest heap usage point so we calculate it here
int64_t HighestHeapUsageRecorded = (configTOTAL_HEAP_SIZE - xPortGetMinimumEverFreeHeapSize());
Expand Down
5 changes: 1 addition & 4 deletions src/platform/renesas/DiagnosticDataProviderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ namespace chip {
namespace DeviceLayer {

/**
* Concrete implementation of the PlatformManager singleton object for Linux platforms.
* Concrete implementation of the PlatformManager singleton object for renesas platforms.
*/
class DiagnosticDataProviderImpl : public DiagnosticDataProvider
{
public:
static DiagnosticDataProviderImpl & GetDefaultInstance();

// ===== Methods that implement the PlatformManager abstract interface.

CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override;
CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override;
CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override;
Expand All @@ -47,7 +45,6 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider

/**
* Returns the platform-specific implementation of the DiagnosticDataProvider singleton object.
*
* Applications can use this to gain access to features of the DiagnosticDataProvider
* that are specific to the selected platform.
*/
Expand Down
5 changes: 1 addition & 4 deletions src/platform/renesas/KeyValueStoreManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class KeyValueStoreManagerImpl : public KeyValueStoreManager
CHIP_ERROR _Put(const char * key, const void * value, size_t value_size) { return CHIP_ERROR_NOT_IMPLEMENTED; }

private:
// ===== Members for internal use by the following friends.
friend KeyValueStoreManager & KeyValueStoreMgr();
friend KeyValueStoreManagerImpl & KeyValueStoreMgrImpl();

Expand All @@ -44,7 +43,6 @@ class KeyValueStoreManagerImpl : public KeyValueStoreManager

/**
* Returns the public interface of the KeyValueStoreManager singleton object.
*
* Chip applications should use this to access features of the KeyValueStoreManager object
* that are common to all platforms.
*/
Expand All @@ -55,9 +53,8 @@ inline KeyValueStoreManager & KeyValueStoreMgr(void)

/**
* Returns the platform-specific implementation of the KeyValueStoreManager singleton object.
*
* Chip applications can use this to gain access to features of the KeyValueStoreManager
* that are specific to the ESP32 platform.
* that are specific to the renesas platform.
*/
inline KeyValueStoreManagerImpl & KeyValueStoreMgrImpl(void)
{
Expand Down
7 changes: 4 additions & 3 deletions src/platform/renesas/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
*/

/**
* @file
* Stub for PlatformManagerImpl for renesas platform.
* @file
* Stub for PlatformManagerImpl for renesas platform.
*/
#include <platform/PlatformManager.h>

namespace chip {
namespace DeviceLayer {

/** Singleton instance of the KeyValueStoreManager implementation object.
/**
* Singleton instance of the KeyValueStoreManager implementation object.
*/
PlatformManagerImpl PlatformManagerImpl::sInstance;

Expand Down
16 changes: 4 additions & 12 deletions src/platform/renesas/PlatformManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/

/**
* @file
* Stub platform manager for renesas platform.
* @file
* Stub platform manager for renesas platform.
*/

#pragma once
Expand All @@ -31,20 +31,16 @@ namespace chip {
namespace DeviceLayer {

/**
* Concrete implementation of the PlatformManager singleton object for Linux platforms.
* Concrete implementation of the PlatformManager singleton object for Renesas platforms.
*/
class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_FreeRTOS<PlatformManagerImpl>
{
// Allow the PlatformManager interface class to delegate method calls to
// the implementation methods provided by this class.
friend PlatformManager;

public:
// ===== Platform-specific members that may be accessed directly by the application.
bool _IsChipStackLockedByCurrentThread() const { return true; };

private:
// ===== Methods that implement the PlatformManager abstract interface.

CHIP_ERROR _InitChipStack() { return CHIP_NO_ERROR; }
void _Shutdown() {}
Expand Down Expand Up @@ -106,8 +102,6 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener
bool _TryLockChipStack() { return true; }
void _UnlockChipStack() {}

// ===== Members for internal use by the following friends.

friend PlatformManager & PlatformMgr();
friend PlatformManagerImpl & PlatformMgrImpl();
friend class Internal::BLEManagerImpl;
Expand All @@ -120,7 +114,6 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener

/**
* Returns the public interface of the PlatformManager singleton object.
*
* chip applications should use this to access features of the PlatformManager object
* that are common to all platforms.
*/
Expand All @@ -131,9 +124,8 @@ inline PlatformManager & PlatformMgr()

/**
* Returns the platform-specific implementation of the PlatformManager singleton object.
*
* chip applications can use this to gain access to features of the PlatformManager
* that are specific to the ESP32 platform.
* that are specific to the renesas platform.
*/
inline PlatformManagerImpl & PlatformMgrImpl()
{
Expand Down
4 changes: 2 additions & 2 deletions src/platform/renesas/RenesasConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

/**
* @file
* Utilities for accessing persisted device configuration.
* @file
* Utilities for accessing persisted device configuration.
*/
/* this file behaves like a config.h, comes first */
#include <platform/internal/CHIPDeviceLayerInternal.h>
Expand Down
5 changes: 2 additions & 3 deletions src/platform/renesas/RenesasConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
*/

/**
* @file
* Utilities for accessing persisted device configuration on
* renesas platforms.
* @file
* Utilities for accessing persisted device configuration on renesas platforms.
*/

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions src/platform/renesas/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/

/**
* @file
* Platform-specific configuration overrides for the CHIP system layer.
* @file
* Platform-specific configuration overrides for the CHIP system layer.
*
*/

Expand Down
1 change: 0 additions & 1 deletion src/platform/renesas/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ chip_target_style = "embedded"
chip_crypto = "platform"

chip_device_platform = "renesas"
print("=========chip_device_platform: ${chip_device_platform}")
chip_mdns = "platform"

chip_enable_openthread = false
Expand Down
2 changes: 0 additions & 2 deletions third_party/renesas_sdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ declare_args() {
renesas_sdk_target = ""
}

#assert(renesas_sdk_target != "", "renesas_sdk_target must be specified")

group("renesas_sdk") {
public_deps = [ renesas_sdk_target ]
}
Loading

0 comments on commit 680663c

Please sign in to comment.