テストモード追加、LED有効化 left -> SerialRX, Data Recieve Complete , Serial Tx , Light Tx

Dependencies:   XBee mbed NetServicesMin

Revision:
0:42adca80439c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/frame_layer/culc_crc16.cpp	Thu Mar 22 12:40:48 2012 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "types.h"
+#include "config.h"
+#include "culc_crc16.h"
+
+unsigned int One_Byte_CRC16_Calc (uint16_t crc , uint8_t data)
+{
+  //  DBG("++++++++++++ CRC culc start initial CRC:%04X DATA:%04X\n",crc,data);
+    for (int i = 0; i < 8; ++i)
+    {
+        if ((crc / 0x7fff) ^ (data & 0x01))    // Ex-OR input LSB first
+        {
+            crc = crc ^ 0x4002; // 0100 0000 0000 0010 << 1 
+            crc = crc << 1;
+            crc ++;
+        }
+        else
+        {
+         //   crc = crc *2;    // left shift
+            crc = crc << 1;
+        }
+     //   TEMP = TEMP/2;    // right shift
+        data = data >> 1;
+    }
+ //   DBG("************** CRC culc result  CRC:%04X\n",crc);
+    return crc;
+}