[riot-notifications] [RIOT-OS/RIOT] riotboot: implement serial flasher (#15493)

Alexandre Abadie notifications at github.com
Sun Nov 22 21:40:40 CET 2020


@aabadie commented on this pull request.



> + * @author      Benjamin Valentin <benpicco at googlemail.com>
+ * @}
+ */
+
+#include <string.h>
+#include "cpu.h"
+#include "riotboot/hdr.h"
+
+__attribute__((weak))
+void usb_board_reset_in_bootloader(void)
+{
+    uint32_t *magic = (void*)RIOTBOOT_MAGIC_ADDR;
+
+    irq_disable();
+    *magic = RIOTBOOT_MAGIC;
+    NVIC_SystemReset();

This code is made to be architecture agnostic, so better use `pm_reboot` here

-- 
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/15493#pullrequestreview-536112759
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201122/b801337c/attachment.htm>


More information about the notifications mailing list