Receive data and clock for data communications example

Dependencies:   C12832 mbed

Files at this revision

API Documentation at this revision

Comitter:
askksa12543
Date:
Thu Apr 30 14:05:44 2015 +0000
Parent:
20:38caf615a9e1
Commit message:
crc fixed

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 38caf615a9e1 -r 874a80ebcab5 main.cpp
--- a/main.cpp	Wed Apr 29 19:35:51 2015 +0000
+++ b/main.cpp	Thu Apr 30 14:05:44 2015 +0000
@@ -285,7 +285,7 @@
     temp = temp_crc / j;
     temp ^= CRC;
     //decrement j
-    j--;
+    j /= 2;
     
     //crc loop - shift in each bit position and xor with CRC constant
     while(j>0)
@@ -297,7 +297,7 @@
         //xor with crc constant
         temp ^= CRC;
         //decrement j
-        j--;        
+        j /= 2;        
     }    
     
     //check for crc correctness
diff -r 38caf615a9e1 -r 874a80ebcab5 mbed.bld
--- a/mbed.bld	Wed Apr 29 19:35:51 2015 +0000
+++ b/mbed.bld	Thu Apr 30 14:05:44 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058
\ No newline at end of file