File tree 3 files changed +60
-0
lines changed
3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ This file is part of the Arduino_CloudUtils library.
3
+
4
+ Copyright (c) 2024 Arduino SA
5
+
6
+ This Source Code Form is subject to the terms of the Mozilla Public
7
+ License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ */
10
+ #pragma once
11
+
12
+ #include "./hex/hex.h"
Original file line number Diff line number Diff line change
1
+ /*
2
+ This file is part of the Arduino_CloudUtils library.
3
+
4
+ Copyright (c) 2024 Arduino SA
5
+
6
+ This Source Code Form is subject to the terms of the Mozilla Public
7
+ License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ */
10
+
11
+ #include " hex.h"
12
+
13
+ namespace arduino { namespace hex {
14
+
15
+ String encode (uint8_t * in, uint32_t size) {
16
+ String out;
17
+ out.reserve ((size * 2 ) + 1 );
18
+
19
+ char *ptr = out.begin ();
20
+ for (uint32_t i = 0 ; i < size; i++) {
21
+ ptr += sprintf (ptr, " %02X" , in[i]);
22
+ }
23
+ return String (out.c_str ());
24
+ }
25
+
26
+ }} // arduino::hex
Original file line number Diff line number Diff line change
1
+ /*
2
+ This file is part of the Arduino_CloudUtils library.
3
+
4
+ Copyright (c) 2024 Arduino SA
5
+
6
+ This Source Code Form is subject to the terms of the Mozilla Public
7
+ License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include < Arduino.h>
14
+
15
+ namespace arduino { namespace hex {
16
+ /*
17
+ * This library contains the methods to get board provisioning id
18
+ */
19
+
20
+ String encode (uint8_t * in, uint32_t size);
21
+
22
+ }} // arduino::hex
You can’t perform that action at this time.
0 commit comments