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:
joxe 2010-12-17 10:26:09 +00:00
parent de8daad047
commit 9cc4bc7a92
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}