File tree Expand file tree Collapse file tree 3 files changed +15
-14
lines changed Expand file tree Collapse file tree 3 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- #ifndef MBED_CONF_APP_OBJECT_CONSTRUCTION
19
- #error [NOT_SUPPORTED] No network interface found for this target.
18
+ #define WIFI 2
19
+ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
20
+ MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI
21
+ #error [NOT_SUPPORTED] No network configuration found for this target.
20
22
#endif
21
-
22
23
#if !defined(MBED_CONF_APP_WIFI_SECURE_SSID) && !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)
23
24
#error [NOT_SUPPORTED] Requires parameters from mbed_app.json
24
25
#endif
25
26
26
27
#include " mbed.h"
27
- #include MBED_CONF_APP_HEADER_FILE
28
+ #include " WiFiInterface.h "
28
29
29
30
WiFiInterface *get_interface ()
30
31
{
@@ -35,7 +36,7 @@ WiFiInterface *get_interface()
35
36
return interface;
36
37
}
37
38
38
- interface = MBED_CONF_APP_OBJECT_CONSTRUCTION ;
39
+ interface = WiFiInterface::get_default_instance () ;
39
40
40
41
return interface;
41
42
}
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- #ifndef MBED_CONF_APP_OBJECT_CONSTRUCTION
19
- #error [NOT_SUPPORTED] No network interface found for this target.
18
+ #define WIFI 2
19
+ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
20
+ MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI
21
+ #error [NOT_SUPPORTED] No network configuration found for this target.
20
22
#endif
21
23
22
24
#include " mbed.h"
Original file line number Diff line number Diff line change 24
24
"help": "Channel number of unsecure SSID",
25
25
"value": 2
26
26
},
27
- "header-file": {
28
- "help" : "String for including your driver header file",
29
- "value" : "\"WIFI_INTERFACE.h\""
30
- },
31
- "object-construction" : {
32
- "value" : "new WIFI_INTERFACE()"
33
- },
34
27
"ap-mac-secure": {
35
28
"help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
36
29
"value": "\"AA:AA:AA:AA:AA:AA\""
43
36
"help": "How many networks may appear in Wifi scan result",
44
37
"value": 10
45
38
}
39
+ },
40
+ "target_overrides": {
41
+ "*": {
42
+ "target.network-default-interface-type": "WIFI"
43
+ }
46
44
}
47
45
}
You can’t perform that action at this time.
0 commit comments