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
This commit is contained in:
parent
5848f14563
commit
394748ab86
|
@ -46,6 +46,18 @@ pdm_set(int chan, bool enable, unsigned value, bool normalize)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
e1_led_run(void)
|
||||
{
|
||||
misc_regs->e1_led |= 0x100;
|
||||
}
|
||||
|
||||
void
|
||||
e1_led_pause(void)
|
||||
{
|
||||
misc_regs->e1_led &= 0xff;
|
||||
}
|
||||
|
||||
void
|
||||
e1_led_set(bool enable, uint8_t cfg)
|
||||
{
|
||||
|
@ -66,10 +78,11 @@ e1_platform_led_set(int port, enum e1_platform_led led,
|
|||
|
||||
tmp = misc_regs->e1_led;
|
||||
tmp &= ~(3 << shift);
|
||||
tmp |= 0x100 | ((state & 3) << shift);
|
||||
tmp |= ((state & 3) << shift);
|
||||
misc_regs->e1_led = tmp;
|
||||
}
|
||||
|
||||
|
||||
uint16_t
|
||||
e1_tick_read(int port)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,10 @@ enum pdm_chan {
|
|||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue