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.

63 lines
1.9 KiB

4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 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
4 years ago
  1. /*********************************************************
  2. *Copyright (C), 2017, Shanghai Eastsoft Microelectronics Co., Ltd
  3. *: main.h
  4. * : AE Team
  5. * : V1.00
  6. * : 2021/05/13
  7. * :
  8. * : 使
  9. **********************************************************/
  10. #ifndef __MAIN_H__
  11. #define __MAIN_H__
  12. #include "lib_config.h"
  13. #include "light.h"
  14. #include "system_ES8P5066.h"
  15. #include "systick.h"
  16. //#include "gpio.h"
  17. #include "irqhandler.h"
  18. #include "key.h"
  19. #include "ozone_pwm_control.h"
  20. #include "ozone_work.h"
  21. #include "port.h"
  22. #include "pwm.h"
  23. #include "timer.h"
  24. #include "uart0.h"
  25. typedef enum {
  26. WORK_LEVEL_CLOSE = 0, /*关闭PWM输出,关闭RGB*/
  27. WORK_LEVEL_HIGHT = 1, /*高档*/
  28. WORK_LEVEL_MIDDLE = 2, /*中档*/
  29. WORK_LEVEL_LOW = 3, /*低档*/
  30. } WORK_LEVEL_T;
  31. typedef struct {
  32. bool no_error; /*没有异常*/
  33. bool fan_error_status; /*风扇电压异常*/
  34. bool way_circuit_error_status; /*总电压异常*/
  35. } error_state_t;
  36. // void Uart0Init(void);
  37. // void Uart0SendBuff(uint8_t *buff);
  38. // void port_do_debug_light_state(void);
  39. // void LedInit(void);
  40. void process_intervalkey_press_even(void);
  41. void update_interval_period_duty(uint8_t interval_duty);
  42. void restore_the_mode_before_intermittent_work(void);
  43. void process_rgb_flicker(void);
  44. void power_on_ozone_working_status(void);
  45. void update_ozone_work_gears(WORK_LEVEL_T gears);
  46. void process_gearskey_press_even(void);
  47. void shutdown(void);
  48. void starting_up(void);
  49. void process_switchkey(void);
  50. void updae_led_light_mode(void);
  51. void update_timing_time(void);
  52. void try_shutdown(void);
  53. bool timing_function_is_enable(void);
  54. void iwdt_init(void);
  55. void feed_iwdt(void);
  56. void process_error_even(void);
  57. #endif