CHIPProjectConfig.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. *
  3. * Copyright (c) 2020 Project CHIP Authors
  4. * Copyright (c) 2019 Google LLC.
  5. * All rights reserved.
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. /**
  20. * @file
  21. * Example project configuration file for CHIP.
  22. *
  23. * This is a place to put application or project-specific overrides
  24. * to the default configuration values for general CHIP features.
  25. *
  26. */
  27. #pragma once
  28. // Use a default pairing code if one hasn't been provisioned in flash.
  29. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
  30. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
  31. #endif
  32. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR
  33. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
  34. #endif
  35. // For convenience, Chip Security Test Mode can be enabled and the
  36. // requirement for authentication in various protocols can be disabled.
  37. //
  38. // WARNING: These options make it possible to circumvent basic Chip security functionality,
  39. // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
  40. //
  41. #define CHIP_CONFIG_SECURITY_TEST_MODE 0
  42. /**
  43. * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
  44. *
  45. * 0xFFF1: Test vendor
  46. */
  47. #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1
  48. /**
  49. * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
  50. *
  51. * 0x8005: example lighting app
  52. */
  53. #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004
  54. /**
  55. * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION
  56. *
  57. * The hardware version number assigned to device or product by the device vendor. This
  58. * number is scoped to the device product id, and typically corresponds to a revision of the
  59. * physical device, a change to its packaging, and/or a change to its marketing presentation.
  60. * This value is generally *not* incremented for device software versions.
  61. */
  62. #define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1
  63. /**
  64. * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
  65. *
  66. * A uint32_t identifying the software version running on the device.
  67. */
  68. /* The SoftwareVersion attribute of the Basic cluster. */
  69. #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
  70. #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0001
  71. #endif
  72. /**
  73. * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
  74. *
  75. * Enable support for Chip-over-BLE (CHIPoBLE).
  76. */
  77. #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
  78. /**
  79. * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
  80. *
  81. * Enables the use of a hard-coded default serial number if none
  82. * is found in Chip NV storage.
  83. */
  84. #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
  85. /**
  86. * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
  87. *
  88. * Enable recording UTC timestamps.
  89. */
  90. #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1
  91. /**
  92. * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
  93. *
  94. * A size, in bytes, of the individual debug event logging buffer.
  95. */
  96. #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
  97. /**
  98. * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL
  99. *
  100. * @brief
  101. * Active retransmit interval, or time to wait before retransmission after
  102. * subsequent failures in milliseconds.
  103. *
  104. * This is the default value, that might be adjusted by end device depending on its
  105. * needs (e.g. sleeping period) using Service Discovery TXT record CRA key.
  106. *
  107. */
  108. #define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32)
  109. #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1