Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[K32W0] Check module type #12162

Merged
merged 1 commit into from
Nov 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 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,15 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void)
// Initialize the configuration system.
err = Internal::K32WConfig::Init();
SuccessOrExit(err);

if (Chip_GetType() != CHIP_K32W061)
{
err = CHIP_ERROR_INTERNAL;
andy31415 marked this conversation as resolved.
Show resolved Hide resolved
ChipLogError(DeviceLayer, "Invalid chip type, expected K32W061");

goto exit;
}

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

Expand Down