mirror of
https://github.com/im-tomu/foboot.git
synced 2024-09-19 18:30:17 +00:00
Bypass auto-boot when doing a nerve pinch
This commit is contained in:
parent
793d9bc017
commit
618b79f207
@ -11,6 +11,8 @@
|
||||
|
||||
struct ff_spi *spi;
|
||||
|
||||
static int nerve_pinch(void);
|
||||
|
||||
// ICE40UP5K bitstream images (with SB_MULTIBOOT header) are
|
||||
// 104250 bytes. The SPI flash has 4096-byte erase blocks.
|
||||
// The smallest divisible boundary is 4096*26.
|
||||
@ -27,7 +29,7 @@ void isr(void)
|
||||
|
||||
if (irqs & (1 << TIMER0_INTERRUPT)) {
|
||||
timer0_ev_pending_write(timer0_ev_pending_read());
|
||||
if (dfu_getstate() == dfuIDLE) {
|
||||
if (dfu_getstate() == dfuIDLE && !nerve_pinch()) {
|
||||
reboot();
|
||||
while (1)
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user