stm32cubeprogrammer.h 650 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2021, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32CUBEPROGRAMMER_H
  7. #define STM32CUBEPROGRAMMER_H
  8. #include <stdint.h>
  9. #include <usb_dfu.h>
  10. /* Phase definition */
  11. #define PHASE_FLASHLAYOUT 0U
  12. #define PHASE_SSBL 3U
  13. #define PHASE_CMD 0xF1U
  14. #define PHASE_RESET 0xFFU
  15. /* Functions provided by plat */
  16. uint8_t usb_dfu_get_phase(uint8_t alt);
  17. int stm32cubeprog_usb_load(struct usb_handle *usb_core_handle,
  18. uintptr_t ssbl_base,
  19. size_t ssbl_len);
  20. int stm32cubeprog_uart_load(uintptr_t instance, uintptr_t base, size_t len);
  21. #endif /* STM32CUBEPROGRAMMER_H */