What is the "correct" procedure for injecting user code into the bootloader? For example I want to display some content on the display while the device is in DFU.
One solution might be adding user_init and user_poll to the existing main:
dfu_init();
user_init(); ///
while(1) {
usbd_poll(&dfu);
user_poll(); ///
}
Another solution might be to allow disabling the default main (and then calling dfu/usbd from user source:
#ifndef DFU_CUSTOM_MAIN
dfu_init();
while(1) {
usbd_poll(&dfu);
}
#endif
What is the "correct" procedure for injecting user code into the bootloader? For example I want to display some content on the display while the device is in DFU.
One solution might be adding user_init and user_poll to the existing main:
Another solution might be to allow disabling the default main (and then calling dfu/usbd from user source: