| 406 | } |
| 407 | |
| 408 | void init_usb_bootloader( int config ) |
| 409 | { |
| 410 | dfu_init( setup_read, setup_write, finish_write, &dfu_ctx ); |
| 411 | |
| 412 | #if defined(_kinetis_) |
| 413 | // Make sure SysTick counter is disabled (dfu has issues otherwise) |
| 414 | SYST_CSR = 0; |
| 415 | #endif |
| 416 | |
| 417 | // Clear verified status |
| 418 | dfu_ctx.verified = DFU_VALIDATION_UNKNOWN; |
| 419 | } |
| 420 | |
| 421 | // Code jump routine |
| 422 | __attribute__((noreturn)) |