Skip to content

Commit

Permalink
Merge pull request project-chip#10 from mihai-ignat/fix/update_suppor…
Browse files Browse the repository at this point in the history
…ted_chips

Fix platform check issue
  • Loading branch information
doru91 authored Mar 24, 2022
2 parents 96c7cec + 444edca commit daba06f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/platform/nxp/k32w/k32w0/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include <openthread/platform/entropy.h>

#include "K32W061.h"
#include "fsl_device_registers.h"

namespace chip {
namespace DeviceLayer {
Expand All @@ -57,13 +57,15 @@ static int app_entropy_source(void * data, unsigned char * output, size_t len, s
CHIP_ERROR PlatformManagerImpl::_InitChipStack(void)
{
CHIP_ERROR err;
uint32_t chipType;

// Initialize the configuration system.
err = Internal::K32WConfig::Init();
SuccessOrExit(err);
chipType = Chip_GetType();

/* Check that chip type is from K32W0x1 family: K32W041A, K32W041AM, K32W061 or K32W041 */
if (Chip_GetType() <= CHIP_K32W041)
if ((chipType != CHIP_K32W061) && (chipType != CHIP_K32W041) && (chipType != CHIP_K32W041A) && (chipType != CHIP_K32W041AM))
{
err = CHIP_ERROR_INTERNAL;
ChipLogError(DeviceLayer, "Invalid chip type, expected K32W0x1");
Expand Down

0 comments on commit daba06f

Please sign in to comment.