Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfaae84813 | ||
|
|
da8ab1e9dd | ||
|
|
baf65f510f | ||
|
|
13f68fbc64 | ||
|
|
3071b3f2dd | ||
|
|
de069cf8c9 | ||
|
|
8cf8923a18 | ||
|
|
d954510c9d | ||
|
|
8966a9b094 | ||
|
|
3d9611d020 | ||
|
|
78b7f26076 | ||
|
|
7233c39166 |
@@ -36,6 +36,7 @@ jobs:
|
||||
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
||||
BUILD_TYPE: package
|
||||
CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
|
||||
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
|
||||
run: |
|
||||
pip3 install PyGithub
|
||||
TAG=$(git describe --exact-match --tags)
|
||||
|
||||
@@ -144,6 +144,7 @@ The installed tools include a version of OpenOCD (in the pqt-openocd directory)
|
||||
* Generic Arduino USB Serial, Keyboard, and Mouse emulation
|
||||
* Filesystems (LittleFS and SD/SDFS)
|
||||
* Multicore support (setup1() and loop1())
|
||||
* FreeRTOS SMP support
|
||||
* Overclocking and underclocking from the menus
|
||||
* digitalWrite/Read, shiftIn/Out, tone, analogWrite(PWM)/Read, temperature
|
||||
* Peripherals: SPI master, Wire(I2C) master/slave, dual UART, emulated EEPROM, I2S audio input, I2S audio output, Servo
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#define ARDUINO_PICO_MAJOR 2
|
||||
#define ARDUINO_PICO_MINOR 2
|
||||
#define ARDUINO_PICO_REVISION 0
|
||||
#define ARDUINO_PICO_VERSION_STR "2.2.0"
|
||||
#define ARDUINO_PICO_REVISION 2
|
||||
#define ARDUINO_PICO_VERSION_STR "2.2.2"
|
||||
|
||||
@@ -123,7 +123,7 @@ size_t SerialUSB::write(const uint8_t *buf, size_t length) {
|
||||
}
|
||||
|
||||
static uint64_t last_avail_time;
|
||||
int i = 0;
|
||||
int written = 0;
|
||||
if (tud_cdc_connected()) {
|
||||
for (size_t i = 0; i < length;) {
|
||||
int n = length - i;
|
||||
@@ -136,6 +136,7 @@ size_t SerialUSB::write(const uint8_t *buf, size_t length) {
|
||||
tud_task();
|
||||
tud_cdc_write_flush();
|
||||
i += n2;
|
||||
written += n2;
|
||||
last_avail_time = time_us_64();
|
||||
} else {
|
||||
tud_task();
|
||||
@@ -150,7 +151,7 @@ size_t SerialUSB::write(const uint8_t *buf, size_t length) {
|
||||
// reset our timeout
|
||||
last_avail_time = 0;
|
||||
}
|
||||
return i;
|
||||
return written;
|
||||
}
|
||||
|
||||
SerialUSB::operator bool() {
|
||||
|
||||
@@ -6,6 +6,14 @@ Board-Specific Pins
|
||||
The Raspberry Pi Pico RP2040 chip supports up to 30 digital I/O pins,
|
||||
however not all boards provide access to all pins.
|
||||
|
||||
Input Modes
|
||||
-----------
|
||||
The Raspberry Pi Pico has 3 Input modes settings for use with `pinMode`: `INPUT`, `INPUT_PULLUP` and `INPUT_PULLDOWN`
|
||||
|
||||
Output Modes (Pad Strength)
|
||||
---------------------------
|
||||
The Raspberry Pi Pico has the ability to set the current that a pin (actually the pad associated with it) is capable of supplying. The current can be set to values of 2mA, 4mA, 8mA and 12mA. By default, on a reset, the setting is 4mA. A `pinMode(x, OUTPUT)`, where `x` is the pin number, is also the default setting. 4 settings have been added for use with `pinMode`: `OUTPUT_2MA`, `OUTPUT_4MA`, which has the same behavior as `OUTPUT`, `OUTPUT_8MA` and `OUTPUT_12MA`.
|
||||
|
||||
Tone/noTone
|
||||
-----------
|
||||
Simple square wave tone generation is possible for up to 8 channels using
|
||||
|
||||
@@ -60,8 +60,3 @@ it use a non-default pinout with a simple call
|
||||
SPI.setCS(5);
|
||||
SD.begin(5);
|
||||
}
|
||||
|
||||
Pad Strength
|
||||
============
|
||||
|
||||
The Raspberry Pi Pico has the ability to set the current that a pin (actually the pad associated with it) is capable of supplying. The current can be set to values of 2mA, 4mA, 8mA and 12mA. By default, on a reset, the setting is 4mA. A `pinMode(x, OUTPUT)`, where `x` is the pin number, is also the default setting. 4 settings have been added for use with `pinMode`: `OUTPUT_2MA`, `OUTPUT_4MA`, which has the same behavior as `OUTPUT`, `OUTPUT_8MA` and `OUTPUT_12MA`.
|
||||
|
||||
@@ -46,3 +46,61 @@ Also, this stack requires sketches to manually call
|
||||
sketch upload from the IDE. If a sketch is run without this command
|
||||
in ``setup()``, the user will need to use the standard "hold BOOTSEL
|
||||
and plug in USB" method to enter program upload mode.
|
||||
|
||||
Adafruit TinyUSB Configuration and Quirks
|
||||
-----------------------------------------
|
||||
|
||||
The Adafruit TinyUSB's configuration header for RP2040 devices is stored
|
||||
in ``libraries/Adafruit_TinyUSB_Arduino/src/arduino/ports/rp2040/tusb_config_rp2040.h`` (`here <https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/src/arduino/ports/rp2040/tusb_config_rp2040.h>`__).
|
||||
|
||||
In some cases it is important to know what TinyUSB is configured with. For example, by having set
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#define CFG_TUD_CDC 1
|
||||
#define CFG_TUD_MSC 1
|
||||
#define CFG_TUD_HID 1
|
||||
#define CFG_TUD_MIDI 1
|
||||
#define CFG_TUD_VENDOR 1
|
||||
|
||||
this configuration file defines the maximum number of USB CDC (serial)
|
||||
devices as 1. Hence, the example sketch `cdc_multi.ino <https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/examples/CDC/cdc_multi/cdc_multi.ino>`__
|
||||
that is delivered with the library will not work, it will only create one
|
||||
USB CDC device instead of two. It will however work when the above
|
||||
``CFG_TUD_CDC`` macro is defined to 2 instead of 1.
|
||||
|
||||
To do such a modification when using the Arduino IDE, the file can be
|
||||
locally modified in the Arduino core's package files. The base path can
|
||||
be found per `this article <https://support.arduino.cc/hc/en-us/articles/360018448279-Open-the-Arduino15-folder>`__,
|
||||
then navigate further to the ``packages/rp2040/hardware/rp2040/<core version>/libraries/Adafruit_TinyUSB_Arduino``
|
||||
folder to find the Adafruit TinyUSB library.
|
||||
|
||||
When using PlatformIO, one can also make use of the feature that TinyUSB
|
||||
allows redirecting the configuration file to another one if a certain
|
||||
macro is set.
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#ifdef CFG_TUSB_CONFIG_FILE
|
||||
#include CFG_TUSB_CONFIG_FILE
|
||||
#else
|
||||
#include "tusb_config.h"
|
||||
#endif
|
||||
|
||||
And as such, in the ``platformio.ini`` of the project, one can add
|
||||
|
||||
.. code:: ini
|
||||
|
||||
build_flags =
|
||||
-DUSE_TINYUSB
|
||||
-DCFG_TUSB_CONFIG_FILE=\"custom_tusb_config.h\"
|
||||
-Iinclude/
|
||||
|
||||
and further add create the file ``include/custom_tusb_config.h`` as a copy
|
||||
of the original ``tusb_config_rp2040.h`` but with the needed modifications.
|
||||
|
||||
*Note:* Some configuration file changes have no effect because upper levels
|
||||
of the library don't properly support them. In particular, even though the
|
||||
maximum number of HID devices can be set to 2, and two ``Adafruit_USBD_HID``
|
||||
can be created, it will not cause two HID devices to actually show up, because
|
||||
of `code limitations <https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/7264c1492a73d9a285512752b03f2550841c06bc/src/arduino/hid/Adafruit_USBD_HID.cpp#L36-L37>`__.
|
||||
|
||||
Binary file not shown.
Submodule libraries/Adafruit_TinyUSB_Arduino updated: 9c03087bcd...7264c1492a
Submodule libraries/FreeRTOS/lib/FreeRTOS-Kernel updated: 6047923beb...f5fe79dacd
@@ -28,6 +28,7 @@
|
||||
#define configSTACK_DEPTH_TYPE uint32_t
|
||||
|
||||
#define configUSE_NEWLIB_REENTRANT 1
|
||||
#define configNEWLIB_REENTRANT_IS_DYNAMIC 0 /* Note that we have a different config option, portSET_IMPURE_PTR */
|
||||
#include <reent.h>
|
||||
extern void __register_impure_ptr(struct _reent *p);
|
||||
#define portSET_IMPURE_PTR(x) __register_impure_ptr(x)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "framework-arduinopico",
|
||||
"version": "1.20200.0",
|
||||
"version": "1.20202.0",
|
||||
"description": "Arduino Wiring-based Framework (RPi Pico RP2040)",
|
||||
"keywords": [
|
||||
"framework",
|
||||
|
||||
+1
-1
Submodule pico-sdk updated: 7daa20ce4c...e7267f99fe
+1
-1
@@ -20,7 +20,7 @@
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Raspberry Pi RP2040 Boards
|
||||
version=2.2.0
|
||||
version=2.2.2
|
||||
|
||||
runtime.tools.pqt-gcc.path={runtime.platform.path}/system/arm-none-eabi
|
||||
runtime.tools.pqt-python3.path={runtime.platform.path}/system/python3
|
||||
|
||||
@@ -24,6 +24,7 @@ function skip_ino()
|
||||
/msc_sdfat/
|
||||
/midi_pizza_box_dj/
|
||||
/msc_esp32_file_browser/
|
||||
/DualRole/
|
||||
EOL
|
||||
echo $ino | grep -q -F "$skiplist"
|
||||
echo $(( 1 - $? ))
|
||||
|
||||
@@ -159,6 +159,9 @@ def configure_usb_flags(cpp_defines):
|
||||
if "USE_TINYUSB" in cpp_defines:
|
||||
env.Append(CPPPATH=[os.path.join(
|
||||
FRAMEWORK_DIR, "libraries", "Adafruit_TinyUSB_Arduino", "src", "arduino")])
|
||||
# automatically build with lib_archive = no to make weak linking work, needed for TinyUSB
|
||||
env_section = "env:" + env["PIOENV"]
|
||||
platform.config.set(env_section, "lib_archive", False)
|
||||
elif "PIO_FRAMEWORK_ARDUINO_NO_USB" in cpp_defines:
|
||||
env.Append(
|
||||
CPPPATH=[os.path.join(FRAMEWORK_DIR, "tools", "libpico")],
|
||||
|
||||
Reference in New Issue
Block a user