esp_hosted_host_init.c 657 B

1234567891011121314151617181920212223242526
  1. /*
  2. * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "os_header.h"
  7. #include "os_wrapper.h"
  8. #include "esp_log.h"
  9. #include "esp_hosted_api.h"
  10. #include "esp_private/startup_internal.h"
  11. DEFINE_LOG_TAG(host_init);
  12. //ESP_SYSTEM_INIT_FN(esp_hosted_host_init, BIT(0), 120)
  13. static void __attribute__((constructor)) esp_hosted_host_init(void)
  14. {
  15. ESP_LOGI(TAG, "ESP Hosted : Host chip_ip[%d]", CONFIG_IDF_FIRMWARE_CHIP_ID);
  16. ESP_ERROR_CHECK(esp_hosted_init());
  17. }
  18. static void __attribute__((destructor)) esp_hosted_host_deinit(void)
  19. {
  20. ESP_LOGI(TAG, "ESP Hosted deinit");
  21. esp_hosted_deinit();
  22. }