File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1075,6 +1075,28 @@ Tasmota Function|Parameters and details
1075
1075
:---|:---
1076
1076
uuid4<a class =" cmnd " id =" uuid_uuid4 " ></a >|` uuid.uuid4() -> string ` <br >Generates a uuid4 random id as string.
1077
1077
1078
+
1079
+ ### ` crc ` module
1080
+
1081
+ The ` crc ` module allows to compute crc32/16/8 from bytes() arrays.
1082
+
1083
+ ``` ruby
1084
+ > import crc
1085
+ > crc.crc32(0xFFFFFFFF , bytes(" AABBCC" ))
1086
+ - 1091314015
1087
+ > crc.crc16(0xFFFF , bytes(" AABBCC" ))
1088
+ 20980
1089
+ > crc.crc8(0xFF , bytes(" AABBCC" ))
1090
+ 139
1091
+ ```
1092
+
1093
+ Tasmota Function|Parameters and details
1094
+ :---|:---
1095
+ crc32<a class =" cmnd " id =" crc_crc32 " ></a >|` crc.crc32(crc:int, payload:bytes) -> int ` <br >Compute crc32 from an initial value and a bytes() buffer
1096
+ crc16<a class =" cmnd " id =" crc_crc16 " ></a >|` crc.crc32(crc:int, payload:bytes) -> int ` <br >Compute crc32 from an initial value and a bytes() buffer
1097
+ crc8<a class =" cmnd " id =" crc_crc8 " ></a >|` crc.crc32(crc:int, payload:bytes) -> int ` <br >Compute crc32 from an initial value and a bytes() buffer
1098
+
1099
+
1078
1100
## Compiling Berry
1079
1101
1080
1102
Berry is included if the following is defined in ` user_config_override.h ` :
You can’t perform that action at this time.
0 commit comments