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.

31 lines
752 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #include <stddef.h>
  2. #include <stdio.h>
  3. #include "cmdline_version.hpp"
  4. #include "global.hpp"
  5. #include "project_configs.h"
  6. #include "sdk/os/zos.hpp"
  7. #include "sdk\components\zcancmder\zcanreceiver_master.hpp"
  8. #include "transparent_version.hpp"
  9. #define TAG "main"
  10. using namespace std;
  11. using namespace iflytop;
  12. extern void umain();
  13. extern "C" {
  14. void StartDefaultTask(void const* argument) { umain(); }
  15. }
  16. void umain() {
  17. g_Key0.initAsInput(KEY1, ZGPIO::kMode_pullup, ZGPIO::kIRQ_noIrq, false);
  18. g_StateLight1.initAsOutput(STATE_LIGHT_GPIO, ZGPIO::kMode_pullup, false, false);
  19. if (g_Key0.getState()) {
  20. g_StateLight1.setState(true);
  21. cmdline_version_main();
  22. } else {
  23. g_StateLight1.setState(false);
  24. transparent_version_main();
  25. }
  26. };