With HW chip select enabled, transfer16's 2 individual byte transfers will
actualy deassert CS for a brief instant between bytes. Avoid this by doing
a single multi-byte (2) tranfer of 16b.
Fixes#1749
Defining a global true `bool core1_separate_stack = true` will separate
the two cores' stacks, with core 0 using the scratch RAM while core 1
will use 8K from the heap.
* Adapted all libraries to support multiprotocol HID over BT & BLE
* Added ATT DB depending on setup; still no success with working connection
* Added hids_device from BTStack develop branch as override
* Fixing the GATT handle patching, added working ATT DB
* ran astyle on example
* Updates in BLE implementation; WORKING! (but only if all are activated). Removed sdkoverride again, doesn't work.
* Moved ATT DB handles to correct places
* Finally functioning for Mouse+KBD+Joy, and each individual
* Cleaned up code & ran astyle
* Added sdkoverrides to pull develop functions from BTSTack
* Changed a few typos by BTStack to run codespell successfully
* Ran astyle on sdkoverride files
* Added some #if guards for including BTSTack file only if BT is enabled
* Fixed Feature Report value characteristics handle assignment; fixed too long HID report
* Ran astyle
_spiUnit is a reference, and when initialized with SPI, it cannot be changed in the constructor afterwards.
So initialize it in the constructor's declaration.
It would be possible for an IRQ-driven SPI user to fire
while the main app's SPI.beginTransaction was in process.
This would result in incorrect state for the main app since
the IRQ may overwrite some settings that the app already
set.
Disable all IRQs around the begin and end processes to avoid
the possibility.
Fixes#1147
When SPI.beginTransaction() is called, disable all GPIO IRQs that were
registered using SPI.usingInterrupt(). On SPI.endTransaction(), restore
all the IRQs to their prior state.
Enable use of wired Ethernet modules as first-class LWIP citizens. All
networking classes like MDNS, WebServer, HTTPClient, WiFiClient, and OTA
can use a wired Ethernet adapter just like built-in WiFi.
Two examples updated to show proper use.
Uses the Async Context support built into the Pico SDK. When running on the
Pico it will use the CYW43 async instance.
Uses modified wired Ethernet drivers, thanks Nicholas Humfrey!
Note, the classic, non-LWIP integrated `Ethernet` and related libraries
should still work fine (but not be able to use WebServer/HTTPS/etc.)
Fixes#775
Fixes#1696
Additional pin definitions for Pimoroni Tiny 2040, including using the Green LED element of the RGB LED as the default LED.
There are only 12 external header pins for GPIO, including 4 ADC pins, so there are less options for assigning pins than on a generic Pico RP2040. In particular, there can only be one SPI, and it can't have an SS pin but I've defined GPIO17, as on the pico, because the definition is used in generic / common.h.
BOOTSEL on the Pimoroni Tiny 2040 is connected to GPIO23. I don't know if that has any consequences for implementing reading from BOOTSEL for this board. That may need to be revisited, but it doesn't appear to involve any changes to pins_arduino.h.
For some reason `program ... reset" causes OpenOCD to leave the chip in a
state where the 2nd core does not come up properly, leading to problems in
FreeRTOS and others.
Use a separate reset sequence after programming to work around the issue.
Fixes#1687