Earle F. Philhower, III
d3c5039c2f
Clean up USB includes and naming
2021-05-14 12:08:00 -07:00
Earle F. Philhower, III
4a8ac3d902
Add support for shared USB Serial, Keyboard, Mouse ( #132 )
...
Use a shared infrastructure based on TinyUSB, allow users to use sketches
with ported Arduino Keyboard and Mouse libraries.
2021-05-13 19:20:24 -07:00
Earle F. Philhower, III
70a30dc219
Add multicore safety, FIFO, update pico-sdk ( #122 )
...
Update pico-sdk to 1.1.2
Add methods to block the opposite core while doing flash updates.
Ensure opposite core is stopped in LittleFS and EEPROM while doing
flash updates.
Update documentation with new calls.
2021-05-06 19:57:21 -07:00
Earle F. Philhower, III
1815c45f92
Add multicore support with setup1/loop1 ( #113 )
...
Support running code on the second core by adding a setup1() and/or
a loop1() routine to a sketch. These functions operate exactly like
the normal Arduino ones, and anything they call will be run on
the second core automatically.
Add a simple multicore example.
2021-04-24 11:40:29 -07:00
Earle F. Philhower, III
6e51516d6c
Set default pins for peripherals per datasheet ( #103 )
...
Using the official Raspberry Pi Pico datasheet and the Adafruit Feather
RP2040 schematic, set the default pins for peripherals to match.
Fixes #92
2021-04-16 10:23:43 -07:00
Earle F. Philhower, III
bbac9d4b96
Add full-fledged documentation, update I2S API ( #80 )
...
Last step before 1.0. Docs for readthedocs.io.
Update the I2S API to mimic others where `setXXX` is called before
`begin()` to set the GPIO pins used.
2021-04-06 08:01:45 -07:00
Earle F. Philhower, III
4e50fe866a
Add LittleFS, SD, and SDFS Filesystems and File:: interface ( #49 )
...
Pull in the ESP8266 File/Dir/etc. filesystem and port LittleFS
and SD/SDFS to the RP2040.
See https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html
for more information
2021-04-02 17:46:12 -07:00
Earle F. Philhower, III
1eb48f724d
Add I2S output support and I2S class/library ( #73 )
...
Using the PIO-driven I2S from pico-extras, add I2S output support.
Be sure to `git submodule update --init` to get the new directories.
2021-04-02 16:21:36 -07:00
Scott Smith
ed29fc539c
Correct analogReadTemp KEYWORD ( #75 )
...
reference: cores/rp2040/wiring_analog.cpp:108:extern "C" float analogReadTemp()
2021-04-02 11:36:20 -07:00
Earle F. Philhower, III
c988c1c8a4
Add debug prints on error conditions to the core
2021-03-30 18:17:52 -07:00
Earle F. Philhower, III
96e31c640e
Add analogReadTemp() to get RP2040 core temp ( #63 )
2021-03-30 16:10:06 -07:00
Earle F. Philhower, III
1124455627
Add BOOTSEL, allowing BOOTSEL use as a button
...
Since every board has a bootsel button, allow end users to read its
state with a simple `if (BOOTSEL)`. Uses code from the pico-examples.
2021-03-29 16:14:45 -07:00
Earle F. Philhower, III
4076bf85ab
Fix INPUT_PULLUP/DOWN, I2C 0-len probes, timeout
...
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
2021-03-27 19:50:31 -07:00
Earle F. Philhower, III
73336ddda3
Add I2C slave support and include a simple example
...
Also fix the initial pins for the 2nd I2C interface onboard.
2021-03-27 15:07:10 -07:00
Earle F. Philhower, III
b463825374
Rationalize pin selection using readable template
...
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.
2021-03-25 17:54:46 -07:00
Earle F. Philhower, III
c4bbccdead
Add serialEvent support for USB, UART0, UART1
2021-03-25 12:42:05 -07:00
Earle F. Philhower, III
9976d638b0
Fix EEPROM::begin missing underscore
...
Added size validation to the EEPROM begin, but forgot to set the class
variable with the new adjusted size.
Fixes #10
2021-03-24 03:20:18 -07:00
Earle F. Philhower, III
6f915a901d
Remove library warning in rp2040 dir
2021-03-21 11:27:37 -07:00
Earle F. Philhower, III
e78f833851
Use well known TwoWire class name
...
Allows Adafruit GFX libraries to be used
2021-03-20 15:18:38 -07:00
Earle F. Philhower, III
76430b3d7d
Ensure Servo detach()es only on idle state
...
Avoid any short pulses which could cause servo twitches or damage by
adding a shutdown command to the PIO program and checking it's in that
safe part of the loop before detaching the servo.
2021-03-18 16:00:38 -07:00
Earle F. Philhower, III
ba0777e557
Add SPI debug dumps
2021-03-17 17:35:41 -07:00
Earle F. Philhower, III
6adb1a641c
Initial debugging framework
2021-03-17 10:54:13 -07:00
Earle F. Philhower, III
c0a606510c
Clean up SPI library info
2021-03-16 22:11:16 -07:00
Earle F. Philhower, III
4ea383c0d7
Clean up SPI API, pin selection logic
2021-03-16 22:07:06 -07:00
Earle F. Philhower, III
ca7a219ee9
Clean up SPI library, add info
2021-03-16 21:44:17 -07:00
Earle F. Philhower, III
9f25417036
Add working default Fade example
2021-03-16 18:12:50 -07:00
Earle F. Philhower, III
62508fa98c
Use one program per PIO, not per SM. Add RP2040 utils
2021-03-16 16:57:22 -07:00
Earle F. Philhower, III
5ac0a175e1
Stop PIO PM on Servo detach
2021-03-16 09:26:45 -07:00
Earle F. Philhower, III
d4427f87ce
Add Servo library support, driven by the PIO SMs
2021-03-15 20:11:10 -07:00
Earle F. Philhower, III
129e59ab3c
Add EEPROM library, using last flash sector
2021-03-12 19:38:14 -08:00
Earle F. Philhower, III
f785f360a9
Fix and test I2C/Wire, works now
2021-03-12 17:39:57 -08:00
Earle F. Philhower, III
4924cd9d35
Add I2C master support library
2021-03-12 13:23:27 -08:00
Earle F. Philhower, III
b3dad2ba62
Cleanup, add licenses to all files
2021-03-05 22:09:05 -08:00
Earle F. Philhower, III
93d194b0ac
Add hardware SPI support
...
SPI = spi0, SPI1 = spi1
2021-03-05 21:44:40 -08:00