blob: 0f5a64d45168199e84d79f06ab1157112c49155f [file] [log] [blame]
Patrick Delaunayfb929282020-09-14 11:13:34 +02001/*
2 * Copyright (c) 2021, STMicroelectronics - All Rights Reserved
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef STM32CUBEPROGRAMMER_H
8#define STM32CUBEPROGRAMMER_H
9
10#include <stdint.h>
11
12#include <usb_dfu.h>
13
14/* Phase definition */
15#define PHASE_FLASHLAYOUT 0U
16#define PHASE_SSBL 3U
17#define PHASE_CMD 0xF1U
18#define PHASE_RESET 0xFFU
19
20/* Functions provided by plat */
21uint8_t usb_dfu_get_phase(uint8_t alt);
22
23int stm32cubeprog_usb_load(struct usb_handle *usb_core_handle,
24 uintptr_t ssbl_base,
25 size_t ssbl_len);
26
Patrick Delaunayfc4cac72020-10-06 15:11:41 +020027int stm32cubeprog_uart_load(uintptr_t instance, uintptr_t base, size_t len);
28
Patrick Delaunayfb929282020-09-14 11:13:34 +020029#endif /* STM32CUBEPROGRAMMER_H */