File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -61,20 +61,29 @@ void ECCX08Class::end()
61
61
#endif
62
62
}
63
63
64
- String ECCX08Class::serialNumber ()
64
+ int ECCX08Class::serialNumber (byte sn[] )
65
65
{
66
- String result = (char *)NULL ;
67
- byte sn[12 ];
68
-
69
66
if (!read (0 , 0 , &sn[0 ], 4 )) {
70
- return result ;
67
+ return 0 ;
71
68
}
72
69
73
70
if (!read (0 , 2 , &sn[4 ], 4 )) {
74
- return result ;
71
+ return 0 ;
75
72
}
76
73
77
74
if (!read (0 , 3 , &sn[8 ], 4 )) {
75
+ return 0 ;
76
+ }
77
+
78
+ return 1 ;
79
+ }
80
+
81
+ String ECCX08Class::serialNumber ()
82
+ {
83
+ String result = (char *)NULL ;
84
+ byte sn[12 ];
85
+
86
+ if (!serialNumber (sn)) {
78
87
return result;
79
88
}
80
89
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class ECCX08Class
32
32
int begin ();
33
33
void end ();
34
34
35
+ int serialNumber (byte sn[]);
35
36
String serialNumber ();
36
37
37
38
long random (long max);
You can’t perform that action at this time.
0 commit comments