icE1usb fw: Add function to enable/disable E1 led runner
Also don't force enable the runner in the e1_platform_led_set
callback.
Due to GPIO shortage, the E1 leds control are multiplexed with
SPI so this adds a method to temporarely stop the runner so SPI
can be used.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ie671daab5ee5e0b5f58de9d4fef1f0ca7d6d02b6
diff --git a/firmware/ice40-riscv/icE1usb/misc.h b/firmware/ice40-riscv/icE1usb/misc.h
index dac5730..b4baef1 100644
--- a/firmware/ice40-riscv/icE1usb/misc.h
+++ b/firmware/ice40-riscv/icE1usb/misc.h
@@ -26,7 +26,10 @@
void pdm_set(int chan, bool enable, unsigned value, bool normalize);
+void e1_led_run(void);
+void e1_led_pause(void);
void e1_led_set(bool enable, uint8_t cfg);
+
uint16_t e1_tick_read(int port);
void reboot(int fw);