File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 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() {
2222 return " 99.99.99" ;
2323}
2424
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+ }
2536
2637/* -------------------------------------------------------------------------- */
2738int CWifi::begin (const char * ssid) {
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ class CWifi {
5656 * Get firmware version
5757 */
5858 static const char * firmwareVersion ();
59+ uint32_t firmwareVersionU32 ();
5960
6061
6162 /*
You can’t perform that action at this time.
0 commit comments