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
639 B

2 years ago
  1. #include "device.hpp"
  2. #define TAG "main"
  3. namespace iflytop {
  4. extern void uart_debug_fn_reg();
  5. extern void can_cmd_reg_fn_reg();
  6. }; // namespace iflytop
  7. using namespace iflytop;
  8. extern "C"{
  9. void umain(void) {
  10. ZHALCORE::cfg_t oscfg = {
  11. .delayhtim = &DELAY_US_TIMER,
  12. .debuguart = &DEBUG_UART,
  13. };
  14. ZHALCORE::getInstance()->initialize(oscfg);
  15. ZLOGI(TAG, "pipeline_disinfection_liquid_path_control:%s", VERSION);
  16. device_init();
  17. uart_debug_fn_reg();
  18. can_cmd_reg_fn_reg();
  19. ZLOGI(TAG, "init done");
  20. while (1) {
  21. cmdScheduler.schedule();
  22. ZHALCORE::getInstance()->loop();
  23. HAL_IWDG_Refresh(&hiwdg);
  24. }
  25. }
  26. }