mirror of
https://github.com/im-tomu/foboot.git
synced 2024-09-20 02:40:09 +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;
|
struct ff_spi *spi;
|
||||||
|
|
||||||
|
static int nerve_pinch(void);
|
||||||
|
|
||||||
// ICE40UP5K bitstream images (with SB_MULTIBOOT header) are
|
// ICE40UP5K bitstream images (with SB_MULTIBOOT header) are
|
||||||
// 104250 bytes. The SPI flash has 4096-byte erase blocks.
|
// 104250 bytes. The SPI flash has 4096-byte erase blocks.
|
||||||
// The smallest divisible boundary is 4096*26.
|
// The smallest divisible boundary is 4096*26.
|
||||||
@ -27,7 +29,7 @@ void isr(void)
|
|||||||
|
|
||||||
if (irqs & (1 << TIMER0_INTERRUPT)) {
|
if (irqs & (1 << TIMER0_INTERRUPT)) {
|
||||||
timer0_ev_pending_write(timer0_ev_pending_read());
|
timer0_ev_pending_write(timer0_ev_pending_read());
|
||||||
if (dfu_getstate() == dfuIDLE) {
|
if (dfu_getstate() == dfuIDLE && !nerve_pinch()) {
|
||||||
reboot();
|
reboot();
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user