AppConfig.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #pragma once
  20. #include "silabs_utils.h"
  21. // ---- Window Example App Config ----
  22. #define APP_TASK_NAME "APP"
  23. #define BLE_DEV_NAME "SiLabs-Window"
  24. #define LCD_SIZE 128
  25. #define LCD_MARGIN_SIZE 1
  26. #define LCD_BORDER_SIZE 2
  27. #define LCD_FRAME_SIZE (2 * LCD_MARGIN_SIZE + LCD_BORDER_SIZE)
  28. #define LCD_COVER_SIZE (LCD_SIZE - 2 * LCD_FRAME_SIZE)
  29. #define LIFT_OPEN_LIMIT 0
  30. #define LIFT_CLOSED_LIMIT (LCD_COVER_SIZE - 1)
  31. #define LIFT_DELTA 1000 // 10%
  32. #define TILT_OPEN_LIMIT 0
  33. #define TILT_CLOSED_LIMIT (LCD_COVER_SIZE / 10 - 1)
  34. #define TILT_DELTA 1000 // 10%
  35. #define WINDOW_COVER_COUNT 2
  36. #ifndef WINDOW_COVER_ENDPOINT1
  37. #define WINDOW_COVER_ENDPOINT1 1
  38. #endif
  39. #ifndef WINDOW_COVER_ENDPOINT2
  40. #define WINDOW_COVER_ENDPOINT2 2
  41. #endif
  42. #ifndef LONG_PRESS_TIMEOUT
  43. #define LONG_PRESS_TIMEOUT 3000
  44. #endif
  45. #ifndef COVER_LIFT_TILT_TIMEOUT
  46. #define COVER_LIFT_TILT_TIMEOUT 500
  47. #endif