mirror of https://github.com/contiki-ng/mspsim
fixed crc calculation to be done when sending last byte - patch by A.Dunkels
git-svn-id: https://mspsim.svn.sourceforge.net/svnroot/mspsim/mspsim@767 23d1a52b-0c3c-0410-b72d-8f29ab48fe35
This commit is contained in:
parent
de8daad047
commit
9cc4bc7a92
|
|
@ -990,9 +990,9 @@ public class CC2420 extends Chip implements USARTListener, RFListener, RFSource
|
|||
|
||||
private void txNext() {
|
||||
if(txfifoPos <= memory[RAM_TXFIFO]) {
|
||||
if (txfifoPos == 0) {
|
||||
int len = memory[RAM_TXFIFO] & 0xff;
|
||||
if (txfifoPos == len - 1) {
|
||||
txCrc.setCRC(0);
|
||||
int len = memory[RAM_TXFIFO] & 0xff;
|
||||
for (int i = 1; i < len - 1; i++) {
|
||||
txCrc.addBitrev(memory[RAM_TXFIFO + i] & 0xff);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue