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.

30 lines
532 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #include "main.hpp"
  2. #include <stddef.h>
  3. #include <stdio.h>
  4. #include "main.h"
  5. #include "project.hpp"
  6. //
  7. #include "sdk/hal/zhal.hpp"
  8. namespace iflytop {
  9. Main gmain;
  10. };
  11. using namespace iflytop;
  12. void Main::run() {
  13. iflytop_no_os_cfg_t cfg = {
  14. .delayhtim = &DELAY_US_TIMER,
  15. .debuguart = &DEBUG_UART,
  16. };
  17. iflytop_no_os_init(&cfg);
  18. printf("Hello World!\r\n");
  19. DEBUG_LIGHT_GPIO.initAsOutput(true);
  20. ZHAL_CORE_REG(300, { DEBUG_LIGHT_GPIO.toggleState(); });
  21. while (1) {
  22. ZHALCORE::getInstance()->loop();
  23. }
  24. }