You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
850 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #pragma once
  2. #define VERSION "testv1.0"
  3. #define KEY_PERIOD 5
  4. #define EXCEPTION_CHECK_PERIOD 50
  5. //自动关机时,一个灯等效的时间
  6. #define AUTO_SHUTDOWN_ONE_LIGHT_EQ_TIME_S 20
  7. //间歇工作周期
  8. // #define INTERVAL_WORK_PERIOD_MS (60 * 1000)
  9. #define INTERVAL_WORK_PERIOD_MS (20 * 1000)
  10. //间歇工作工作时间占整个周期的百分比
  11. #define INTERVAL_WORK_DUTY ((uint8_t)50)
  12. #define HIGH_LEVEL_PWM_FREQ 25000
  13. #define LOW_LEVEL_PWM_FREQ 10000
  14. // #define HIGH_LEVEL_PWM_FREQ 99000
  15. // #define LOW_LEVEL_PWM_FREQ 50000
  16. #define MIN_PWM_FREQ 5000
  17. #define PWM_CHANGE_INTERVAL_TIME_MS 1000
  18. //每次PWM变化的频率
  19. #define PWM_CHANGE_STEP_FREQ 1000
  20. //当目标PWM小于这个数值时,直接变化到20k
  21. #define PWM_CHANGE_BEGIN_STEP_FREQ 20000
  22. //PWM改变一次的周期
  23. #define PWM_CHANGE_PERIOD 1000
  24. #define PWM_PULSE_WIDTH_US 8