Skip to content

Commit

Permalink
[K32W0] Check module type
Browse files Browse the repository at this point in the history
Make sure that the application runs on K32W061 (Thread + BLE).

Signed-off-by: Doru Gucea <[email protected]>
  • Loading branch information
doru91 committed Nov 24, 2021
1 parent 71a3fb2 commit 026f0b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include <openthread/platform/entropy.h>

#include "K32W061.h"

namespace chip {
namespace DeviceLayer {

Expand All @@ -59,6 +61,13 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void)
// Initialize the configuration system.
err = Internal::K32WConfig::Init();
SuccessOrExit(err);

if (Chip_GetType() != CHIP_K32W061)
{
err = CHIP_ERROR_INTERNAL;
goto exit;
}

SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance());
SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance());

Expand Down

0 comments on commit 026f0b7

Please sign in to comment.