[riot-notifications] [RIOT-OS/RIOT] usbus/dfu: add Device Firmware Upgrade support for USBUS (2nd attempt) (#15460)

Dylan Laduranty notifications at github.com
Tue Jan 12 10:54:13 CET 2021


@dylad commented on this pull request.



> +/**
+ * @brief USBUS DFU internal state
+ */
+typedef enum {
+    USBUS_DFU_STATE_APP_IDLE,               /**< DFU application idle */
+    USBUS_DFU_STATE_APP_DETACH,             /**< DFU application detach (reboot to DFU mode) */
+    USBUS_DFU_STATE_DFU_IDLE,               /**< DFU runtime mode idle */
+    USBUS_DFU_STATE_DFU_DL_SYNC,            /**< DFU download synchronization */
+    USBUS_DFU_STATE_DFU_DL_BUSY,            /**< DFU download busy */
+    USBUS_DFU_STATE_DFU_DL_IDLE,            /**< DFU download idle */
+    USBUS_DFU_STATE_DFU_MANIFEST_SYNC,      /**< DFU manifest synchronization */
+    USBUS_DFU_STATE_DFU_MANIFEST,           /**< DFU manifest mode */
+    USBUS_DFU_STATE_DFU_MANIFEST_WAIT_RST,  /**< DFU manifest wait for CPU reset */
+    USBUS_DFU_STATE_DFU_UP_IDLE,            /**< DFU upload idle */
+    USBUS_DFU_STATE_DFU_ERROR               /**< DFU internal error */
+} usbus_dfu_state_t;

It is not USBUS-specific but part of the DFU spec. These values are used for an internal state machine and the host can access it by issuing a GET_STATUS request.
I can rename them to USB_DFU_STATE_* instead of USBUS_DFU_STATE_* if you prefer.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15460#discussion_r555644278
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210112/dd8d6ac9/attachment-0001.htm>


More information about the notifications mailing list