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()
6161#endif
6262}
6363
64- String ECCX08Class::serialNumber ()
64+ int ECCX08Class::serialNumber (byte sn[] )
6565{
66- String result = (char *)NULL ;
67- byte sn[12 ];
68-
6966 if (!read (0 , 0 , &sn[0 ], 4 )) {
70- return result ;
67+ return 0 ;
7168 }
7269
7370 if (!read (0 , 2 , &sn[4 ], 4 )) {
74- return result ;
71+ return 0 ;
7572 }
7673
7774 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)) {
7887 return result;
7988 }
8089
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class ECCX08Class
3232 int begin ();
3333 void end ();
3434
35+ int serialNumber (byte sn[]);
3536 String serialNumber ();
3637
3738 long random (long max);
You can’t perform that action at this time.
0 commit comments