Debian Codegraph @

plat/st/common/include/stm32cubeprogrammer.h

raw
1 /*
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 */
21 uint8_t usb_dfu_get_phase(uint8_t alt);
22
23 int stm32cubeprog_usb_load(struct usb_handle *usb_core_handle,
24 uintptr_t ssbl_base,
25 size_t ssbl_len);
26
27 int stm32cubeprog_uart_load(uintptr_t instance, uintptr_t base, size_t len);
28
29 #endif /* STM32CUBEPROGRAMMER_H */