Skip to content

Commit 9d680e6

Browse files
[Wifi] added firmwareVersion method with preprocessor
1 parent 90a283e commit 9d680e6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

libraries/WiFi/src/WiFi.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
#include "WiFi.h"
22

33
WiFiClass WiFi;
4+
5+
String WiFiClass::firmwareVersion() { // TODO integrate fw version detection
6+
#if defined(ARDUINO_PORTENTA_C33)
7+
return "v1.5.0";
8+
#elif defined(ARDUINO_PORTENTA_H7) || defined(ARDUINO_OPTA) || defined(ARDUINO_GIGA) ||\
9+
defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_NICLA_SENSE_ME)
10+
return "v0.0.0";
11+
#else
12+
return "v0.0.0";
13+
#endif
14+
}

libraries/WiFi/src/WiFi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class WiFiClass: public NetworkInterface
108108
return 0;
109109
}
110110

111+
String firmwareVersion();
112+
111113
private:
112114
struct net_if *sta_iface = nullptr;
113115
struct net_if *ap_iface = nullptr;

0 commit comments

Comments
 (0)