File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ const char* CWifi::firmwareVersion() {
22
22
return " 99.99.99" ;
23
23
}
24
24
25
+ /* -------------------------------------------------------------------------- */
26
+ uint32_t CWifi::firmwareVersionU32 () {
27
+ /* -------------------------------------------------------------------------- */
28
+ uint8_t ret[4 ];
29
+ string res = " " ;
30
+ modem.begin ();
31
+ if (modem.write (string (PROMPT (_FWVERSION_U32)), res, CMD_READ (_FWVERSION_U32))) {
32
+ return res[0 ] << 24 | res[1 ] << 16 | res[2 ] << 8 | res[3 ];
33
+ }
34
+ return 0x63636300 ;
35
+ }
25
36
26
37
/* -------------------------------------------------------------------------- */
27
38
int CWifi::begin (const char * ssid) {
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ class CWifi {
56
56
* Get firmware version
57
57
*/
58
58
static const char * firmwareVersion ();
59
+ uint32_t firmwareVersionU32 ();
59
60
60
61
61
62
/*
You can’t perform that action at this time.
0 commit comments