Commit graph

359 commits

Author SHA1 Message Date
Earle F. Philhower, III
c99614c1f5
Add AsyncUDP and simple NetBIOS name lookup server (#2234)
Thanks to @me-no-dev's code.  Lets Windows look up the PicoW by name
using NBNS and needs much less memory and code than mDNS.

AsyncUDP ported from the old ESP8266 version, only minimal changes.  Will
probably only be valid in IPv4 environments and may not match current
ESP32 AsyncUDP interfaces.
2024-06-17 17:46:53 -07:00
Ayush Sharma
1775fedf44
Webserver: Add support for filters and removable routes (#2225)
This PR implements filters and removable routes in RP2040 arduino core, making it API compatible with recent changes to ESP32 & ESP8266 WebServer API.
2024-06-13 15:32:17 -07:00
Earle F. Philhower, III
4ab0ba6133
Fix crash on SD.end() without initial SD.begin() (#2222)
Fixes #2220
2024-06-11 13:40:27 -07:00
Earle F. Philhower, III
eb0badd817
Avoid malloc/free while in HCI callbacks (#2219)
Bluetooth operates at IRQ level, so using std::list (which needs to
new and delete objects) is not legal.  Use a fixed, preallocated
vector instead.
2024-06-10 16:38:50 -07:00
Earle F. Philhower, III
f272995536
For consistency, BTHID Joypad->Joystick (#2218)
Matches existing library names and nomenclature
2024-06-10 13:34:59 -07:00
Earle F. Philhower, III
1fd66bf9c2
Add joypad HID master support (#2214)
Play games on your Pico using Bluetooth gamepads!
2024-06-09 11:47:13 -07:00
Earle F. Philhower, III
bde21e5ae1
Add BLE support to BluetoothHIDMaster (#2208)
Support Bluetooth BLE keyboard and mice using the same HID master
infrastructure as the BT Classic.
2024-06-07 14:52:52 -07:00
Earle F. Philhower, III
c104c6717c
Upgrade to Adafruit TinyUSB 3.1.5 (#2206) 2024-06-05 22:36:30 -07:00
Earle F. Philhower, III
0f05ad1cc2
Use block writes for BT audio consumers (#2204)
Around 2x the performance, and every bit is needed w/BT SBC compression
and decompression.
2024-06-05 16:03:35 -07:00
Earle F. Philhower, III
9039089067
Fix PWMAudio::write(buffer, len) (#2202)
PWMAudio was only ever writing one half the buffer passed in because
of an off-by-2 error.  Fixes the sine output in KeyboardPiano.
2024-06-05 13:08:08 -07:00
Earle F. Philhower, III
1ef61d725b
Clean up OTA example references to ESP8266 (#2200) 2024-06-05 11:40:37 -07:00
Earle F. Philhower, III
b42083f20a
Add "Needs Bluetooth" compile warning (#2197) 2024-06-05 11:08:20 -07:00
Earle F. Philhower, III
f6d13d2b70
Bluetooth Master HID and musical keyboard example (#2195)
Adds BluetoothHIDMaster and HIDKeyStream which let the PicoW connect to
and use Bluetooth Classic HID devices like keyboards and mice.

An example that lets the PicoW use a BT keyboard as a piano is
included and shows the use of the new classes.
2024-06-04 14:09:28 -07:00
Earle F. Philhower, III
f786583986
Split out BluetoothHCI for shared usage (#2194) 2024-06-03 15:09:55 -07:00
Earle F. Philhower, III
5f6fb75505
Move to LittleFS 2.9.3. (#2193)
On-flash format changed after 2.5.1, but this can read prior versions
and will upgrade on-device to the later version.
2024-06-03 09:32:52 -07:00
Earle F. Philhower, III
ce45c65568
Make LittleFS filenames support full size (#2192)
Support 255 character names, not just 32, in LittleFS filesystems.
2024-06-03 09:11:01 -07:00
Earle F. Philhower, III
6d6433f256
Add track info support for BT audio sink (#2190) 2024-05-31 13:08:41 -07:00
Earle F. Philhower, III
bf385490d3
Fix crash on audio end from IRQ, refactor A2DP (#2189)
Fixes #2188

We get a call to stop the audio channel from a timer/IRQ context, so can't
safely remove the IRQ handler for the AudioBufferManager.  The SDK will panic.

Because the IRQ handler will be a noop if it's not uninstalled, we will
instead just leave our shared handler in place and let it do nothing.

Use a common BluetoothLock RAII in BluetoothAudio to clen up the code and
automatically lock BT for the AVRCP button methods.
2024-05-31 12:14:57 -07:00
Earle F. Philhower, III
0a2b616c8a
Add Cookies to HTTPClient (#2186)
From:
https://github.com/espressif/arduino-esp32/pull/6216
https://github.com/espressif/arduino-esp32/pull/6280
https://github.com/espressif/arduino-esp32/pull/7112
2024-05-30 13:27:43 -07:00
Earle F. Philhower, III
3839f07afe
HTTPClient - Fix case sensitivity for header keys (#2185)
From https://github.com/espressif/arduino-esp32/pull/8713
2024-05-30 13:05:49 -07:00
Earle F. Philhower, III
2043623ce6
Fix POST form parser edge cases (#2182)
From https://github.com/espressif/arduino-esp32/pull/9167
2024-05-30 12:19:44 -07:00
Earle F. Philhower, III
a3dba8be5d
Fix AdvancedWebServer.ino uptime conversion (#2183)
From https://github.com/espressif/arduino-esp32/pull/9224
2024-05-30 12:07:28 -07:00
Earle F. Philhower, III
1f9350dc2a
Allow setting SerialBT advertised name (#2181)
Trivial fix #2179
2024-05-30 11:40:40 -07:00
Earle F. Philhower, III
361b4e0862
Allow uploading huge files to WebServer (#2180)
From https://github.com/espressif/arduino-esp32/pull/9440
2024-05-30 11:24:18 -07:00
Earle F. Philhower, III
fa2bfdc2ba
Small RAM savings (128b) in WebServer (#2178)
From https://github.com/espressif/arduino-esp32/pull/9594
2024-05-30 10:38:50 -07:00
Earle F. Philhower, III
01e9dc99f2
Add A2DP sink (speaker) support (#2177)
Provide direct connection from BT audio to I2S and PWM audio outputs.
Example included showing play/pause operation.
2024-05-29 14:53:06 -07:00
Earle F. Philhower, III
ec5e62e533
Add Bluetooth audio out (A2DP) on the PicoW (#2174)
Adds a library to run classic Bluetooth A2DP source (output) audio from
the PicoW.  Simple example showing operation and callbacks.

Factor out multiple BT lock/unlock and place in the PicoW variant files.
2024-05-26 14:30:40 -07:00
Earle F. Philhower, III
11814823ed
Add asynchronous I2C read and write operations (#2167)
Fixes #1730

Uses DMA operations to avoid the need to bit-bang or busy wait for I2C operations
that might be very slow.  Optional, adds new API calls to enable.  Simple example
included.
2024-05-21 14:32:12 -07:00
Earle F. Philhower, III
e6c7ee7813
Add asynchronous SPI transactions (#2168)
Fixes #1192

Uses DMA operations to avoid the need to bit-bang or busy wait for SPI
operations that might be very slow. Optional, adds new API calls to enable.
Simple example included.
2024-05-21 14:08:36 -07:00
Earle F. Philhower, III
f33df254f1
Add SPI::setMOSI/setMISO, better match pin names (#2166) 2024-05-20 14:43:55 -07:00
Earle F. Philhower, III
83a6aaca1c
Update SDFat to use array transfers (#2164)
Fixes #2163
2024-05-17 13:52:47 -07:00
Earle F. Philhower, III
182af71492
Update StaticMulticore-FreeRTOS.ino (#2161) 2024-05-15 07:57:46 -07:00
Earle F. Philhower, III
d4cdb3ea69
Fix LWIP crash on unexpected ping packets (#2159)
When a ping is sent from the Pico, a raw_recv callback is added which
sees all raw incoming packets to detect the response from the ping target.
If while waiting for the target response an external ping packet arrives
this incoming ping request packet will be processed by the
LwipIntfDev<>::_pingCB which will return "0" not processed and which
*should* not change the payload unless it handles the actual packet.

Unfortunately, the 20 byte header was unconditionally stripped off of
the packet before checking if this was our response, changing the
payload address and causing an assertion in LWIP.

Fix by using absolute offsets inside the raw packet for the ping
response checks.

Fixes #2156
Fixes #2149
2024-05-14 17:37:54 -07:00
Earle F. Philhower, III
016bf80e3b
Protect againt calling LWIP_Ethernet::begin twice (#2158)
As seen in debug of #2149, if the LwipIntfDev is already _started,
return false for a ::begin() call.

Also, protect netif_add/_remove on the very small possibilty of being
called by LwipIntfDev devices while the CYW43 driver is doing work.
2024-05-13 19:08:38 -07:00
Earle F. Philhower, III
8d4ef5ef8c
FreeRTOS: Disable IRQs when task switching disabled (#2155)
Avoids crash seen in #2132
2024-05-10 18:53:45 -07:00
Juraj Andrássy
8673da2505
Ethernet legacy API compatibility layer (#2147)
With example from the Arduino Ethernet library
2024-05-06 10:06:51 -07:00
Earle F. Philhower, III
fa58b6987a
CI can use custom defines, add ESPHost/WINC tests (#2142)
If a file called `.ci.defines` is present in a directory, apply those
while building the specified sketch.

* Add an lwip_ESPHost test, like the wired Ethernet ones
* Add WINC1500 test and CI hook
* Remove 1 minor warning in WINC build
2024-05-02 13:37:50 -07:00
Juraj Andrássy
597251d6b5
Add lwIP_WINC1500 - new WiFi driver for ATWINC1500 (#2140) 2024-05-02 12:13:21 -07:00
Earle F. Philhower, III
56e5559357
Minor keyword addition for syntax hilighting (#2139) 2024-05-01 12:27:03 -07:00
Earle F. Philhower, III
0b4394468b
Update to latest Joystick upstream (#2138)
Fixes #2136
2024-04-30 12:46:28 -07:00
Dominic Pearman
315bfdace1
BTstack: remove superfluous call during setup. (#2137)
Co-authored-by: Dominic Pearman <dominic@phymorous.de>
2024-04-30 10:23:35 -07:00
Calvin Huang
783bee5c49
Add functions to set PDM pins, remove unused pwrPin (#2133)
* functions to set PDM pins

* change pin set method to better match existing libs
2024-04-29 09:32:22 -07:00
Dominic Pearman
a439028087
BTstack: added function to set scan respone data. (#2134)
Co-authored-by: Dominic Pearman <dominic@phymorous.de>
2024-04-29 08:06:50 -07:00
Earle F. Philhower, III
a8e6634776
Avoid swapping L/R channels on I2S input (#2124)
Fixes #2123
2024-04-25 11:22:07 -07:00
Earle F. Philhower, III
bd8eb9bca2
Shift I2S input data by 1 bit (#2121)
Fixes #2037
2024-04-24 11:20:22 -07:00
Earle F. Philhower, III
d554df7670
Protect W5500/ENC28J60 isLinked() call from IRQ (#2115)
Fixes #2105

W5100 doesn't support isLinked, so no change needed there.
2024-04-19 13:59:11 -07:00
Earle F. Philhower, III
074b952314
Add FatFS and FatFSUSB - Wear-Leveled FTL based FAT filesystem for onboard flash (#2028)
* Add FatFS for onboard flash use/sharing of FAT

* Move all to "fatfs" namespace

The FatFS library defines commonly used names like WORD which could conflict
with user code otherwise.

* Restyle

* FTL-based, wear-leveling FatFS with USB export

Allow using FAT filesystem with onboard flash in a safer, wear-leveled
way and to export the onboard flash to the host as a USB drive for easy
data transfer.

* Update documentation

* Fix submodule reference

* Don't spellehcek ChaN FatFS files

* Disable FTL debugging

* More codespell skips

* Move to latest SPIFTL library

* Allow using raw flash instead of FTL

* Remove unneeded static FIL 4k allocation

* Expose FAT FS format configuration options

* Update documentation

* Remove USB partial flash rewrites

* Remove unneeded dups of FatFS sources

Leave the LICENSE.md and README.md to point to upstream.

* Clean up comments
2024-04-19 10:52:02 -07:00
Kevin Witteveen (MartiniMarter)
11dfb2c913
Add WiFi::beginNoBlock() (#2063) 2024-04-19 10:16:03 -07:00
Earle F. Philhower, III
6c22ea3be1
Set creation time on LittleFS directory creation (#2108) 2024-04-18 15:58:06 -07:00
Earle F. Philhower, III
1be28b55e4
Update to Adafruit TinyUSB 3.1.3 (#2043) 2024-04-18 15:49:20 -07:00