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.

45 lines
1.0 KiB

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. //
  4. #include "base_service/base_service.h"
  5. #include "service/network_service.h"
  6. //
  7. #define TAG "main"
  8. using namespace std;
  9. extern void umain();
  10. extern "C" {
  11. extern void MX_LWIP_Init(void);
  12. void StartDefaultTask(void const* argument) {
  13. umain();
  14. }
  15. }
  16. /*******************************************************************************
  17. * MAIN *
  18. *******************************************************************************/
  19. xs_gpio_t m_debug_led;
  20. void umain() {
  21. XS_LOGI(TAG, "%s:%s", PC_PROJECT_NAME, PC_VERSION);
  22. /**
  23. * @brief ָʾƳʼ
  24. */
  25. xs_gpio_init_as_output(&m_debug_led, PC_DEBUG_LIGHT_GPIO, kxs_gpio_nopull, false, false);
  26. /**
  27. * @brief óʼ
  28. */
  29. config_init();
  30. /**
  31. * @brief ʼ
  32. */
  33. network_service_init();
  34. while (true) {
  35. xs_gpio_write(&m_debug_led, true);
  36. xs_delay_ms(100);
  37. xs_gpio_write(&m_debug_led, false);
  38. xs_delay_ms(100);
  39. }
  40. }