icE1usb fw: Expose the ticks from multiple E1 ports in misc.{c,h}
Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Change-Id: I4dfdeecb6d3a25025095cd017ebbf74aee41c8b2
This commit is contained in:
parent
8f31a9e84c
commit
436b775e03
|
@ -71,9 +71,9 @@ e1_platform_led_set(int port, enum e1_platform_led led,
|
|||
}
|
||||
|
||||
uint16_t
|
||||
e1_tick_read(void)
|
||||
e1_tick_read(int port)
|
||||
{
|
||||
return misc_regs->e1_tick[0].tx;
|
||||
return misc_regs->e1_tick[port].tx;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -27,6 +27,6 @@ enum pdm_chan {
|
|||
void pdm_set(int chan, bool enable, unsigned value, bool normalize);
|
||||
|
||||
void e1_led_set(bool enable, uint8_t cfg);
|
||||
uint16_t e1_tick_read(void);
|
||||
uint16_t e1_tick_read(int port);
|
||||
|
||||
void reboot(int fw);
|
||||
|
|
|
@ -57,7 +57,7 @@ _usb_fill_feedback_ep(void)
|
|||
volatile struct usb_ep *ep_regs;
|
||||
|
||||
/* Compute real E1 tick count (with safety against bad values) */
|
||||
ticks = e1_tick_read();
|
||||
ticks = e1_tick_read(0);
|
||||
val = (ticks - ticks_prev) & 0xffff;
|
||||
ticks_prev = ticks;
|
||||
if ((val < 7168) | (val > 9216))
|
||||
|
|
Loading…
Reference in New Issue