icE1usb fw: add port number argument to e1_tick_read()
Change-Id: I0f4548b5623a7eaf74af3076c301e029bb3933da
This commit is contained in:
parent
b754dd60cb
commit
47fda28a8f
|
@ -71,9 +71,11 @@ e1_platform_led_set(uint8_t port, enum e1_platform_led led,
|
|||
}
|
||||
|
||||
uint16_t
|
||||
e1_tick_read(void)
|
||||
e1_tick_read(uint8_t port)
|
||||
{
|
||||
return misc_regs->e1_tick[0].tx;
|
||||
if (port >= 2)
|
||||
return 0xffff;
|
||||
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(uint8_t port);
|
||||
|
||||
void reboot(int fw);
|
||||
|
|
|
@ -60,7 +60,7 @@ _usb_fill_feedback_ep(void)
|
|||
unsigned int level;
|
||||
|
||||
/* 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