return dest;\r
}\r
\r
+void num_to_bytes(uint64_t n, size_t len, byte_t* dest)\r
+{\r
+ while (len--) {\r
+ dest[len] = (byte_t) n;\r
+ n >>= 8;\r
+ }\r
+}\r
+\r
+uint64_t bytes_to_num(byte_t* src, size_t len)\r
+{\r
+ uint64_t num = 0;\r
+ while (len--)\r
+ {\r
+ num = (num << 8) | (*src);\r
+ src++;\r
+ }\r
+ return num;\r
+}\r
\r
void LEDsoff()\r
{\r