Fixed critical typo.
This commit is contained in:
parent
2f336bc056
commit
893bbca339
|
@ -471,7 +471,7 @@ void produce_bits(encoder_hdlc_private *priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fetch the next byte to be transmitted, and compute FCS */
|
/* Fetch the next byte to be transmitted, and compute FCS */
|
||||||
next = (*priv->src++ && 0x00ff);
|
next = (*priv->src++ & 0x00ff);
|
||||||
next_size = 8;
|
next_size = 8;
|
||||||
priv->remaining_bytes--;
|
priv->remaining_bytes--;
|
||||||
priv->fcs = (priv->fcs>>8) ^ hdlc_fcs_lookup[(priv->fcs&0xff)^next];
|
priv->fcs = (priv->fcs>>8) ^ hdlc_fcs_lookup[(priv->fcs&0xff)^next];
|
||||||
|
@ -486,10 +486,11 @@ void produce_bits(encoder_hdlc_private *priv)
|
||||||
break;
|
break;
|
||||||
case PAYLOAD:
|
case PAYLOAD:
|
||||||
priv->phase = FCS;
|
priv->phase = FCS;
|
||||||
priv->src = priv->fcs_tx;
|
priv->src = &priv->fcs_tx[0];
|
||||||
priv->remaining_bytes = 2;
|
priv->remaining_bytes = 2;
|
||||||
priv->fcs_tx[0] = ~(priv->fcs & 0xff);
|
priv->fcs_tx[0] = ~(priv->fcs & 0xff);
|
||||||
priv->fcs_tx[1] = ~((priv->fcs>>8) & 0xff);
|
priv->fcs_tx[1] = ~((priv->fcs>>8) & 0xff);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case FCS:
|
case FCS:
|
||||||
priv->phase = IDLE;
|
priv->phase = IDLE;
|
||||||
|
|
Loading…
Reference in New Issue