CHIPProjectConfig.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 0x8005
  54. /**
  55. * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
  56. *
  57. * Enable support for Chip-over-BLE (CHIPoBLE).
  58. */
  59. #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
  60. /**
  61. * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
  62. *
  63. * Enables the use of a hard-coded default serial number if none
  64. * is found in Chip NV storage.
  65. */
  66. #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
  67. /**
  68. * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
  69. *
  70. * Enable recording UTC timestamps.
  71. */
  72. #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1
  73. /**
  74. * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
  75. *
  76. * A size, in bytes, of the individual debug event logging buffer.
  77. */
  78. #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
  79. /**
  80. * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL
  81. *
  82. * @brief
  83. * Active retransmit interval, or time to wait before retransmission after
  84. * subsequent failures in milliseconds.
  85. *
  86. * This is the default value, that might be adjusted by end device depending on its
  87. * needs (e.g. sleeping period) using Service Discovery TXT record CRA key.
  88. *
  89. */
  90. #define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32)
  91. #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1