aboutsummaryrefslogtreecommitdiff
path: root/include/dfu.h
diff options
context:
space:
mode:
authorPatrick Delaunay2021-05-18 15:12:12 +0200
committerPatrice Chotard2021-06-18 10:09:41 +0200
commitd4710326c814ffbf84eab87dce8f8fd789b0da18 (patch)
treee32aae6b88ab806812fda4318bca456687e364c6 /include/dfu.h
parentd4cb4025771e74dbf42c3aa0b6daa734f855928d (diff)
dfu: add error callback
Add error callback in dfu stack to manage some board specific behavior on DFU targets. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'include/dfu.h')
-rw-r--r--include/dfu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/dfu.h b/include/dfu.h
index afada3959b7..f6868982df7 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -377,6 +377,17 @@ void dfu_initiated_callback(struct dfu_entity *dfu);
*/
void dfu_flush_callback(struct dfu_entity *dfu);
+/**
+ * dfu_error_callback() - weak callback called at the DFU write error
+ *
+ * It is a callback function called by DFU stack after DFU write error.
+ * This function allows to manage some board specific behavior on DFU targets
+ *
+ * @dfu: pointer to the dfu_entity which cause the error
+ * @msg: the message of the error
+ */
+void dfu_error_callback(struct dfu_entity *dfu, const char *msg);
+
int dfu_transaction_initiate(struct dfu_entity *dfu, bool read);
void dfu_transaction_cleanup(struct dfu_entity *dfu);