text: /*
   *    Copyright (c) 2020 Project CHIP Authors
   *    Copyright (c) 2020 Google LLC.
   *    All rights reserved.
   *
   *    Licensed under the Apache License, Version 2.0 (the "License");
   *    you may not use this file except in compliance with the License.
   *    You may obtain a copy of the License at
   *
   *        http://www.apache.org/licenses/LICENSE-2.0
   *
   *    Unless required by applicable law or agreed to in writing, software
   *    distributed under the License is distributed on an "AS IS" BASIS,
   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *    See the License for the specific language governing permissions and
   *    limitations under the License.
   */
  
  /**
   *    @file
   *          Example project configuration file for CHIP.
   *
   *          This is a place to put application or project-specific overrides
   *          to the default configuration values for general CHIP features.
   *
   */
  
  #pragma once
  
  // Security and Authentication disabled for development build.
  // For convenience, enable CHIP Security Test Mode and disable the requirement for
  // authentication in various protocols.
  // WARNING: These options make it possible to circumvent basic CHIP security functionality,
  // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
  #define CHIP_CONFIG_SECURITY_TEST_MODE 0
  #define CHIP_CONFIG_REQUIRE_AUTH 0
  
  // Use a default setup PIN 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
  
  // Use a default pairing code if one hasn't been provisioned in flash.
  #define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS"
  
  /**
   * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
   *
   * Enables the use of a hard-coded default serial number if none
   * is found in CHIP NV storage.
   */
  #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
  
  /**
   * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
   *
   * 0x235A: Chip's Vendor Id.
   */
  #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x235A
  
  /**
   * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
   *
   * 0x4B4C: K32W lighting-app
   */
  #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x4B4C
  
  /**
   * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION
   *
   * The product revision number assigned to device or product by the device vendor.  This
   * number is scoped to the device product id, and typically corresponds to a revision of the
   * physical device, a change to its packaging, and/or a change to its marketing presentation.
   * This value is generally *not* incremented for device software revisions.
   */
  #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION 100
  
  #ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION_STRING
  #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION_STRING "v0.1.0"
  #endif
  
  /**
   * CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING
   *
   * A string identifying the firmware revision running on the device.
   * CHIP currently expects the firmware version to be in the format
   * {MAJOR_VERSION}.0d{MINOR_VERSION}
   */
  #ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING
  #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING "04-2020-te2"
  #endif
  
  #ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
  #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION 42020
  #endif
  
  #ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME
  #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors"
  #endif
  
  #ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME
  #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App"
  #endif
  
  /**
   * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
   *
   * Enable support for CHIP-over-BLE (CHIPOBLE).
   */
  #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
  
  /**
   * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC
   *
   * Enables synchronizing the device's real time clock with a remote CHIP Time service
   * using the CHIP Time Sync protocol.
   */
  //#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1
  
  /**
   * CHIP_CONFIG_MAX_BINDINGS
   *
   * Maximum number of simultaneously active bindings per ChipExchangeManager
   * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4
   * in the worst case. Keeping another 4 as buffer.
   */
  #define CHIP_CONFIG_MAX_BINDINGS 8
  
  /**
   * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD
   *
   * Select the ability to offload event logs to any interested subscribers using WDM.
   */
  #define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1
  
  /**
   * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
   *
   * Enable recording UTC timestamps.
   */
  #define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1
  
  /**
   * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
   *
   * A size, in bytes, of the individual debug event logging buffer.
   */
  #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
  
  /**
   * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
   *
   * The amount of time in miliseconds after which BLE should change his advertisements
   * from fast interval to slow interval.
   *
   * 30000 (30 secondes).
   */
  #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000)
  
  /**
   * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
   *
   * The amount of time in miliseconds after which BLE advertisement should be disabled, counting
   * from the moment of slow advertisement commencement.
   *
   * Defaults to 9000000 (15 minutes).
   */
  #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_DEVICE_ADMINS
   *
   *  @brief
   *    Maximum number of administrators that can provision the device. Each admin
   *    can provision the device with their unique operational credentials and manage
   *    their access control lists.
   */
  #define CHIP_CONFIG_MAX_DEVICE_ADMINS 4 // 3 fabrics + 1 for rotation slack
  
  /**
   * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE
   *
   * For a development build, set the default importance of events to be logged as Debug.
   * Since debug is the lowest importance level, this means all standard, critical, info and
   * debug importance level vi events get logged.
   */
  #if BUILD_RELEASE
  #define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production
  #else
  #define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
  #endif // BUILD_RELEASE
  