Skip to content

Commit

Permalink
[nrfconnect] Move VID & PID configuration to Kconfig (#15195)
Browse files Browse the repository at this point in the history
Move vendor and product IDs in nRF Connect examples from
CHIPProjectConfig.h to Kconfig. Kconfig values set both
the CHIP defines and are additionally passed to the OTA
image generation script.
  • Loading branch information
Damian-Nordic authored Feb 16, 2022
1 parent 00c9123 commit d671a52
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
*
* 0x8005: example lighting-app
*/
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
4 changes: 2 additions & 2 deletions examples/lighting-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ CONFIG_MPU_STACK_GUARD=y

# CHIP configuration
CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h"
# 20044 == 0x4E4C - "[N]ordic [L]ight"
CONFIG_CHIP_DEVICE_PRODUCT_ID=20044
# 32773 == 0x8005 (example lighting-app)
CONFIG_CHIP_DEVICE_PRODUCT_ID=32773

# Enable CHIP pairing automatically on application start.
CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y
7 changes: 0 additions & 7 deletions examples/lock-app/nrfconnect/main/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
*
* 0x4E4B: example lock-app
*/
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8006

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
2 changes: 2 additions & 0 deletions examples/lock-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ CONFIG_MPU_STACK_GUARD=y

# CHIP configuration
CONFIG_CHIP_PROJECT_CONFIG="main/include/CHIPProjectConfig.h"
# 32774 == 0x8006 (example lock-app)
CONFIG_CHIP_DEVICE_PRODUCT_ID=32774
7 changes: 0 additions & 7 deletions examples/shell/nrfconnect/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@

#define CHIP_DEVICE_CONFIG_DISABLE_SHELL_PING 1

/**
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
*
* 0x8012: example shell
*/
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8012

// shell app uses openthread but does not have the NETWORK_COMMISSIONING cluster or zap config
// Do not instantiate the NETWORK_COMMISSIONING thread driver
#define _NO_NETWORK_COMMISSIONING_DRIVER_
2 changes: 2 additions & 0 deletions examples/shell/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ CONFIG_MPU_STACK_GUARD=y

# CHIP configuration
CONFIG_CHIP_PROJECT_CONFIG="CHIPProjectConfig.h"
# 32786 == 0x8012 (example shell-app)
CONFIG_CHIP_DEVICE_PRODUCT_ID=32786
CONFIG_CHIP_NFC_COMMISSIONING=n

0 comments on commit d671a52

Please sign in to comment.