Skip to content

Commit

Permalink
Fix NFC enabling (#17373)
Browse files Browse the repository at this point in the history
* Fix NFC enabling

Set all the defines required for NFC if chip_enable_nfc is true.

Signed-off-by: Doru Gucea <[email protected]>

* Restyled by gn

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
doru91 and restyled-commits authored Apr 14, 2022
1 parent 21024aa commit 01e54b2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@
*/
#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)

/**
* CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC
*
* Set these defines to 1 if NFC Commissioning is needed
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 1
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 1

/**
* @def CHIP_CONFIG_MAX_FABRICS
*
Expand Down
8 changes: 0 additions & 8 deletions examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@
*/
#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)

/**
* CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC
*
* Set these defines to 1 if NFC Commissioning is needed
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 1
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 1

/**
* @def CHIP_CONFIG_MAX_FABRICS
*
Expand Down
8 changes: 0 additions & 8 deletions examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,6 @@
*/
#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)

/**
* CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC
*
* Set these defines to 1 if NFC Commissioning is needed
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0

/**
* @def CHIP_CONFIG_MAX_FABRICS
*
Expand Down
5 changes: 4 additions & 1 deletion src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {
}

if (chip_enable_nfc) {
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_NFC=1" ]
defines += [
"CHIP_DEVICE_CONFIG_ENABLE_NFC=1",
"CONFIG_CHIP_NFC_COMMISSIONING=1",
]
}

if (chip_enable_ota_requestor) {
Expand Down

0 comments on commit 01e54b2

Please sign in to comment.