diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2019-10-14 09:28:07 +0200 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2019-10-31 12:12:31 +0100 |
commit | 067c13c70bfb99d25979b989870ed39eab34659a (patch) | |
tree | ac28778dda9f3b986f8cbc227d519d9df1d9b5cd /include/dfu.h | |
parent | ec44cace4b8d23556924550fe76bf2744eb91144 (diff) |
dfu: add callback for flush and initiated operation
Add weak callback to allow board specific behavior
- flush
- initiated
This patch prepare usage of DFU back end for communication with
STM32CubeProgrammer on stm32mp1 platform with stm32prog command.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'include/dfu.h')
-rw-r--r-- | include/dfu.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/dfu.h b/include/dfu.h index 4de7d35914..564966333f 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -183,6 +183,28 @@ int dfu_read(struct dfu_entity *de, void *buf, int size, int blk_seq_num); int dfu_write(struct dfu_entity *de, void *buf, int size, int blk_seq_num); int dfu_flush(struct dfu_entity *de, void *buf, int size, int blk_seq_num); +/** + * dfu_initiated_callback - weak callback called on DFU transaction start + * + * It is a callback function called by DFU stack when a DFU transaction is + * initiated. This function allows to manage some board specific behavior on + * DFU targets. + * + * @param dfu - pointer to the dfu_entity, which should be initialized + * + */ +void dfu_initiated_callback(struct dfu_entity *dfu); +/** + * dfu_flush_callback - weak callback called at the end of the DFU write + * + * It is a callback function called by DFU stack after DFU manifestation. + * This function allows to manage some board specific behavior on DFU targets + * + * @param dfu - pointer to the dfu_entity, which should be flushed + * + */ +void dfu_flush_callback(struct dfu_entity *dfu); + /* * dfu_defer_flush - pointer to store dfu_entity for deferred flashing. * It should be NULL when not used. |