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.

59 lines
1.5 KiB

2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #include <stddef.h>
  2. #include <stdio.h>
  3. #include "service/config_service.h"
  4. #include "zsdk/zsdk.h"
  5. #define TAG "main"
  6. using namespace std;
  7. extern void umain();
  8. extern "C" {
  9. extern void MX_LWIP_Init(void);
  10. void StartDefaultTask(void const* argument) { umain(); }
  11. }
  12. /*******************************************************************************
  13. * MAIN *
  14. *******************************************************************************/
  15. /**
  16. * @brief
  17. * | extern_if_service |
  18. * ========================================
  19. * | reg_manager | device_info |
  20. * ========================================
  21. * | fpage_if |
  22. * =========================
  23. *
  24. */
  25. extern "C" {
  26. // void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
  27. // }
  28. }
  29. // void debug_light_ctrl() {
  30. // static uint32_t lastcall = 0;
  31. // static bool light_status = false;
  32. // if (zaf_has_passedms(lastcall) > 100) {
  33. // light_status = !light_status;
  34. // zaf_gpio_write(&m_debug_led, light_status);
  35. // lastcall = zaf_get_ticket();
  36. // }
  37. // }
  38. void umain() {
  39. ZLOGI(TAG, "system init done");
  40. int32_t count = 0;
  41. ZLOGI(TAG, "%s: %d.%d.%d", PROJECT, VERSION_MAIN(PC_VERSION), VERSION_SUB(PC_VERSION), VERSION_FIX(PC_VERSION));
  42. ZLOGI(TAG, "sn: %s", sn_get_str());
  43. config_init();
  44. while (true) {
  45. osDelay(10);
  46. }
  47. }