فهرست منبع

fix: crypto,内置的crc16定义,都应该默认不需要反转输出结果

https://gitee.com/openLuat/LuatOS/issues/IDC74R
Wendal Chen 1 ماه پیش
والد
کامیت
6e202d6ba9
1فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 7 7
      luat/modules/luat_lib_crypto.c

+ 7 - 7
luat/modules/luat_lib_crypto.c

@@ -294,15 +294,15 @@ typedef struct{
 
 static const crc16method crc16method_table[] = 
 {
-    {(const char*)"IBM", 0x8005, 0x0000, 0x0000, 1, 1},
-    {(const char*)"MAXIM", 0x8005, 0x0000, 0xffff, 1, 1}, 
-    {(const char*)"USB", 0x8005, 0xffff, 0xffff, 1, 1}, 
-    {(const char*)"MODBUS", 0x8005, 0xffff, 0x0000, 1, 1}, 
-    {(const char*)"CCITT", 0x1021, 0x0000, 0x0000, 1, 1}, 
+    {(const char*)"IBM", 0x8005, 0x0000, 0x0000, 1, 0},
+    {(const char*)"MAXIM", 0x8005, 0x0000, 0xffff, 1, 0}, 
+    {(const char*)"USB", 0x8005, 0xffff, 0xffff, 1, 0}, 
+    {(const char*)"MODBUS", 0x8005, 0xffff, 0x0000, 1, 0}, 
+    {(const char*)"CCITT", 0x1021, 0x0000, 0x0000, 1, 0}, 
     {(const char*)"CCITT-FALSE", 0x1021, 0xffff, 0x0000, 0, 0}, 
-    {(const char*)"X25", 0x1021, 0xffff, 0xffff, 1, 1}, 
+    {(const char*)"X25", 0x1021, 0xffff, 0xffff, 1, 0}, 
     {(const char*)"XMODEM", 0x1021, 0x0000,0x0000, 0, 0}, 
-    {(const char*)"DNP", 0x3D65, 0x0000, 0xffff, 1, 1},
+    {(const char*)"DNP", 0x3D65, 0x0000, 0xffff, 1, 0},
     {(const char*)"USER-DEFINED", 0x0000, 0x0000,0x0000, 0, 0},
 };