Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc54eeb8d0 | ||
|
|
3a2a7f8cf1 | ||
|
|
52a22e5185 | ||
|
|
cae8c70e51 | ||
|
|
513bd81810 | ||
|
|
891f653ead | ||
|
|
5b270aab61 | ||
|
|
6591da9acf | ||
|
|
c80c08d32c | ||
|
|
ce7d337c5c | ||
|
|
dc1198bd9c | ||
|
|
f46d7cc84f | ||
|
|
5ee764390e | ||
|
|
894a82f54f |
@@ -13,6 +13,7 @@ See https://arduino-pico.readthedocs.io/en/latest/ along with the examples for m
|
||||
* Raspberry Pi Pico
|
||||
* Adafruit Feather RP2040
|
||||
* Adafruit ItsyBitsy RP2040
|
||||
* Adafruit KB2040
|
||||
* Adafruit Macropad RP2040
|
||||
* Adafruit QTPy RP2040
|
||||
* Adafruit STEMMA Friend RP2040
|
||||
@@ -145,6 +146,7 @@ The RP2040 PIO state machines (SMs) are used to generate jitter-free:
|
||||
* Servos
|
||||
* Tones
|
||||
* I2S Output
|
||||
* Software UARTs (Serial ports)
|
||||
|
||||
# Tutorials from Across the Web
|
||||
Here are some links to coverage and additional tutorials for using `arduino-pico`
|
||||
|
||||
+487
@@ -3313,6 +3313,493 @@ adafruit_macropad2040picodebug.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
|
||||
adafruit_macropad2040picodebug.menu.usbstack.nousb=No USB
|
||||
adafruit_macropad2040picodebug.menu.usbstack.nousb.build.usbstack_flags="-DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico"
|
||||
|
||||
# -----------------------------------
|
||||
# Adafruit KB2040
|
||||
# -----------------------------------
|
||||
adafruit_kb2040.name=Adafruit KB2040
|
||||
adafruit_kb2040.vid.0=0x239a
|
||||
adafruit_kb2040.pid.0=0x8105
|
||||
adafruit_kb2040.build.usbpid=-DSERIALUSB_PID=0x8105
|
||||
adafruit_kb2040.build.usbpwr=-DUSBD_MAX_POWER_MA=250
|
||||
adafruit_kb2040.build.board=ADAFRUIT_KB2040_RP2040
|
||||
adafruit_kb2040.build.mcu=cortex-m0plus
|
||||
adafruit_kb2040.build.variant=adafruit_kb2040
|
||||
adafruit_kb2040.upload.tool=uf2conv
|
||||
adafruit_kb2040.upload.maximum_size=8388608
|
||||
adafruit_kb2040.upload.maximum_data_size=262144
|
||||
adafruit_kb2040.upload.wait_for_upload_port=true
|
||||
adafruit_kb2040.upload.erase_cmd=
|
||||
adafruit_kb2040.serial.disableDTR=false
|
||||
adafruit_kb2040.serial.disableRTS=false
|
||||
adafruit_kb2040.build.f_cpu=125000000
|
||||
adafruit_kb2040.build.led=
|
||||
adafruit_kb2040.build.core=rp2040
|
||||
adafruit_kb2040.build.ldscript=memmap_default.ld
|
||||
adafruit_kb2040.build.ram_length=256k
|
||||
adafruit_kb2040.build.boot2=boot2_w25q080_2_padded_checksum
|
||||
adafruit_kb2040.build.vid=0x239a
|
||||
adafruit_kb2040.build.pid=0x8105
|
||||
adafruit_kb2040.build.usb_manufacturer="Adafruit"
|
||||
adafruit_kb2040.build.usb_product="KB2040"
|
||||
adafruit_kb2040.menu.flash.8388608_0=8MB (no FS)
|
||||
adafruit_kb2040.menu.flash.8388608_0.upload.maximum_size=8384512
|
||||
adafruit_kb2040.menu.flash.8388608_0.build.flash_length=8384512
|
||||
adafruit_kb2040.menu.flash.8388608_0.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_0.build.fs_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_0.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_65536=8MB (Sketch: 8128KB, FS: 64KB)
|
||||
adafruit_kb2040.menu.flash.8388608_65536.upload.maximum_size=8318976
|
||||
adafruit_kb2040.menu.flash.8388608_65536.build.flash_length=8318976
|
||||
adafruit_kb2040.menu.flash.8388608_65536.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_65536.build.fs_start=276754432
|
||||
adafruit_kb2040.menu.flash.8388608_65536.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_131072=8MB (Sketch: 8064KB, FS: 128KB)
|
||||
adafruit_kb2040.menu.flash.8388608_131072.upload.maximum_size=8253440
|
||||
adafruit_kb2040.menu.flash.8388608_131072.build.flash_length=8253440
|
||||
adafruit_kb2040.menu.flash.8388608_131072.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_131072.build.fs_start=276688896
|
||||
adafruit_kb2040.menu.flash.8388608_131072.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_262144=8MB (Sketch: 7936KB, FS: 256KB)
|
||||
adafruit_kb2040.menu.flash.8388608_262144.upload.maximum_size=8122368
|
||||
adafruit_kb2040.menu.flash.8388608_262144.build.flash_length=8122368
|
||||
adafruit_kb2040.menu.flash.8388608_262144.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_262144.build.fs_start=276557824
|
||||
adafruit_kb2040.menu.flash.8388608_262144.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_524288=8MB (Sketch: 7680KB, FS: 512KB)
|
||||
adafruit_kb2040.menu.flash.8388608_524288.upload.maximum_size=7860224
|
||||
adafruit_kb2040.menu.flash.8388608_524288.build.flash_length=7860224
|
||||
adafruit_kb2040.menu.flash.8388608_524288.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_524288.build.fs_start=276295680
|
||||
adafruit_kb2040.menu.flash.8388608_524288.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_1048576=8MB (Sketch: 7MB, FS: 1MB)
|
||||
adafruit_kb2040.menu.flash.8388608_1048576.upload.maximum_size=7335936
|
||||
adafruit_kb2040.menu.flash.8388608_1048576.build.flash_length=7335936
|
||||
adafruit_kb2040.menu.flash.8388608_1048576.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_1048576.build.fs_start=275771392
|
||||
adafruit_kb2040.menu.flash.8388608_1048576.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_2097152=8MB (Sketch: 6MB, FS: 2MB)
|
||||
adafruit_kb2040.menu.flash.8388608_2097152.upload.maximum_size=6287360
|
||||
adafruit_kb2040.menu.flash.8388608_2097152.build.flash_length=6287360
|
||||
adafruit_kb2040.menu.flash.8388608_2097152.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_2097152.build.fs_start=274722816
|
||||
adafruit_kb2040.menu.flash.8388608_2097152.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_3145728=8MB (Sketch: 5MB, FS: 3MB)
|
||||
adafruit_kb2040.menu.flash.8388608_3145728.upload.maximum_size=5238784
|
||||
adafruit_kb2040.menu.flash.8388608_3145728.build.flash_length=5238784
|
||||
adafruit_kb2040.menu.flash.8388608_3145728.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_3145728.build.fs_start=273674240
|
||||
adafruit_kb2040.menu.flash.8388608_3145728.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_4194304=8MB (Sketch: 4MB, FS: 4MB)
|
||||
adafruit_kb2040.menu.flash.8388608_4194304.upload.maximum_size=4190208
|
||||
adafruit_kb2040.menu.flash.8388608_4194304.build.flash_length=4190208
|
||||
adafruit_kb2040.menu.flash.8388608_4194304.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_4194304.build.fs_start=272625664
|
||||
adafruit_kb2040.menu.flash.8388608_4194304.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_5242880=8MB (Sketch: 3MB, FS: 5MB)
|
||||
adafruit_kb2040.menu.flash.8388608_5242880.upload.maximum_size=3141632
|
||||
adafruit_kb2040.menu.flash.8388608_5242880.build.flash_length=3141632
|
||||
adafruit_kb2040.menu.flash.8388608_5242880.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_5242880.build.fs_start=271577088
|
||||
adafruit_kb2040.menu.flash.8388608_5242880.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_6291456=8MB (Sketch: 2MB, FS: 6MB)
|
||||
adafruit_kb2040.menu.flash.8388608_6291456.upload.maximum_size=2093056
|
||||
adafruit_kb2040.menu.flash.8388608_6291456.build.flash_length=2093056
|
||||
adafruit_kb2040.menu.flash.8388608_6291456.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_6291456.build.fs_start=270528512
|
||||
adafruit_kb2040.menu.flash.8388608_6291456.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_7340032=8MB (Sketch: 1MB, FS: 7MB)
|
||||
adafruit_kb2040.menu.flash.8388608_7340032.upload.maximum_size=1044480
|
||||
adafruit_kb2040.menu.flash.8388608_7340032.build.flash_length=1044480
|
||||
adafruit_kb2040.menu.flash.8388608_7340032.build.eeprom_start=276819968
|
||||
adafruit_kb2040.menu.flash.8388608_7340032.build.fs_start=269479936
|
||||
adafruit_kb2040.menu.flash.8388608_7340032.build.fs_end=276819968
|
||||
adafruit_kb2040.menu.freq.125=125 MHz
|
||||
adafruit_kb2040.menu.freq.125.build.f_cpu=125000000L
|
||||
adafruit_kb2040.menu.freq.50=50 MHz
|
||||
adafruit_kb2040.menu.freq.50.build.f_cpu=50000000L
|
||||
adafruit_kb2040.menu.freq.100=100 MHz
|
||||
adafruit_kb2040.menu.freq.100.build.f_cpu=100000000L
|
||||
adafruit_kb2040.menu.freq.133=133 MHz
|
||||
adafruit_kb2040.menu.freq.133.build.f_cpu=133000000L
|
||||
adafruit_kb2040.menu.freq.150=150 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.150.build.f_cpu=150000000L
|
||||
adafruit_kb2040.menu.freq.175=175 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.175.build.f_cpu=175000000L
|
||||
adafruit_kb2040.menu.freq.200=200 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.200.build.f_cpu=200000000L
|
||||
adafruit_kb2040.menu.freq.225=225 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.225.build.f_cpu=225000000L
|
||||
adafruit_kb2040.menu.freq.250=250 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.250.build.f_cpu=250000000L
|
||||
adafruit_kb2040.menu.freq.275=275 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.275.build.f_cpu=275000000L
|
||||
adafruit_kb2040.menu.freq.300=300 MHz (Overclock)
|
||||
adafruit_kb2040.menu.freq.300.build.f_cpu=300000000L
|
||||
adafruit_kb2040.menu.opt.Small=Small (-Os) (standard)
|
||||
adafruit_kb2040.menu.opt.Small.build.flags.optimize=-Os
|
||||
adafruit_kb2040.menu.opt.Optimize=Optimize (-O)
|
||||
adafruit_kb2040.menu.opt.Optimize.build.flags.optimize=-O
|
||||
adafruit_kb2040.menu.opt.Optimize2=Optimize More (-O2)
|
||||
adafruit_kb2040.menu.opt.Optimize2.build.flags.optimize=-O2
|
||||
adafruit_kb2040.menu.opt.Optimize3=Optimize Even More (-O3)
|
||||
adafruit_kb2040.menu.opt.Optimize3.build.flags.optimize=-O3
|
||||
adafruit_kb2040.menu.opt.Fast=Fast (-Ofast) (maybe slower)
|
||||
adafruit_kb2040.menu.opt.Fast.build.flags.optimize=-Ofast
|
||||
adafruit_kb2040.menu.opt.Debug=Debug (-Og)
|
||||
adafruit_kb2040.menu.opt.Debug.build.flags.optimize=-Og
|
||||
adafruit_kb2040.menu.rtti.Disabled=Disabled
|
||||
adafruit_kb2040.menu.rtti.Disabled.build.flags.rtti=-fno-rtti
|
||||
adafruit_kb2040.menu.rtti.Enabled=Enabled
|
||||
adafruit_kb2040.menu.rtti.Enabled.build.flags.rtti=
|
||||
adafruit_kb2040.menu.dbgport.Disabled=Disabled
|
||||
adafruit_kb2040.menu.dbgport.Disabled.build.debug_port=
|
||||
adafruit_kb2040.menu.dbgport.Serial=Serial
|
||||
adafruit_kb2040.menu.dbgport.Serial.build.debug_port=-DDEBUG_RP2040_PORT=Serial
|
||||
adafruit_kb2040.menu.dbgport.Serial1=Serial1
|
||||
adafruit_kb2040.menu.dbgport.Serial1.build.debug_port=-DDEBUG_RP2040_PORT=Serial1
|
||||
adafruit_kb2040.menu.dbgport.Serial2=Serial2
|
||||
adafruit_kb2040.menu.dbgport.Serial2.build.debug_port=-DDEBUG_RP2040_PORT=Serial2
|
||||
adafruit_kb2040.menu.dbglvl.None=None
|
||||
adafruit_kb2040.menu.dbglvl.None.build.debug_level=
|
||||
adafruit_kb2040.menu.dbglvl.Core=Core
|
||||
adafruit_kb2040.menu.dbglvl.Core.build.debug_level=-DDEBUG_RP2040_CORE
|
||||
adafruit_kb2040.menu.dbglvl.SPI=SPI
|
||||
adafruit_kb2040.menu.dbglvl.SPI.build.debug_level=-DDEBUG_RP2040_SPI
|
||||
adafruit_kb2040.menu.dbglvl.Wire=Wire
|
||||
adafruit_kb2040.menu.dbglvl.Wire.build.debug_level=-DDEBUG_RP2040_WIRE
|
||||
adafruit_kb2040.menu.dbglvl.All=All
|
||||
adafruit_kb2040.menu.dbglvl.All.build.debug_level=-DDEBUG_RP2040_WIRE -DDEBUG_RP2040_SPI -DDEBUG_RP2040_CORE
|
||||
adafruit_kb2040.menu.dbglvl.NDEBUG=NDEBUG
|
||||
adafruit_kb2040.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
|
||||
adafruit_kb2040.menu.usbstack.picosdk=Pico SDK
|
||||
adafruit_kb2040.menu.usbstack.picosdk.build.usbstack_flags="-I{runtime.platform.path}/tools/libpico"
|
||||
adafruit_kb2040.menu.usbstack.tinyusb=Adafruit TinyUSB
|
||||
adafruit_kb2040.menu.usbstack.tinyusb.build.usbstack_flags=-DUSE_TINYUSB "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# -----------------------------------
|
||||
# Adafruit KB2040 (Picoprobe)
|
||||
# -----------------------------------
|
||||
adafruit_kb2040picoprobe.name=Adafruit KB2040 (Picoprobe)
|
||||
adafruit_kb2040picoprobe.vid.0=0x239a
|
||||
adafruit_kb2040picoprobe.pid.0=0x0004
|
||||
adafruit_kb2040picoprobe.build.usbpid=-DSERIALUSB_PID=0x8105
|
||||
adafruit_kb2040picoprobe.build.usbpwr=-DUSBD_MAX_POWER_MA=250
|
||||
adafruit_kb2040picoprobe.build.board=ADAFRUIT_KB2040_RP2040
|
||||
adafruit_kb2040picoprobe.build.mcu=cortex-m0plus
|
||||
adafruit_kb2040picoprobe.build.variant=adafruit_kb2040
|
||||
adafruit_kb2040picoprobe.upload.tool=picoprobe
|
||||
adafruit_kb2040picoprobe.upload.maximum_size=8388608
|
||||
adafruit_kb2040picoprobe.upload.maximum_data_size=262144
|
||||
adafruit_kb2040picoprobe.upload.wait_for_upload_port=true
|
||||
adafruit_kb2040picoprobe.upload.erase_cmd=
|
||||
adafruit_kb2040picoprobe.serial.disableDTR=false
|
||||
adafruit_kb2040picoprobe.serial.disableRTS=false
|
||||
adafruit_kb2040picoprobe.build.f_cpu=125000000
|
||||
adafruit_kb2040picoprobe.build.led=
|
||||
adafruit_kb2040picoprobe.build.core=rp2040
|
||||
adafruit_kb2040picoprobe.build.ldscript=memmap_default.ld
|
||||
adafruit_kb2040picoprobe.build.ram_length=256k
|
||||
adafruit_kb2040picoprobe.build.boot2=boot2_w25q080_2_padded_checksum
|
||||
adafruit_kb2040picoprobe.build.vid=0x239a
|
||||
adafruit_kb2040picoprobe.build.pid=0x8105
|
||||
adafruit_kb2040picoprobe.build.usb_manufacturer="Adafruit"
|
||||
adafruit_kb2040picoprobe.build.usb_product="KB2040 (Picoprobe)"
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_0=8MB (no FS)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_0.upload.maximum_size=8384512
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_0.build.flash_length=8384512
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_0.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_0.build.fs_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_0.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_65536=8MB (Sketch: 8128KB, FS: 64KB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_65536.upload.maximum_size=8318976
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_65536.build.flash_length=8318976
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_65536.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_65536.build.fs_start=276754432
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_65536.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_131072=8MB (Sketch: 8064KB, FS: 128KB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_131072.upload.maximum_size=8253440
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_131072.build.flash_length=8253440
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_131072.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_131072.build.fs_start=276688896
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_131072.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_262144=8MB (Sketch: 7936KB, FS: 256KB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_262144.upload.maximum_size=8122368
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_262144.build.flash_length=8122368
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_262144.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_262144.build.fs_start=276557824
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_262144.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_524288=8MB (Sketch: 7680KB, FS: 512KB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_524288.upload.maximum_size=7860224
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_524288.build.flash_length=7860224
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_524288.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_524288.build.fs_start=276295680
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_524288.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_1048576=8MB (Sketch: 7MB, FS: 1MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_1048576.upload.maximum_size=7335936
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_1048576.build.flash_length=7335936
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_1048576.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_1048576.build.fs_start=275771392
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_1048576.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_2097152=8MB (Sketch: 6MB, FS: 2MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_2097152.upload.maximum_size=6287360
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_2097152.build.flash_length=6287360
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_2097152.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_2097152.build.fs_start=274722816
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_2097152.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_3145728=8MB (Sketch: 5MB, FS: 3MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_3145728.upload.maximum_size=5238784
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_3145728.build.flash_length=5238784
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_3145728.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_3145728.build.fs_start=273674240
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_3145728.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_4194304=8MB (Sketch: 4MB, FS: 4MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_4194304.upload.maximum_size=4190208
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_4194304.build.flash_length=4190208
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_4194304.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_4194304.build.fs_start=272625664
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_4194304.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_5242880=8MB (Sketch: 3MB, FS: 5MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_5242880.upload.maximum_size=3141632
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_5242880.build.flash_length=3141632
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_5242880.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_5242880.build.fs_start=271577088
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_5242880.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_6291456=8MB (Sketch: 2MB, FS: 6MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_6291456.upload.maximum_size=2093056
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_6291456.build.flash_length=2093056
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_6291456.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_6291456.build.fs_start=270528512
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_6291456.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_7340032=8MB (Sketch: 1MB, FS: 7MB)
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_7340032.upload.maximum_size=1044480
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_7340032.build.flash_length=1044480
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_7340032.build.eeprom_start=276819968
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_7340032.build.fs_start=269479936
|
||||
adafruit_kb2040picoprobe.menu.flash.8388608_7340032.build.fs_end=276819968
|
||||
adafruit_kb2040picoprobe.menu.freq.125=125 MHz
|
||||
adafruit_kb2040picoprobe.menu.freq.125.build.f_cpu=125000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.50=50 MHz
|
||||
adafruit_kb2040picoprobe.menu.freq.50.build.f_cpu=50000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.100=100 MHz
|
||||
adafruit_kb2040picoprobe.menu.freq.100.build.f_cpu=100000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.133=133 MHz
|
||||
adafruit_kb2040picoprobe.menu.freq.133.build.f_cpu=133000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.150=150 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.150.build.f_cpu=150000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.175=175 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.175.build.f_cpu=175000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.200=200 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.200.build.f_cpu=200000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.225=225 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.225.build.f_cpu=225000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.250=250 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.250.build.f_cpu=250000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.275=275 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.275.build.f_cpu=275000000L
|
||||
adafruit_kb2040picoprobe.menu.freq.300=300 MHz (Overclock)
|
||||
adafruit_kb2040picoprobe.menu.freq.300.build.f_cpu=300000000L
|
||||
adafruit_kb2040picoprobe.menu.opt.Small=Small (-Os) (standard)
|
||||
adafruit_kb2040picoprobe.menu.opt.Small.build.flags.optimize=-Os
|
||||
adafruit_kb2040picoprobe.menu.opt.Optimize=Optimize (-O)
|
||||
adafruit_kb2040picoprobe.menu.opt.Optimize.build.flags.optimize=-O
|
||||
adafruit_kb2040picoprobe.menu.opt.Optimize2=Optimize More (-O2)
|
||||
adafruit_kb2040picoprobe.menu.opt.Optimize2.build.flags.optimize=-O2
|
||||
adafruit_kb2040picoprobe.menu.opt.Optimize3=Optimize Even More (-O3)
|
||||
adafruit_kb2040picoprobe.menu.opt.Optimize3.build.flags.optimize=-O3
|
||||
adafruit_kb2040picoprobe.menu.opt.Fast=Fast (-Ofast) (maybe slower)
|
||||
adafruit_kb2040picoprobe.menu.opt.Fast.build.flags.optimize=-Ofast
|
||||
adafruit_kb2040picoprobe.menu.opt.Debug=Debug (-Og)
|
||||
adafruit_kb2040picoprobe.menu.opt.Debug.build.flags.optimize=-Og
|
||||
adafruit_kb2040picoprobe.menu.rtti.Disabled=Disabled
|
||||
adafruit_kb2040picoprobe.menu.rtti.Disabled.build.flags.rtti=-fno-rtti
|
||||
adafruit_kb2040picoprobe.menu.rtti.Enabled=Enabled
|
||||
adafruit_kb2040picoprobe.menu.rtti.Enabled.build.flags.rtti=
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Disabled=Disabled
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Disabled.build.debug_port=
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Serial=Serial
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Serial.build.debug_port=-DDEBUG_RP2040_PORT=Serial
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Serial1=Serial1
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Serial1.build.debug_port=-DDEBUG_RP2040_PORT=Serial1
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Serial2=Serial2
|
||||
adafruit_kb2040picoprobe.menu.dbgport.Serial2.build.debug_port=-DDEBUG_RP2040_PORT=Serial2
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.None=None
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.None.build.debug_level=
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.Core=Core
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.Core.build.debug_level=-DDEBUG_RP2040_CORE
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.SPI=SPI
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.SPI.build.debug_level=-DDEBUG_RP2040_SPI
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.Wire=Wire
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.Wire.build.debug_level=-DDEBUG_RP2040_WIRE
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.All=All
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.All.build.debug_level=-DDEBUG_RP2040_WIRE -DDEBUG_RP2040_SPI -DDEBUG_RP2040_CORE
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.NDEBUG=NDEBUG
|
||||
adafruit_kb2040picoprobe.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
|
||||
adafruit_kb2040picoprobe.menu.usbstack.picosdk=Pico SDK
|
||||
adafruit_kb2040picoprobe.menu.usbstack.picosdk.build.usbstack_flags="-I{runtime.platform.path}/tools/libpico"
|
||||
adafruit_kb2040picoprobe.menu.usbstack.tinyusb=Adafruit TinyUSB
|
||||
adafruit_kb2040picoprobe.menu.usbstack.tinyusb.build.usbstack_flags=-DUSE_TINYUSB "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||
|
||||
# -----------------------------------
|
||||
# Adafruit KB2040 (pico-debug)
|
||||
# -----------------------------------
|
||||
adafruit_kb2040picodebug.name=Adafruit KB2040 (pico-debug)
|
||||
adafruit_kb2040picodebug.vid.0=0x1209
|
||||
adafruit_kb2040picodebug.pid.0=0x2488
|
||||
adafruit_kb2040picodebug.build.usbpid=-DSERIALUSB_PID=0x8105
|
||||
adafruit_kb2040picodebug.build.usbpwr=-DUSBD_MAX_POWER_MA=250
|
||||
adafruit_kb2040picodebug.build.board=ADAFRUIT_KB2040_RP2040
|
||||
adafruit_kb2040picodebug.build.mcu=cortex-m0plus
|
||||
adafruit_kb2040picodebug.build.variant=adafruit_kb2040
|
||||
adafruit_kb2040picodebug.upload.tool=picodebug
|
||||
adafruit_kb2040picodebug.upload.maximum_size=8388608
|
||||
adafruit_kb2040picodebug.upload.maximum_data_size=245760
|
||||
adafruit_kb2040picodebug.upload.wait_for_upload_port=true
|
||||
adafruit_kb2040picodebug.upload.erase_cmd=
|
||||
adafruit_kb2040picodebug.serial.disableDTR=false
|
||||
adafruit_kb2040picodebug.serial.disableRTS=false
|
||||
adafruit_kb2040picodebug.build.f_cpu=125000000
|
||||
adafruit_kb2040picodebug.build.led=
|
||||
adafruit_kb2040picodebug.build.core=rp2040
|
||||
adafruit_kb2040picodebug.build.ldscript=memmap_default.ld
|
||||
adafruit_kb2040picodebug.build.ram_length=240k
|
||||
adafruit_kb2040picodebug.build.boot2=boot2_w25q080_2_padded_checksum
|
||||
adafruit_kb2040picodebug.build.vid=0x239a
|
||||
adafruit_kb2040picodebug.build.pid=0x8105
|
||||
adafruit_kb2040picodebug.build.usb_manufacturer="Adafruit"
|
||||
adafruit_kb2040picodebug.build.usb_product="KB2040 (pico-debug)"
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_0=8MB (no FS)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_0.upload.maximum_size=8384512
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_0.build.flash_length=8384512
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_0.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_0.build.fs_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_0.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_65536=8MB (Sketch: 8128KB, FS: 64KB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_65536.upload.maximum_size=8318976
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_65536.build.flash_length=8318976
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_65536.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_65536.build.fs_start=276754432
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_65536.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_131072=8MB (Sketch: 8064KB, FS: 128KB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_131072.upload.maximum_size=8253440
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_131072.build.flash_length=8253440
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_131072.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_131072.build.fs_start=276688896
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_131072.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_262144=8MB (Sketch: 7936KB, FS: 256KB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_262144.upload.maximum_size=8122368
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_262144.build.flash_length=8122368
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_262144.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_262144.build.fs_start=276557824
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_262144.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_524288=8MB (Sketch: 7680KB, FS: 512KB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_524288.upload.maximum_size=7860224
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_524288.build.flash_length=7860224
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_524288.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_524288.build.fs_start=276295680
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_524288.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_1048576=8MB (Sketch: 7MB, FS: 1MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_1048576.upload.maximum_size=7335936
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_1048576.build.flash_length=7335936
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_1048576.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_1048576.build.fs_start=275771392
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_1048576.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_2097152=8MB (Sketch: 6MB, FS: 2MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_2097152.upload.maximum_size=6287360
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_2097152.build.flash_length=6287360
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_2097152.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_2097152.build.fs_start=274722816
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_2097152.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_3145728=8MB (Sketch: 5MB, FS: 3MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_3145728.upload.maximum_size=5238784
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_3145728.build.flash_length=5238784
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_3145728.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_3145728.build.fs_start=273674240
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_3145728.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_4194304=8MB (Sketch: 4MB, FS: 4MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_4194304.upload.maximum_size=4190208
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_4194304.build.flash_length=4190208
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_4194304.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_4194304.build.fs_start=272625664
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_4194304.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_5242880=8MB (Sketch: 3MB, FS: 5MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_5242880.upload.maximum_size=3141632
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_5242880.build.flash_length=3141632
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_5242880.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_5242880.build.fs_start=271577088
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_5242880.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_6291456=8MB (Sketch: 2MB, FS: 6MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_6291456.upload.maximum_size=2093056
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_6291456.build.flash_length=2093056
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_6291456.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_6291456.build.fs_start=270528512
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_6291456.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_7340032=8MB (Sketch: 1MB, FS: 7MB)
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_7340032.upload.maximum_size=1044480
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_7340032.build.flash_length=1044480
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_7340032.build.eeprom_start=276819968
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_7340032.build.fs_start=269479936
|
||||
adafruit_kb2040picodebug.menu.flash.8388608_7340032.build.fs_end=276819968
|
||||
adafruit_kb2040picodebug.menu.freq.125=125 MHz
|
||||
adafruit_kb2040picodebug.menu.freq.125.build.f_cpu=125000000L
|
||||
adafruit_kb2040picodebug.menu.freq.50=50 MHz
|
||||
adafruit_kb2040picodebug.menu.freq.50.build.f_cpu=50000000L
|
||||
adafruit_kb2040picodebug.menu.freq.100=100 MHz
|
||||
adafruit_kb2040picodebug.menu.freq.100.build.f_cpu=100000000L
|
||||
adafruit_kb2040picodebug.menu.freq.133=133 MHz
|
||||
adafruit_kb2040picodebug.menu.freq.133.build.f_cpu=133000000L
|
||||
adafruit_kb2040picodebug.menu.freq.150=150 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.150.build.f_cpu=150000000L
|
||||
adafruit_kb2040picodebug.menu.freq.175=175 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.175.build.f_cpu=175000000L
|
||||
adafruit_kb2040picodebug.menu.freq.200=200 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.200.build.f_cpu=200000000L
|
||||
adafruit_kb2040picodebug.menu.freq.225=225 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.225.build.f_cpu=225000000L
|
||||
adafruit_kb2040picodebug.menu.freq.250=250 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.250.build.f_cpu=250000000L
|
||||
adafruit_kb2040picodebug.menu.freq.275=275 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.275.build.f_cpu=275000000L
|
||||
adafruit_kb2040picodebug.menu.freq.300=300 MHz (Overclock)
|
||||
adafruit_kb2040picodebug.menu.freq.300.build.f_cpu=300000000L
|
||||
adafruit_kb2040picodebug.menu.opt.Small=Small (-Os) (standard)
|
||||
adafruit_kb2040picodebug.menu.opt.Small.build.flags.optimize=-Os
|
||||
adafruit_kb2040picodebug.menu.opt.Optimize=Optimize (-O)
|
||||
adafruit_kb2040picodebug.menu.opt.Optimize.build.flags.optimize=-O
|
||||
adafruit_kb2040picodebug.menu.opt.Optimize2=Optimize More (-O2)
|
||||
adafruit_kb2040picodebug.menu.opt.Optimize2.build.flags.optimize=-O2
|
||||
adafruit_kb2040picodebug.menu.opt.Optimize3=Optimize Even More (-O3)
|
||||
adafruit_kb2040picodebug.menu.opt.Optimize3.build.flags.optimize=-O3
|
||||
adafruit_kb2040picodebug.menu.opt.Fast=Fast (-Ofast) (maybe slower)
|
||||
adafruit_kb2040picodebug.menu.opt.Fast.build.flags.optimize=-Ofast
|
||||
adafruit_kb2040picodebug.menu.opt.Debug=Debug (-Og)
|
||||
adafruit_kb2040picodebug.menu.opt.Debug.build.flags.optimize=-Og
|
||||
adafruit_kb2040picodebug.menu.rtti.Disabled=Disabled
|
||||
adafruit_kb2040picodebug.menu.rtti.Disabled.build.flags.rtti=-fno-rtti
|
||||
adafruit_kb2040picodebug.menu.rtti.Enabled=Enabled
|
||||
adafruit_kb2040picodebug.menu.rtti.Enabled.build.flags.rtti=
|
||||
adafruit_kb2040picodebug.menu.dbgport.Disabled=Disabled
|
||||
adafruit_kb2040picodebug.menu.dbgport.Disabled.build.debug_port=
|
||||
adafruit_kb2040picodebug.menu.dbgport.Serial=Serial
|
||||
adafruit_kb2040picodebug.menu.dbgport.Serial.build.debug_port=-DDEBUG_RP2040_PORT=Serial
|
||||
adafruit_kb2040picodebug.menu.dbgport.Serial1=Serial1
|
||||
adafruit_kb2040picodebug.menu.dbgport.Serial1.build.debug_port=-DDEBUG_RP2040_PORT=Serial1
|
||||
adafruit_kb2040picodebug.menu.dbgport.Serial2=Serial2
|
||||
adafruit_kb2040picodebug.menu.dbgport.Serial2.build.debug_port=-DDEBUG_RP2040_PORT=Serial2
|
||||
adafruit_kb2040picodebug.menu.dbglvl.None=None
|
||||
adafruit_kb2040picodebug.menu.dbglvl.None.build.debug_level=
|
||||
adafruit_kb2040picodebug.menu.dbglvl.Core=Core
|
||||
adafruit_kb2040picodebug.menu.dbglvl.Core.build.debug_level=-DDEBUG_RP2040_CORE
|
||||
adafruit_kb2040picodebug.menu.dbglvl.SPI=SPI
|
||||
adafruit_kb2040picodebug.menu.dbglvl.SPI.build.debug_level=-DDEBUG_RP2040_SPI
|
||||
adafruit_kb2040picodebug.menu.dbglvl.Wire=Wire
|
||||
adafruit_kb2040picodebug.menu.dbglvl.Wire.build.debug_level=-DDEBUG_RP2040_WIRE
|
||||
adafruit_kb2040picodebug.menu.dbglvl.All=All
|
||||
adafruit_kb2040picodebug.menu.dbglvl.All.build.debug_level=-DDEBUG_RP2040_WIRE -DDEBUG_RP2040_SPI -DDEBUG_RP2040_CORE
|
||||
adafruit_kb2040picodebug.menu.dbglvl.NDEBUG=NDEBUG
|
||||
adafruit_kb2040picodebug.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
|
||||
adafruit_kb2040picodebug.menu.usbstack.nousb=No USB
|
||||
adafruit_kb2040picodebug.menu.usbstack.nousb.build.usbstack_flags="-DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico"
|
||||
|
||||
# -----------------------------------
|
||||
# Arduino Nano RP2040 Connect
|
||||
# -----------------------------------
|
||||
|
||||
@@ -97,6 +97,7 @@ void analogWriteResolution(int res);
|
||||
|
||||
#include "SerialUART.h"
|
||||
#include "RP2040Support.h"
|
||||
#include "SerialPIO.h"
|
||||
#include "Bootsel.h"
|
||||
|
||||
// Template which will evaluate at *compile time* to a single 32b number
|
||||
|
||||
@@ -0,0 +1,338 @@
|
||||
/*
|
||||
Serial-over-PIO for the Raspberry Pi Pico RP2040
|
||||
|
||||
Copyright (c) 2021 Earle F. Philhower, III <earlephilhower@yahoo.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "SerialPIO.h"
|
||||
#include "CoreMutex.h"
|
||||
#include <hardware/gpio.h>
|
||||
#include <map>
|
||||
#include "pio_uart.pio.h"
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// -- Generates a unique program for differing bit lengths
|
||||
static std::map<int, PIOProgram*> _txMap;
|
||||
static std::map<int, PIOProgram*> _rxMap;
|
||||
|
||||
// Duplicate a program and replace the first insn with a "set x, repl"
|
||||
static pio_program_t *pio_make_uart_prog(int repl, const pio_program_t *pg) {
|
||||
pio_program_t *p = new pio_program_t;
|
||||
p->length = pg->length;
|
||||
p->origin = pg->origin;
|
||||
uint16_t *insn = (uint16_t *)malloc(p->length * 2);
|
||||
memcpy(insn, pg->instructions, p->length * 2);
|
||||
insn[0] = pio_encode_set(pio_x, repl);
|
||||
p->instructions = insn;
|
||||
return p;
|
||||
}
|
||||
|
||||
static PIOProgram *_getTxProgram(int bits) {
|
||||
auto f = _txMap.find(bits);
|
||||
if (f == _txMap.end()) {
|
||||
pio_program_t * p = pio_make_uart_prog(bits, &pio_tx_program);
|
||||
_txMap.insert({bits, new PIOProgram(p)});
|
||||
f = _txMap.find(bits);
|
||||
}
|
||||
return f->second;
|
||||
}
|
||||
|
||||
static PIOProgram *_getRxProgram(int bits) {
|
||||
auto f = _rxMap.find(bits);
|
||||
if (f == _rxMap.end()) {
|
||||
pio_program_t * p = pio_make_uart_prog(bits, &pio_rx_program);
|
||||
_rxMap.insert({bits, new PIOProgram(p)});
|
||||
f = _rxMap.find(bits);
|
||||
}
|
||||
return f->second;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// TODO - this works, but there must be a faster/better way...
|
||||
static int _parity(int bits, int data) {
|
||||
int p = 0;
|
||||
for (int b = 0; b < bits; b++) {
|
||||
p ^= (data & (1 << b)) ? 1 : 0;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
// We need to cache generated SerialPIOs so we can add data to them from
|
||||
// the shared handler
|
||||
static SerialPIO *_pioSP[2][4];
|
||||
static void __not_in_flash_func(_fifoIRQ)() {
|
||||
for (int p = 0; p < 2; p++) {
|
||||
for (int sm = 0; sm < 4; sm++) {
|
||||
SerialPIO *s = _pioSP[p][sm];
|
||||
if (s) {
|
||||
s->_handleIRQ();
|
||||
pio_interrupt_clear((p == 0) ? pio0 : pio1, sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __not_in_flash_func(SerialPIO::_handleIRQ)() {
|
||||
if (_rx == NOPIN) {
|
||||
return;
|
||||
}
|
||||
while (!pio_sm_is_rx_fifo_empty(_rxPIO, _rxSM)) {
|
||||
uint32_t decode = _rxPIO->rxf[_rxSM];
|
||||
decode >>= 32 - _rxBits;
|
||||
uint32_t val = 0;
|
||||
for (int b = 0; b < _bits + 1; b++) {
|
||||
val |= (decode & (1 << (b * 2))) ? 1 << b : 0;
|
||||
}
|
||||
if (_parity == UART_PARITY_EVEN) {
|
||||
int p = ::_parity(_bits, val);
|
||||
int r = (val & (1 << _bits)) ? 1 : 0;
|
||||
if (p != r) {
|
||||
// TODO - parity error
|
||||
continue;
|
||||
}
|
||||
} else if (_parity == UART_PARITY_ODD) {
|
||||
int p = ::_parity(_bits, val);
|
||||
int r = (val & (1 << _bits)) ? 1 : 0;
|
||||
if (p == r) {
|
||||
// TODO - parity error
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ((_writer + 1) % sizeof(_queue) != _reader) {
|
||||
_queue[_writer] = val & ((1 << _bits) - 1);
|
||||
asm volatile("" ::: "memory"); // Ensure the queue is written before the written count advances
|
||||
_writer = (_writer + 1) % sizeof(_queue);
|
||||
} else {
|
||||
// TODO: Overflow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SerialPIO::SerialPIO(pin_size_t tx, pin_size_t rx) {
|
||||
_tx = tx;
|
||||
_rx = rx;
|
||||
mutex_init(&_mutex);
|
||||
}
|
||||
|
||||
void SerialPIO::begin(unsigned long baud, uint16_t config) {
|
||||
_baud = baud;
|
||||
switch (config & SERIAL_PARITY_MASK) {
|
||||
case SERIAL_PARITY_EVEN:
|
||||
_parity = UART_PARITY_EVEN;
|
||||
break;
|
||||
case SERIAL_PARITY_ODD:
|
||||
_parity = UART_PARITY_ODD;
|
||||
break;
|
||||
default:
|
||||
_parity = UART_PARITY_NONE;
|
||||
break;
|
||||
}
|
||||
switch (config & SERIAL_STOP_BIT_MASK) {
|
||||
case SERIAL_STOP_BIT_1:
|
||||
_stop = 1;
|
||||
break;
|
||||
default:
|
||||
_stop = 2;
|
||||
break;
|
||||
}
|
||||
switch (config & SERIAL_DATA_MASK) {
|
||||
case SERIAL_DATA_5:
|
||||
_bits = 5;
|
||||
break;
|
||||
case SERIAL_DATA_6:
|
||||
_bits = 6;
|
||||
break;
|
||||
case SERIAL_DATA_7:
|
||||
_bits = 7;
|
||||
break;
|
||||
default:
|
||||
_bits = 8;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((_tx == NOPIN) && (_rx == NOPIN)) {
|
||||
DEBUGCORE("ERROR: No pins specified for SerialPIO\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (_tx != NOPIN) {
|
||||
_txBits = _bits + _stop + (_parity != UART_PARITY_NONE ? 1 : 0) + 1/*start bit*/;
|
||||
_txPgm = _getTxProgram(_txBits);
|
||||
int off;
|
||||
if (!_txPgm->prepare(&_txPIO, &_txSM, &off)) {
|
||||
DEBUGCORE("ERROR: Unable to allocate PIO TX UART, out of PIO resources\n");
|
||||
// ERROR, no free slots
|
||||
return;
|
||||
}
|
||||
|
||||
digitalWrite(_tx, HIGH);
|
||||
pinMode(_tx, OUTPUT);
|
||||
|
||||
pio_tx_program_init(_txPIO, _txSM, off, _tx);
|
||||
pio_sm_clear_fifos(_txPIO, _txSM); // Remove any existing data
|
||||
|
||||
// Put the divider into ISR w/o using up program space
|
||||
pio_sm_put_blocking(_txPIO, _txSM, clock_get_hz(clk_sys) / _baud - 2);
|
||||
pio_sm_exec(_txPIO, _txSM, pio_encode_pull(false, false));
|
||||
pio_sm_exec(_txPIO, _txSM, pio_encode_mov(pio_isr, pio_osr));
|
||||
|
||||
// Start running!
|
||||
pio_sm_set_enabled(_txPIO, _txSM, true);
|
||||
}
|
||||
if (_rx != NOPIN) {
|
||||
_writer = 0;
|
||||
_reader = 0;
|
||||
|
||||
_rxBits = 2 * (_bits + _stop + (_parity != UART_PARITY_NONE ? 1 : 0) + 1) - 1;
|
||||
_rxPgm = _getRxProgram(_rxBits);
|
||||
int off;
|
||||
if (!_rxPgm->prepare(&_rxPIO, &_rxSM, &off)) {
|
||||
DEBUGCORE("ERROR: Unable to allocate PIO RX UART, out of PIO resources\n");
|
||||
return;
|
||||
}
|
||||
// Stash away the created RX port for the IRQ handler
|
||||
_pioSP[pio_get_index(_rxPIO)][_rxSM] = this;
|
||||
|
||||
pinMode(_rx, INPUT);
|
||||
pio_rx_program_init(_rxPIO, _rxSM, off, _rx);
|
||||
pio_sm_clear_fifos(_rxPIO, _rxSM); // Remove any existing data
|
||||
|
||||
// Put phase divider into OSR w/o using add'l program memory
|
||||
pio_sm_put_blocking(_rxPIO, _rxSM, clock_get_hz(clk_sys) / (_baud * 2) - 2);
|
||||
pio_sm_exec(_rxPIO, _rxSM, pio_encode_pull(false, false));
|
||||
|
||||
// Join the TX FIFO to the RX one now that we don't need it
|
||||
_rxPIO->sm[_rxSM].shiftctrl |= 0x80000000;
|
||||
|
||||
// Enable interrupts on rxfifo
|
||||
switch (_rxSM) {
|
||||
case 0: pio_set_irq0_source_enabled(_rxPIO, pis_sm0_rx_fifo_not_empty, true); break;
|
||||
case 1: pio_set_irq0_source_enabled(_rxPIO, pis_sm1_rx_fifo_not_empty, true); break;
|
||||
case 2: pio_set_irq0_source_enabled(_rxPIO, pis_sm2_rx_fifo_not_empty, true); break;
|
||||
case 3: pio_set_irq0_source_enabled(_rxPIO, pis_sm3_rx_fifo_not_empty, true); break;
|
||||
}
|
||||
irq_set_exclusive_handler(PIO0_IRQ_0, _fifoIRQ);
|
||||
irq_set_enabled(PIO0_IRQ_0, true);
|
||||
|
||||
pio_sm_set_enabled(_rxPIO, _rxSM, true);
|
||||
}
|
||||
|
||||
_running = true;
|
||||
}
|
||||
|
||||
void SerialPIO::end() {
|
||||
if (!_running) {
|
||||
return;
|
||||
}
|
||||
// TODO: Deallocate PIO resources, stop them
|
||||
_pioSP[pio_get_index(_rxPIO)][_rxSM] = nullptr;
|
||||
_running = false;
|
||||
}
|
||||
|
||||
int SerialPIO::peek() {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m || (_rx == NOPIN)) {
|
||||
return -1;
|
||||
}
|
||||
// If there's something in the FIFO now, just peek at it
|
||||
uint32_t start = millis();
|
||||
uint32_t now = millis();
|
||||
while ((now - start) < _timeout) {
|
||||
if (_writer != _reader) {
|
||||
return _queue[_reader];
|
||||
}
|
||||
delay(1);
|
||||
now = millis();
|
||||
}
|
||||
return -1; // Nothing available before timeout
|
||||
}
|
||||
|
||||
int SerialPIO::read() {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m || (_rx == NOPIN)) {
|
||||
return -1;
|
||||
}
|
||||
uint32_t start = millis();
|
||||
uint32_t now = millis();
|
||||
while ((now - start) < _timeout) {
|
||||
if (_writer != _reader) {
|
||||
auto ret = _queue[_reader];
|
||||
_reader = (_reader + 1) % sizeof(_queue);
|
||||
return ret;
|
||||
}
|
||||
delay(1);
|
||||
now = millis();
|
||||
}
|
||||
return -1; // Timeout
|
||||
}
|
||||
|
||||
int SerialPIO::available() {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m || (_rx == NOPIN)) {
|
||||
return 0;
|
||||
}
|
||||
return (_writer - _reader) % sizeof(_queue);
|
||||
}
|
||||
|
||||
int SerialPIO::availableForWrite() {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m || (_tx == NOPIN)) {
|
||||
return 0;
|
||||
}
|
||||
return 8 - pio_sm_get_tx_fifo_level(_txPIO, _txSM);
|
||||
}
|
||||
|
||||
void SerialPIO::flush() {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m || (_tx == NOPIN)) {
|
||||
return;
|
||||
}
|
||||
while (!pio_sm_is_tx_fifo_empty(_txPIO, _txSM)) {
|
||||
delay(1); // Wait for all FIFO to be read
|
||||
}
|
||||
// Could have 1 byte being transmitted, so wait for bit times
|
||||
delay((1000 * (_txBits + 1)) / _baud);
|
||||
}
|
||||
|
||||
size_t SerialPIO::write(uint8_t c) {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m || (_tx == NOPIN)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t val = c;
|
||||
if (_parity == UART_PARITY_NONE) {
|
||||
val |= 7 << _bits; // Set 2 stop bits, the HW will only transmit the required number
|
||||
} else if (_parity == UART_PARITY_EVEN) {
|
||||
val |= ::_parity(_bits, c) << _bits;
|
||||
val |= 7 << (_bits + 1);
|
||||
} else {
|
||||
val |= (1 ^ ::_parity(_bits, c)) << _bits;
|
||||
val |= 7 << (_bits + 1);
|
||||
}
|
||||
val <<= 1; // Start bit = low
|
||||
|
||||
pio_sm_put_blocking(_txPIO, _txSM, val);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
SerialPIO::operator bool() {
|
||||
return _running;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
Serial-over-PIO for the Raspberry Pi Pico RP2040
|
||||
|
||||
Copyright (c) 2021 Earle F. Philhower, III <earlephilhower@yahoo.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "api/HardwareSerial.h"
|
||||
#include <stdarg.h>
|
||||
#include <queue>
|
||||
#include <hardware/uart.h>
|
||||
#include "CoreMutex.h"
|
||||
|
||||
extern "C" typedef struct uart_inst uart_inst_t;
|
||||
|
||||
class SerialPIO : public HardwareSerial {
|
||||
public:
|
||||
static const pin_size_t NOPIN = 0xff; // Use in constructor to disable RX or TX unit
|
||||
SerialPIO(pin_size_t tx, pin_size_t rx);
|
||||
|
||||
void begin(unsigned long baud = 115200) override {
|
||||
begin(baud, SERIAL_8N1);
|
||||
};
|
||||
void begin(unsigned long baud, uint16_t config) override;
|
||||
void end() override;
|
||||
|
||||
virtual int peek() override;
|
||||
virtual int read() override;
|
||||
virtual int available() override;
|
||||
virtual int availableForWrite() override;
|
||||
virtual void flush() override;
|
||||
virtual size_t write(uint8_t c) override;
|
||||
using Print::write;
|
||||
operator bool() override;
|
||||
|
||||
// Not to be called by users, only from the IRQ handler. In public so that the C-language IQR callback can access it
|
||||
void _handleIRQ();
|
||||
|
||||
private:
|
||||
bool _running = false;
|
||||
pin_size_t _tx, _rx;
|
||||
int _baud;
|
||||
int _bits;
|
||||
uart_parity_t _parity;
|
||||
int _stop;
|
||||
mutex_t _mutex;
|
||||
|
||||
PIOProgram *_txPgm;
|
||||
PIO _txPIO;
|
||||
int _txSM;
|
||||
int _txBits;
|
||||
|
||||
PIOProgram *_rxPgm;
|
||||
PIO _rxPIO;
|
||||
int _rxSM;
|
||||
int _rxBits;
|
||||
|
||||
// Lockless, IRQ-handled circular queue
|
||||
uint32_t _writer;
|
||||
uint32_t _reader;
|
||||
uint8_t _queue[32];
|
||||
};
|
||||
+88
-45
@@ -72,65 +72,90 @@ SerialUART::SerialUART(uart_inst_t *uart, pin_size_t tx, pin_size_t rx) {
|
||||
mutex_init(&_mutex);
|
||||
}
|
||||
|
||||
static void _uart0IRQ();
|
||||
static void _uart1IRQ();
|
||||
|
||||
void SerialUART::begin(unsigned long baud, uint16_t config) {
|
||||
_baud = baud;
|
||||
uart_init(_uart, baud);
|
||||
int bits, stop;
|
||||
uart_parity_t parity;
|
||||
switch (config & SERIAL_PARITY_MASK) {
|
||||
case SERIAL_PARITY_EVEN: parity = UART_PARITY_EVEN; break;
|
||||
case SERIAL_PARITY_ODD: parity = UART_PARITY_ODD; break;
|
||||
default: parity = UART_PARITY_NONE; break;
|
||||
case SERIAL_PARITY_EVEN:
|
||||
parity = UART_PARITY_EVEN;
|
||||
break;
|
||||
case SERIAL_PARITY_ODD:
|
||||
parity = UART_PARITY_ODD;
|
||||
break;
|
||||
default:
|
||||
parity = UART_PARITY_NONE;
|
||||
break;
|
||||
}
|
||||
switch (config & SERIAL_STOP_BIT_MASK) {
|
||||
case SERIAL_STOP_BIT_1: stop = 1; break;
|
||||
default: stop = 2; break;
|
||||
case SERIAL_STOP_BIT_1:
|
||||
stop = 1;
|
||||
break;
|
||||
default:
|
||||
stop = 2;
|
||||
break;
|
||||
}
|
||||
switch (config & SERIAL_DATA_MASK) {
|
||||
case SERIAL_DATA_5: bits = 5; break;
|
||||
case SERIAL_DATA_6: bits = 6; break;
|
||||
case SERIAL_DATA_7: bits = 7; break;
|
||||
default: bits = 8; break;
|
||||
case SERIAL_DATA_5:
|
||||
bits = 5;
|
||||
break;
|
||||
case SERIAL_DATA_6:
|
||||
bits = 6;
|
||||
break;
|
||||
case SERIAL_DATA_7:
|
||||
bits = 7;
|
||||
break;
|
||||
default:
|
||||
bits = 8;
|
||||
break;
|
||||
}
|
||||
uart_set_format(_uart, bits, stop, parity);
|
||||
gpio_set_function(_tx, GPIO_FUNC_UART);
|
||||
gpio_set_function(_rx, GPIO_FUNC_UART);
|
||||
_running = true;
|
||||
while (!_swFIFO.empty()) {
|
||||
(void)_swFIFO.pop(); // Just throw out anything in our old FIFO
|
||||
_writer = 0;
|
||||
_reader = 0;
|
||||
|
||||
if (_uart == uart0) {
|
||||
irq_set_exclusive_handler(UART0_IRQ, _uart0IRQ);
|
||||
irq_set_enabled(UART0_IRQ, true);
|
||||
} else {
|
||||
irq_set_exclusive_handler(UART1_IRQ, _uart1IRQ);
|
||||
irq_set_enabled(UART1_IRQ, true);
|
||||
}
|
||||
uart_get_hw(_uart)->imsc |= UART_UARTIMSC_RXIM_BITS | UART_UARTIMSC_RTIM_BITS;
|
||||
_running = true;
|
||||
}
|
||||
|
||||
void SerialUART::end() {
|
||||
if (!_running) {
|
||||
return;
|
||||
}
|
||||
if (_uart == uart0) {
|
||||
irq_set_enabled(UART0_IRQ, false);
|
||||
} else {
|
||||
irq_set_enabled(UART1_IRQ, false);
|
||||
}
|
||||
uart_deinit(_uart);
|
||||
_running = false;
|
||||
}
|
||||
|
||||
// Transfers any data in the HW FIFO into our SW one, up to 32 bytes
|
||||
void SerialUART::_pumpFIFO() {
|
||||
while ((_swFIFO.size() < 32) && (uart_is_readable(_uart))) {
|
||||
_swFIFO.push(uart_getc(_uart));
|
||||
}
|
||||
}
|
||||
|
||||
int SerialUART::peek() {
|
||||
CoreMutex m(&_mutex);
|
||||
if (!_running || !m) {
|
||||
return -1;
|
||||
}
|
||||
_pumpFIFO();
|
||||
// If there's something in the FIFO now, just peek at it
|
||||
if (_swFIFO.size()) {
|
||||
return _swFIFO.front();
|
||||
}
|
||||
// The SW FIFO is empty, read the HW one until the timeout
|
||||
if (uart_is_readable_within_us(_uart, _timeout * 1000)) {
|
||||
// We got one char, put it in the FIFO (which will now have exactly 1 byte) and return it
|
||||
_swFIFO.push(uart_getc(_uart));
|
||||
return _swFIFO.front();
|
||||
uint32_t start = millis();
|
||||
uint32_t now = millis();
|
||||
while ((now - start) < _timeout) {
|
||||
if (_writer != _reader) {
|
||||
return _queue[_reader];
|
||||
}
|
||||
delay(1);
|
||||
now = millis();
|
||||
}
|
||||
return -1; // Nothing available before timeout
|
||||
}
|
||||
@@ -140,16 +165,16 @@ int SerialUART::read() {
|
||||
if (!_running || !m) {
|
||||
return -1;
|
||||
}
|
||||
_pumpFIFO();
|
||||
if (_swFIFO.size()) {
|
||||
auto ret = _swFIFO.front();
|
||||
_swFIFO.pop();
|
||||
return ret;
|
||||
}
|
||||
// The SW FIFO is empty, read the HW one until the timeout
|
||||
if (uart_is_readable_within_us(_uart, _timeout * 1000)) {
|
||||
// We got one char, return it (FIFO will still be empty
|
||||
return uart_getc(_uart);
|
||||
uint32_t start = millis();
|
||||
uint32_t now = millis();
|
||||
while ((now - start) < _timeout) {
|
||||
if (_writer != _reader) {
|
||||
auto ret = _queue[_reader];
|
||||
_reader = (_reader + 1) % sizeof(_queue);
|
||||
return ret;
|
||||
}
|
||||
delay(1);
|
||||
now = millis();
|
||||
}
|
||||
return -1; // Timeout
|
||||
}
|
||||
@@ -159,8 +184,7 @@ int SerialUART::available() {
|
||||
if (!_running || !m) {
|
||||
return 0;
|
||||
}
|
||||
_pumpFIFO();
|
||||
return _swFIFO.size();
|
||||
return (_writer - _reader) % sizeof(_queue);
|
||||
}
|
||||
|
||||
int SerialUART::availableForWrite() {
|
||||
@@ -168,7 +192,6 @@ int SerialUART::availableForWrite() {
|
||||
if (!_running || !m) {
|
||||
return 0;
|
||||
}
|
||||
_pumpFIFO();
|
||||
return (uart_is_writable(_uart)) ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -177,7 +200,6 @@ void SerialUART::flush() {
|
||||
if (!_running || !m) {
|
||||
return;
|
||||
}
|
||||
_pumpFIFO();
|
||||
uart_tx_wait_blocking(_uart);
|
||||
}
|
||||
|
||||
@@ -186,7 +208,6 @@ size_t SerialUART::write(uint8_t c) {
|
||||
if (!_running || !m) {
|
||||
return 0;
|
||||
}
|
||||
_pumpFIFO();
|
||||
uart_putc_raw(_uart, c);
|
||||
return 1;
|
||||
}
|
||||
@@ -196,7 +217,6 @@ size_t SerialUART::write(const uint8_t *p, size_t len) {
|
||||
if (!_running || !m) {
|
||||
return 0;
|
||||
}
|
||||
_pumpFIFO();
|
||||
size_t cnt = len;
|
||||
while (cnt) {
|
||||
uart_putc_raw(_uart, *p);
|
||||
@@ -224,3 +244,26 @@ void arduino::serialEvent2Run(void) {
|
||||
serialEvent2();
|
||||
}
|
||||
}
|
||||
|
||||
// IRQ handler, called when FIFO > 1/4 full or when it had held unread data for >32 bit times
|
||||
void __not_in_flash_func(SerialUART::_handleIRQ)() {
|
||||
uart_get_hw(_uart)->icr |= UART_UARTICR_RTIC_BITS | UART_UARTICR_RXIC_BITS;
|
||||
while (uart_is_readable(_uart)) {
|
||||
auto val = uart_getc(_uart);
|
||||
if ((_writer + 1) % sizeof(_queue) != _reader) {
|
||||
_queue[_writer] = val;
|
||||
asm volatile("" ::: "memory"); // Ensure the queue is written before the written count advances
|
||||
_writer = (_writer + 1) % sizeof(_queue);
|
||||
} else {
|
||||
// TODO: Overflow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void __not_in_flash_func(_uart0IRQ)() {
|
||||
Serial1._handleIRQ();
|
||||
}
|
||||
|
||||
static void __not_in_flash_func(_uart1IRQ)() {
|
||||
Serial2._handleIRQ();
|
||||
}
|
||||
|
||||
@@ -57,6 +57,9 @@ public:
|
||||
using Print::write;
|
||||
operator bool() override;
|
||||
|
||||
// Not to be called by users, only from the IRQ handler. In public so that the C-language IQR callback can access it
|
||||
void _handleIRQ();
|
||||
|
||||
private:
|
||||
bool _running = false;
|
||||
uart_inst_t *_uart;
|
||||
@@ -64,8 +67,10 @@ private:
|
||||
int _baud;
|
||||
mutex_t _mutex;
|
||||
|
||||
void _pumpFIFO();
|
||||
std::queue<uint8_t> _swFIFO;
|
||||
// Lockless, IRQ-handled circular queue
|
||||
uint32_t _writer;
|
||||
uint32_t _reader;
|
||||
uint8_t _queue[32];
|
||||
};
|
||||
|
||||
extern SerialUART Serial1; // HW UART 0
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
; pio_uart for the Raspberry Pi Pico RP2040
|
||||
;
|
||||
; Based loosely off of the uart_rx/_tx examples in the pico-examples repo,
|
||||
; but heavily modified and optimized to not require changing the PIO
|
||||
; clocks so that Tone and Servo won't be affected, and multiple different
|
||||
; PIO ports can be run at different baud at the same time.
|
||||
;
|
||||
; Copyright (c) 2021 Earle F. Philhower, III <earlephilhower@yahoo.com>
|
||||
;
|
||||
; This library is free software; you can redistribute it and/or
|
||||
; modify it under the terms of the GNU Lesser General Public
|
||||
; License as published by the Free Software Foundation; either
|
||||
; version 2.1 of the License, or (at your option) any later version.
|
||||
;
|
||||
; This library is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
; Lesser General Public License for more details.
|
||||
;
|
||||
; You should have received a copy of the GNU Lesser General Public
|
||||
; License along with this library; if not, write to the Free Software
|
||||
; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
|
||||
.program pio_tx
|
||||
.side_set 1 opt
|
||||
|
||||
; We shift out the start and stop bit as part of the FIFO
|
||||
set x, 9
|
||||
|
||||
pull side 1 ; Force stop bit
|
||||
|
||||
; Send the bits
|
||||
bitloop:
|
||||
out pins, 1
|
||||
mov y, isr ; ISR is loaded by the setup routine with the period-1 count
|
||||
wait_bit:
|
||||
jmp y-- wait_bit
|
||||
jmp x-- bitloop
|
||||
|
||||
|
||||
|
||||
% c-sdk {
|
||||
|
||||
static inline void pio_tx_program_init(PIO pio, uint sm, uint offset, uint pin_tx) {
|
||||
// Tell PIO to initially drive output-high on the selected pin, then map PIO
|
||||
// onto that pin with the IO muxes.
|
||||
pio_sm_set_pins_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
||||
pio_sm_set_pindirs_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
||||
pio_gpio_init(pio, pin_tx);
|
||||
|
||||
pio_sm_config c = pio_tx_program_get_default_config(offset);
|
||||
|
||||
// OUT shifts to right, no autopull
|
||||
sm_config_set_out_shift(&c, true, false, 32);
|
||||
|
||||
// We are mapping both OUT and side-set to the same pin, because sometimes
|
||||
// we need to assert user data onto the pin (with OUT) and sometimes
|
||||
// assert constant values (start/stop bit)
|
||||
sm_config_set_out_pins(&c, pin_tx, 1);
|
||||
sm_config_set_sideset_pins(&c, pin_tx);
|
||||
|
||||
// We only need TX, so get an 8-deep FIFO!
|
||||
sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_TX);
|
||||
|
||||
pio_sm_init(pio, sm, offset, &c);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
|
||||
.program pio_rx
|
||||
|
||||
; IN pin 0 and JMP pin are both mapped to the GPIO used as UART RX.
|
||||
|
||||
start:
|
||||
set x, 18 ; Preload bit counter...we'll shift in the start bit and stop bit, and each bit will be double-recorded (to be fixed by RP2040 code)
|
||||
wait 0 pin 0 ; Stall until start bit is asserted
|
||||
|
||||
bitloop:
|
||||
; Delay until 1/2 way into the bit time
|
||||
mov y, osr
|
||||
wait_half:
|
||||
jmp y-- wait_half
|
||||
|
||||
; Read in the bit
|
||||
in pins, 1 ; Shift data bit into ISR
|
||||
jmp x-- bitloop ; Loop all bits
|
||||
|
||||
push ; Stuff it and wait for next start
|
||||
|
||||
|
||||
% c-sdk {
|
||||
static inline void pio_rx_program_init(PIO pio, uint sm, uint offset, uint pin) {
|
||||
pio_sm_set_consecutive_pindirs(pio, sm, pin, 1, false);
|
||||
pio_gpio_init(pio, pin);
|
||||
gpio_pull_up(pin);
|
||||
|
||||
pio_sm_config c = pio_rx_program_get_default_config(offset);
|
||||
sm_config_set_in_pins(&c, pin); // for WAIT, IN
|
||||
sm_config_set_jmp_pin(&c, pin); // for JMP
|
||||
// Shift to right, autopull disabled
|
||||
sm_config_set_in_shift(&c, true, false, 32);
|
||||
|
||||
pio_sm_init(pio, sm, offset, &c);
|
||||
}
|
||||
|
||||
%}
|
||||
@@ -0,0 +1,107 @@
|
||||
// -------------------------------------------------- //
|
||||
// This file is autogenerated by pioasm; do not edit! //
|
||||
// -------------------------------------------------- //
|
||||
|
||||
#if !PICO_NO_HARDWARE
|
||||
#include "hardware/pio.h"
|
||||
#endif
|
||||
|
||||
// ------ //
|
||||
// pio_tx //
|
||||
// ------ //
|
||||
|
||||
#define pio_tx_wrap_target 0
|
||||
#define pio_tx_wrap 5
|
||||
|
||||
static const uint16_t pio_tx_program_instructions[] = {
|
||||
// .wrap_target
|
||||
0xe029, // 0: set x, 9
|
||||
0x98a0, // 1: pull block side 1
|
||||
0x6001, // 2: out pins, 1
|
||||
0xa046, // 3: mov y, isr
|
||||
0x0084, // 4: jmp y--, 4
|
||||
0x0042, // 5: jmp x--, 2
|
||||
// .wrap
|
||||
};
|
||||
|
||||
#if !PICO_NO_HARDWARE
|
||||
static const struct pio_program pio_tx_program = {
|
||||
.instructions = pio_tx_program_instructions,
|
||||
.length = 6,
|
||||
.origin = -1,
|
||||
};
|
||||
|
||||
static inline pio_sm_config pio_tx_program_get_default_config(uint offset) {
|
||||
pio_sm_config c = pio_get_default_sm_config();
|
||||
sm_config_set_wrap(&c, offset + pio_tx_wrap_target, offset + pio_tx_wrap);
|
||||
sm_config_set_sideset(&c, 2, true, false);
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline void pio_tx_program_init(PIO pio, uint sm, uint offset, uint pin_tx) {
|
||||
// Tell PIO to initially drive output-high on the selected pin, then map PIO
|
||||
// onto that pin with the IO muxes.
|
||||
pio_sm_set_pins_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
||||
pio_sm_set_pindirs_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
||||
pio_gpio_init(pio, pin_tx);
|
||||
pio_sm_config c = pio_tx_program_get_default_config(offset);
|
||||
// OUT shifts to right, no autopull
|
||||
sm_config_set_out_shift(&c, true, false, 32);
|
||||
// We are mapping both OUT and side-set to the same pin, because sometimes
|
||||
// we need to assert user data onto the pin (with OUT) and sometimes
|
||||
// assert constant values (start/stop bit)
|
||||
sm_config_set_out_pins(&c, pin_tx, 1);
|
||||
sm_config_set_sideset_pins(&c, pin_tx);
|
||||
// We only need TX, so get an 8-deep FIFO!
|
||||
sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_TX);
|
||||
pio_sm_init(pio, sm, offset, &c);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// ------ //
|
||||
// pio_rx //
|
||||
// ------ //
|
||||
|
||||
#define pio_rx_wrap_target 0
|
||||
#define pio_rx_wrap 6
|
||||
|
||||
static const uint16_t pio_rx_program_instructions[] = {
|
||||
// .wrap_target
|
||||
0xe032, // 0: set x, 18
|
||||
0x2020, // 1: wait 0 pin, 0
|
||||
0xa047, // 2: mov y, osr
|
||||
0x0083, // 3: jmp y--, 3
|
||||
0x4001, // 4: in pins, 1
|
||||
0x0042, // 5: jmp x--, 2
|
||||
0x8020, // 6: push block
|
||||
// .wrap
|
||||
};
|
||||
|
||||
#if !PICO_NO_HARDWARE
|
||||
static const struct pio_program pio_rx_program = {
|
||||
.instructions = pio_rx_program_instructions,
|
||||
.length = 7,
|
||||
.origin = -1,
|
||||
};
|
||||
|
||||
static inline pio_sm_config pio_rx_program_get_default_config(uint offset) {
|
||||
pio_sm_config c = pio_get_default_sm_config();
|
||||
sm_config_set_wrap(&c, offset + pio_rx_wrap_target, offset + pio_rx_wrap);
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline void pio_rx_program_init(PIO pio, uint sm, uint offset, uint pin) {
|
||||
pio_sm_set_consecutive_pindirs(pio, sm, pin, 1, false);
|
||||
pio_gpio_init(pio, pin);
|
||||
gpio_pull_up(pin);
|
||||
pio_sm_config c = pio_rx_program_get_default_config(offset);
|
||||
sm_config_set_in_pins(&c, pin); // for WAIT, IN
|
||||
sm_config_set_jmp_pin(&c, pin); // for JMP
|
||||
// Shift to right, autopull disabled
|
||||
sm_config_set_in_shift(&c, true, false, 32);
|
||||
pio_sm_init(pio, sm, offset, &c);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,7 @@ For the latest version, always check https://github.com/earlephilhower/arduino-p
|
||||
EEPROM <eeprom>
|
||||
I2S Audio <i2s>
|
||||
Serial USB and UARTs <serial>
|
||||
"Software Serial" PIO UART <piouart>
|
||||
Servo <servo>
|
||||
SPI <spi>
|
||||
Wire(I2C) <wire>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
"SoftwareSerial" PIO-based UART
|
||||
================================
|
||||
|
||||
Equivalent to the Arduino SoftwareSerial library, an emulated UART using
|
||||
one or two PIO state machines is included in the Arduino-Pico core. This
|
||||
allows for up to 8 additional serial ports to be run from the RP2040 without
|
||||
requiring additional CPU resources.
|
||||
|
||||
Instantiate a ``SerialPIO(txpin, rxpin)`` object in your sketch and then
|
||||
use it the same as any other serial port. Even, odd, and no parity modes
|
||||
are supported, as well as data sizes from 5- to 8-bits.
|
||||
|
||||
To instantiate only a serial transmit or receive unit, pass in
|
||||
``SerialPIO::NOPIN`` as the ``txpin`` or ``rxpin``.
|
||||
|
||||
For example, to make a transmit-only port on GP16
|
||||
.. code:: cpp
|
||||
|
||||
SerialPIO transmitter( 16, SerialPIO::NOPIN );
|
||||
|
||||
For detailed information about the Serial ports, see the
|
||||
Arduino `Serial Reference <https://www.arduino.cc/reference/en/language/functions/communication/serial/>`_ .
|
||||
@@ -33,3 +33,4 @@ resumeOtherCore KEYWORD2
|
||||
|
||||
PIOProgram KEYWORD2
|
||||
prepare KEYWORD2
|
||||
SerialPIO KEYWORD2
|
||||
|
||||
+16
-12
@@ -179,23 +179,22 @@ void SPIClassRP2040::transfer(void *txbuf, void *rxbuf, size_t count) {
|
||||
|
||||
void SPIClassRP2040::beginTransaction(SPISettings settings) {
|
||||
DEBUGSPI("SPI::beginTransaction(clk=%d, bo=%s\n", _spis.getClockFreq(), (_spis.getBitOrder() == MSBFIRST) ? "MSB" : "LSB");
|
||||
_spis = settings;
|
||||
if (_initted) {
|
||||
DEBUGSPI("SPI: deinitting currently active SPI\n");
|
||||
spi_deinit(_spi);
|
||||
if (_initted && settings == _spis) {
|
||||
DEBUGSPI("SPI: Reusing existing initted SPI\n");
|
||||
} else {
|
||||
_spis = settings;
|
||||
if (_initted) {
|
||||
DEBUGSPI("SPI: deinitting currently active SPI\n");
|
||||
spi_deinit(_spi);
|
||||
}
|
||||
DEBUGSPI("SPI: initting SPI\n");
|
||||
spi_init(_spi, _spis.getClockFreq());
|
||||
_initted = true;
|
||||
}
|
||||
DEBUGSPI("SPI: initting SPI\n");
|
||||
spi_init(_spi, _spis.getClockFreq());
|
||||
_initted = true;
|
||||
}
|
||||
|
||||
void SPIClassRP2040::endTransaction(void) {
|
||||
DEBUGSPI("SPI::endTransaction()\n");
|
||||
if (_initted) {
|
||||
DEBUGSPI("SPI: deinitting currently active SPI\n");
|
||||
spi_deinit(_spi);
|
||||
}
|
||||
_initted = false;
|
||||
}
|
||||
|
||||
bool SPIClassRP2040::setRX(pin_size_t pin) {
|
||||
@@ -281,6 +280,11 @@ void SPIClassRP2040::begin(bool hwCS) {
|
||||
|
||||
void SPIClassRP2040::end() {
|
||||
DEBUGSPI("SPI::end()\n");
|
||||
if (_initted) {
|
||||
DEBUGSPI("SPI: deinitting currently active SPI\n");
|
||||
_initted = false;
|
||||
spi_deinit(_spi);
|
||||
}
|
||||
gpio_set_function(_RX, GPIO_FUNC_SIO);
|
||||
if (_hwCS) {
|
||||
gpio_set_function(_CS, GPIO_FUNC_SIO);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "framework-arduinopico",
|
||||
"version": "1.10909.0",
|
||||
"version": "1.10912.0",
|
||||
"description": "Arduino Wiring-based Framework (RPi Pico RP2040)",
|
||||
"keywords": [
|
||||
"framework",
|
||||
|
||||
@@ -162,6 +162,7 @@ MakeBoard("adafruit_qtpy", "Adafruit", "QT Py RP2040", "0x239a", "0x80f7", 250,
|
||||
MakeBoard("adafruit_stemmafriend", "Adafruit", "STEMMA Friend RP2040", "0x239a", "0x80e3", 250, "ADAFRUIT_STEMMAFRIEND_RP2040", 8, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("adafruit_trinkeyrp2040qt", "Adafruit", "Trinkey RP2040 QT", "0x239a", "0x8109", 250, "ADAFRUIT_TRINKEYQT_RP2040", 8, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("adafruit_macropad2040", "Adafruit", "MacroPad RP2040", "0x239a", "0x8107", 250, "ADAFRUIT_MACROPAD_RP2040", 8, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("adafruit_kb2040", "Adafruit", "KB2040", "0x239a", "0x8105", 250, "ADAFRUIT_KB2040_RP2040", 8, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("arduino_nano_connect", "Arduino", "Nano RP2040 Connect", "0x2341", "0x0058", 250, "ARDUINO_NANO_RP2040_CONNECT", 16, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("cytron_maker_nano_rp2040", "Cytron", "Maker Nano RP2040", "0x2e8a", "0x100f", 250, "CYTRON_MAKER_NANO_RP2040", 2, "boot2_w25q080_2_padded_checksum")
|
||||
MakeBoard("cytron_maker_pi_rp2040", "Cytron", "Maker Pi RP2040", "0x2e8a", "0x1000", 250, "CYTRON_MAKER_PI_RP2040", 2, "boot2_w25q080_2_padded_checksum")
|
||||
|
||||
@@ -142,7 +142,8 @@ def configure_usb_flags(cpp_defines):
|
||||
("USB_PID", usb_pid),
|
||||
("USB_MANUFACTURER", '\\"%s\\"' % usb_manufacturer),
|
||||
("USB_PRODUCT", '\\"%s\\"' % usb_product),
|
||||
("SERIALUSB_PID", usb_pid)
|
||||
("SERIALUSB_PID", usb_pid),
|
||||
("USBD_MAX_POWER_MA", 250)
|
||||
])
|
||||
|
||||
# use vidtouse and pidtouse
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
// Pin definitions taken from:
|
||||
// https://learn.adafruit.com/assets/100337
|
||||
|
||||
// LEDs not pinned out
|
||||
#define PIN_LED (31u)
|
||||
|
||||
// Serial
|
||||
#define PIN_SERIAL1_TX (0u)
|
||||
#define PIN_SERIAL1_RX (1u)
|
||||
|
||||
// Not pinned out
|
||||
#define PIN_SERIAL2_TX (31u)
|
||||
#define PIN_SERIAL2_RX (31u)
|
||||
|
||||
// SPI
|
||||
#define PIN_SPI0_MISO (20u)
|
||||
#define PIN_SPI0_MOSI (19u)
|
||||
#define PIN_SPI0_SCK (18u)
|
||||
#define PIN_SPI0_SS (31u) // not pinned out
|
||||
|
||||
// Not pinned out
|
||||
#define PIN_SPI1_MISO (31u)
|
||||
#define PIN_SPI1_MOSI (31u)
|
||||
#define PIN_SPI1_SCK (31u)
|
||||
#define PIN_SPI1_SS (31u)
|
||||
|
||||
// Wire is on the STEMMA QT port
|
||||
#define PIN_WIRE0_SDA (12u)
|
||||
#define PIN_WIRE0_SCL (13u)
|
||||
|
||||
// Wire1 is on the breakout pins
|
||||
#define PIN_WIRE1_SDA (2u)
|
||||
#define PIN_WIRE1_SCL (3u)
|
||||
|
||||
#define SERIAL_HOWMANY (1u)
|
||||
#define SPI_HOWMANY (1u)
|
||||
#define WIRE_HOWMANY (2u)
|
||||
|
||||
#define PIN_NEOPIXEL (17u)
|
||||
#include "../generic/common.h"
|
||||
@@ -38,4 +38,10 @@
|
||||
#define SPI_HOWMANY (1u)
|
||||
#define WIRE_HOWMANY (2u)
|
||||
|
||||
// Pin overrides specific to the QT Py RP2040
|
||||
#define __PIN_A0 (29u)
|
||||
#define __PIN_A1 (28u)
|
||||
#define __PIN_A2 (27u)
|
||||
#define __PIN_A3 (26u)
|
||||
|
||||
#include "../generic/common.h"
|
||||
|
||||
@@ -56,19 +56,19 @@ static const uint8_t A5 = (13u);
|
||||
#define PIN_SPI0_MISO (D12)
|
||||
#define PIN_SPI0_MOSI (D11)
|
||||
#define PIN_SPI0_SCK (D13)
|
||||
#define PIN_SPI0_SS (13u)//(D10)
|
||||
#define PIN_SPI0_SS (D10)
|
||||
|
||||
#define PIN_SPI1_MISO (D25)
|
||||
#define PIN_SPI1_MOSI (D28)
|
||||
#define PIN_SPI1_SCK (D29)
|
||||
#define PIN_SPI1_SS (13u)
|
||||
#define PIN_SPI1_SS (D10)
|
||||
|
||||
// Wire
|
||||
#define PIN_WIRE0_SDA (D18)
|
||||
#define PIN_WIRE0_SCL (D19)
|
||||
|
||||
#define PIN_WIRE1_SDA (26u) //Non c'è
|
||||
#define PIN_WIRE1_SCL (27u) //Non c'è
|
||||
#define PIN_WIRE1_SDA (D14)
|
||||
#define PIN_WIRE1_SCL (D15)
|
||||
|
||||
#define SERIAL_HOWMANY (3u)
|
||||
#define SPI_HOWMANY (2u)
|
||||
@@ -95,7 +95,7 @@ static const uint8_t SCK = PIN_SPI0_SCK;
|
||||
#define SerialHCI Serial2
|
||||
|
||||
//#define NINA_GPIOIRQ (21u) // LEDG pin (GPIO26 on NINA)
|
||||
#define NINA_GPIO0 (20u) // real GPIO0 on NINA
|
||||
#define NINA_GPIO0 (D20) // (2u), real GPIO0 on NINA
|
||||
|
||||
#define SPIWIFI_SS (D26)
|
||||
#define SPIWIFI_ACK (D27)
|
||||
|
||||
@@ -39,12 +39,34 @@ static const uint8_t D27 = (27u);
|
||||
static const uint8_t D28 = (28u);
|
||||
static const uint8_t D29 = (29u);
|
||||
|
||||
static const uint8_t A0 = (26u);
|
||||
static const uint8_t A1 = (27u);
|
||||
static const uint8_t A2 = (28u);
|
||||
static const uint8_t A3 = (29u);
|
||||
#ifdef __PIN_A0
|
||||
static const uint8_t A0 = __PIN_A0;
|
||||
#else
|
||||
static const uint8_t A0 = (26u);
|
||||
#endif
|
||||
|
||||
#ifdef __PIN_A1
|
||||
static const uint8_t A1 = __PIN_A1;
|
||||
#else
|
||||
static const uint8_t A1 = (27u);
|
||||
#endif
|
||||
|
||||
#ifdef __PIN_A2
|
||||
static const uint8_t A2 = __PIN_A2;
|
||||
#else
|
||||
static const uint8_t A2 = (28u);
|
||||
#endif
|
||||
|
||||
#ifdef __PIN_A3
|
||||
static const uint8_t A3 = __PIN_A3;
|
||||
#else
|
||||
static const uint8_t A3 = (29u);
|
||||
#endif
|
||||
|
||||
static const uint8_t SS = PIN_SPI0_SS;
|
||||
static const uint8_t MOSI = PIN_SPI0_MOSI;
|
||||
static const uint8_t MISO = PIN_SPI0_MISO;
|
||||
static const uint8_t SCK = PIN_SPI0_SCK;
|
||||
|
||||
static const uint8_t SDA = PIN_WIRE0_SDA;
|
||||
static const uint8_t SCL = PIN_WIRE0_SCL;
|
||||
|
||||
Reference in New Issue
Block a user