main.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #include "global.h"
  2. unsigned long cStartDelay;
  3. int main(void)
  4. {
  5. hw_board_init();
  6. //保存24电源的状态
  7. //参数变量初始化
  8. variable_init();
  9. //应用初始化
  10. mosbus_app_init();
  11. poweroff_app_init();
  12. //GetMachineType();
  13. InitPWM();
  14. user_app_init();
  15. nodelink_master_app_init();
  16. //log_app_init();
  17. InitAction();
  18. EncoderInit();
  19. cStartDelay = dwTickCount + 1200;
  20. while(dwTickCount <= cStartDelay)
  21. {
  22. io_app_read_input();
  23. nodelink_read_input();
  24. io_app_write_ouput();
  25. nodelink_write_output();
  26. }
  27. while (1)
  28. {
  29. //运行状态
  30. hw_run_status_show();
  31. io_app_read_input();
  32. nodelink_read_input();
  33. Action();
  34. poweroff_app_run();
  35. user_app_run();
  36. //CheckTimeOver();
  37. io_app_write_ouput();
  38. nodelink_write_output();
  39. //nodelink_master_app_run();
  40. ReSetWifi();
  41. //io_app_run();
  42. //通讯协议
  43. modbus_app_proc();
  44. }
  45. }