Allow sending thigns like KEY_MUTE or KEY_SCAN_NEXT from the USB and
Bluetooth Classic keyboard libraries.
BLE requires some add'l magic, not yet discovered.
Pull in latest upstream Keyboard library changes
SDK 1.5 changed the behavior of the underlying CYW43 blob, and it seems
to block MDNS multicast by default. Manually add back the Ethernet MACs
used for MDNS multicast in IPV4 and IPV6.
Fixes#1267
It seems possible now for TCP connection _pcbs to disappear while being
processed, due to the new async context configuration. This would cause
LWIP to panic when a NULL pcb was passed in.
Check for and avoid passing in null PCBs in the ClientContext.
Undo special-casing of sys_check_timeouts wrapper
AdvancedWebServer with heavy F5-refresh and #1274 test both pass.
Fixes#1274
Move the Joystick, Keyboard, and Mouse into a base class which handles
the operation/input, and a subclass which will implement the reporting
as a HID device via USB, Bluetooth Classic, or Bluetooth Low Energy (BLE).
Reduce copies of library code and makes maintainability much better.
* Update to Pico-SDK v1.5
* Hook in pico_rand, use ioctl to set ipv6 allmulti
* Move into PicoSDK LWIP mutex, hack timer sizes
* Utilize much of the PicoSDK infrastructure for WiFi
* Add WiFi::begin(ssid, pass, bssid)
* WiFiMulti to use BSSID, make more robust
WiFiMulti will now be more aggressive and try all matching SSIDs, in order
of RSSI, using the BSSID to identify individual APs in a mesh.
Before, if the highest RSSI AP didn't connect, it would fail immediately.
Now, it will go down the list, ordered by RSSI, to attempt to get a link.
* Add Bluetooth support from Pico-SDK
Able to build and run the HID Keyboard Demo from the Arduino IDE, almost
as-is.
Will probably need to make BT configurable. Enabling BT on a plain WiFi
sketch uses 50KB of flash and 16KB of RAM even if no BT is used.
* Separate picow libs, BT through menus, example
Build normal Pico.a and 4 different options for PicoW IP/BT configuration.
Use IP=>IP/Bluetooth menu to select between options.
* CMakefile rationalization
* Move BT TLV(pairing) out of last 2 flash sectors
The pairing keys for BT are stored at the end of flash by default, but
we use the last sector of flash for EPROM and the penultimate one for
the filesystem. Overwriting those in BT could cause some real exciting
crashes down the line.
Move the store to an app-build specific address using a dummy const
array to allocate space in the application image itself.
* PicoBluetoothHID with BT Mouse, Joystick, Keyboard
Add simple Bluetooth Classic HID helper function and port the existing
USB HID devices to it. Port their examples.
* Protect BT key storage from multicore
* Add short-n-sweet Bluetooth documents
* Add Bluetooth Serial port library
* Turn off BT when the BT libraries exit
Return the pre-existing USB_PRODUCT/MANUFACTURER to the USB host in
the ID stage, allowing for reports like:
[1412958.589070] usb 1-6.3.4.1: New USB device found, idVendor=2e8a, idProduct=f00a, bcdDevice= 1.00
[1412958.589076] usb 1-6.3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1412958.589079] usb 1-6.3.4.1: Product: Pico W
[1412958.589080] usb 1-6.3.4.1: Manufacturer: Raspberry Pi
[1412958.589081] usb 1-6.3.4.1: SerialNumber: E6614C775B6C7F31
or
[1413190.272233] usb 1-6.3.4.1: New USB device found, idVendor=2e8a, idProduct=1037, bcdDevice= 1.00
[1413190.272239] usb 1-6.3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1413190.272242] usb 1-6.3.4.1: Product: HunterCat NFC RP2040
[1413190.272243] usb 1-6.3.4.1: Manufacturer: ElectronicCats
[1413190.272244] usb 1-6.3.4.1: SerialNumber: E6614C775B6C7F31
Many examples require that LED_BUILTIN be defined as a constant, so we
can't use a ternary operator to swap between Pico and PicoW LED pins.
Instead, do the check in the digitalWrite/digitalRead/pinMode calls
to cover most of the uses.
Still need it on the command line in platform.txt for upload/etc., but make the
debug script in lib/picoprobe_cmsis_dap.tcl include the adapter speed setting.
The PWMAudio lib is expecting an int16_t value but the example passes a sample cast to uint16_t
So any values from the lookup table that are negative are recast to 0 i think.
So half the sine wave in the case of the example is lost.
Use GNU LD MAX() to ensure the uninitialized RAM portions are after the
OTA region. For most apps this already happens, so there will be no
overhead added.
The uninitted RAM macro would fail because the OTA code would clear out the
first 50KB or so of RAM to copy its code and global values.
Move all global values to the end of RAM in OTA, and then align any uninitted
vars to a 16KB unit to ensure it won't appear in the 1st part of RAM that is
still needed to copy the OTA executable.
In the normal case, without any uninit_ram vars, no additional space is used.
When uninit_ram is used, up to 16KB of space may be lost to get that alignment,
but it will work properly.
Fixes#1188
The stdin/stdout FILEs have an internal mutex which needs to be initted
to a FreeRTOS one, or any sketch with ::printf will hang. Automatically
create and acquire/release the shadowed mutex.
Requires new build of pico-quick-toolchain to function properly. Tested
on preliminary local build.
Without flushing STDOUT, the upload script's output aften are buffered
and not displayed until it completes. Add in flush commands to allow
the IDE to display status as it changes.
USB changes caused FreeRTOS to not be able to swap tasks when the Serial port
was connected. Clear the "stop PendSV" flag after checking for reset signal.