This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Kévin Redon gerrit-no-reply at lists.osmocom.orgKévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/12505 Change subject: declare variables so the main loop can read the data to be flashed provided by the USB stack ...................................................................... declare variables so the main loop can read the data to be flashed provided by the USB stack Change-Id: I092357aad95abef1a781be1ea77944f2ea523dab --- M usb/class/dfu/device/dfudf.c M usb/class/dfu/device/dfudf.h 2 files changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/05/12505/1 diff --git a/usb/class/dfu/device/dfudf.c b/usb/class/dfu/device/dfudf.c index f3286a1..15a89fc 100644 --- a/usb/class/dfu/device/dfudf.c +++ b/usb/class/dfu/device/dfudf.c @@ -34,8 +34,13 @@ static struct usbdf_driver _dfudf; static struct dfudf_func_data _dfudf_funcd; -static enum usb_dfu_state dfu_state = USB_DFU_STATE_DFU_IDLE; /**< current DFU state */ -static enum usb_dfu_status dfu_status = USB_DFU_STATUS_OK; /**< current DFU status */ +enum usb_dfu_state dfu_state = USB_DFU_STATE_DFU_IDLE; +enum usb_dfu_status dfu_status = USB_DFU_STATUS_OK; + +uint8_t dfu_download_data[512]; +uint16_t dfu_download_length = 0; +size_t dfu_download_progress = 0; +bool dfu_manifestation_complete = false; /** * \brief Enable DFU Function diff --git a/usb/class/dfu/device/dfudf.h b/usb/class/dfu/device/dfudf.h index ba5cdd5..a19b569 100644 --- a/usb/class/dfu/device/dfudf.h +++ b/usb/class/dfu/device/dfudf.h @@ -35,6 +35,24 @@ #define USBDF_DFU_H_ #include "usbdc.h" +#include "usb_protocol_dfu.h" + +/** Current DFU state */ +extern enum usb_dfu_state dfu_state; +/**< Current DFU status */ +extern enum usb_dfu_status dfu_status; + +/** Downloaded data to be programmed in flash + * + * 512 is the flash page size of the SAM D5x/E5x + */ +extern uint8_t dfu_download_data[512]; +/** Length of downloaded data in bytes */ +extern uint16_t dfu_download_length; +/** Progress of the already downloaded data in bytes */ +extern size_t dfu_download_progress; +/** If manifestation (firmware flash and check) is complete */ +extern bool dfu_manifestation_complete; /** * \brief Initialize the USB DFU Function Driver -- To view, visit https://gerrit.osmocom.org/12505 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I092357aad95abef1a781be1ea77944f2ea523dab Gerrit-Change-Number: 12505 Gerrit-PatchSet: 1 Gerrit-Owner: Kévin Redon <kredon at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190109/a674d0dc/attachment.htm>