zephyr_port.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2022 KT-Elektronik, Klaucke und Partner GmbH
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #pragma once
  17. #include "esp_loader_io.h"
  18. #include <zephyr/kernel.h>
  19. #include <zephyr/drivers/gpio.h>
  20. #include <stdint.h>
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. typedef struct {
  25. const struct device *uart_dev;
  26. const struct gpio_dt_spec enable_spec;
  27. const struct gpio_dt_spec boot_spec;
  28. } loader_zephyr_config_t;
  29. esp_loader_error_t loader_port_zephyr_init(const loader_zephyr_config_t *config);
  30. #ifdef __cplusplus
  31. }
  32. #endif