blob: 503d91945bda06846b1371ebfeaf77c99b19316d [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
27#endif /* STM32CUBEPROGRAMMER_H */