* Add support for the extra 16 GPIO pins in the menus and core.
* Clean up Generic RP2350 PSRAM ("none" is valid) and flash (other than 16MB) options.
* Add extra GPIO<->peripheral connections
* Add Pimoroni PGA2350 RP2350B-based board
* Pins 32-47 can be used for PIOPrograms
* Avoid hang when PSRAM fails to initialize
* Move libpico to an RP2350B board for SDK (otherwise the SDK drops all GPIOHI support)
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.
Fixes#979
Make sure to read the last byte of I2C data in the case where the IRQ happens
and the STOP signal is also asserted.
Also ensure all branches of the IRQ handler look at the same point in time
value for the IRQ status.
Add plumbing to allow `Wire`, `Serial1`, `SPI1` to map to the 2nd
hardware unit for devices where the PCB layout only brings out the
2nd port.
Fix the Seeedstudio XAIO pins
Fixes#594
The Pico HW seems to generate an interrupt on the end of every I2C
write cycle, even if the slave address wasn't actually targeted.
This would cause the onReceive method to be called with a 0-len
parameter for every write on the I2C bus.
Now, only call onReceive if there is 1 or more bytes of data available.
Wire::requestFrom() returns the number of bytes read from the slave. In
the case of error, the slave can end up returning a very large integer
for PICO_GENERIC_ERROR which would then be used as the # of bytes read
causing crashes and errors.
Running TalkingToMyself without connecting the I2C ports would show
this behavior.
Now, when PICO_GENERIC_ERROR is returned, set the read-back buffer len
to 0 explicitly.
Fixes#222
The HW needs to have the TXC_ABRT flag cleared when a slave transmission is
cut short by the master, or else it will effectively break the I2C bus and
never recover.
Fixes#169
Trying to change pinout while running, or to an illegal configuration,
will now immediately panic() with an error message. Such an attempt
is a pretty big problem since pinouts are hardware related/static.
Prior code would fail silently and return false, but nobody checked
the setXXX return values, anyway.
Fixes#167
For Serial when selecting TinyUSB. Can't include in the core because Arduino IDE
will not link in libraries called from the core. Instead, add the header to all
the standard libraries in the hope it will still catch some user cases where they
use these libraries.
See https://github.com/earlephilhower/arduino-pico/issues/167#issuecomment-848622174
Fix the drive logic for pullup and pulldown inputs.
Add a bitbanged I2C ACK checker for 0-byte I2C transfers (since the HW
doesn't support it).
Add a timeout on I2C reads and writes so they don't hang forever if a
device is not present.
Fixes#38
Use a constexpr template to calculate the valid pins for different IO
hardware. This lets us have an easily readable list of pin numbers that
we can adjust/check.