diff options
Diffstat (limited to 'mec2.h')
-rwxr-xr-x | mec2.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -391,6 +391,18 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) return ec; } - +static inline int echo_can_traintap(echo_can_state_t *ec, int pos, short val) +{ + /* Reset hang counter to avoid adjustments after + initial forced training */ + ec->HCNTR_d = ec->N_d << 1; + if (pos >= ec->N_d) + return 1; + ec->a_i[pos] = val << 17; + ec->a_s[pos] = val << 1; + if (++pos >= ec->N_d) + return 1; + return 0; +} #endif |