Unverified Commit 61742c93 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Disable WiFi.begin on plain Pico, add JSON (#682)

parent fee03660
......@@ -68,6 +68,7 @@ int WiFiClass::begin(const char* ssid) {
return begin(ssid, nullptr);
}
#ifdef ARDUINO_RASPBERRY_PI_PICO_W
/* Start WiFi connection with passphrase
the most secure supported mode will be automatically selected
......@@ -148,6 +149,7 @@ uint8_t WiFiClass::beginAP(const char *ssid, const char* passphrase) {
return WL_CONNECTED;
}
#endif
bool WiFiClass::connected() {
return _wifi.connected() && localIP().isSet();
......
......@@ -65,6 +65,8 @@ def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
'dbgport={dbgport},' \
'dbglvl={dbglvl},' \
'usbstack={usbstack}'.format(**vars(args))
if "/WiFi" in sketch:
fqbn = fqbn.replace("rpipico", "rpipicow")
cmd += [fqbn]
cmd += ['-built-in-libraries', ide_path + '/libraries']
cmd += ['-ide-version=10607']
......
{
"build": {
"arduino": {
"earlephilhower": {
"boot2_source": "boot2_w25q080_2_padded_checksum.S",
"usb_vid": "0x2e8a",
"usb_pid": "0xf00a"
}
},
"core": "earlephilhower",
"cpu": "cortex-m0plus",
"extra_flags": "-D ARDUINO_RASPBERRY_PI_PICO_W -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250",
"f_cpu": "133000000L",
"hwids": [
[
"0x2E8A",
"0x00C0"
]
],
"mcu": "rp2040",
"variant": "rpipicow"
},
"debug": {
"jlink_device": "RP2040_M0_0",
"openocd_target": "rp2040.cfg",
"svd_path": "rp2040.svd"
},
"frameworks": [
"arduino"
],
"name": "Pico W",
"upload": {
"maximum_ram_size": 270336,
"maximum_size": 2097152,
"require_upload_port": true,
"native_usb": true,
"use_1200bps_touch": true,
"wait_for_upload_port": false,
"protocol": "picotool",
"protocols": [
"cmsis-dap",
"jlink",
"raspberrypi-swd",
"picotool",
"picoprobe"
]
},
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
"vendor": "Raspberry Pi"
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment