esp_targets.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /* Copyright 2020 Espressif Systems (Shanghai) PTE LTD
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #pragma once
  16. #include <stdint.h>
  17. #include "esp_loader.h"
  18. typedef struct {
  19. uint32_t cmd;
  20. uint32_t usr;
  21. uint32_t usr1;
  22. uint32_t usr2;
  23. uint32_t w0;
  24. uint32_t mosi_dlen;
  25. uint32_t miso_dlen;
  26. } target_registers_t;
  27. esp_loader_error_t loader_detect_chip(target_chip_t *target, const target_registers_t **regs);
  28. esp_loader_error_t loader_read_spi_config(target_chip_t target_chip, uint32_t *spi_config);
  29. bool encryption_in_begin_flash_cmd(target_chip_t target);