Add RP2350B generic/Pimoroni PGA2350 support (#2433)
* 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)
This commit is contained in:
parent
20c69bdfbd
commit
76811d3c66
47 changed files with 1032 additions and 254 deletions
608
boards.txt
608
boards.txt
|
|
@ -3,9 +3,10 @@
|
||||||
# run 'python3 makeboards.py > ../boards.txt' to regenerate
|
# run 'python3 makeboards.py > ../boards.txt' to regenerate
|
||||||
|
|
||||||
menu.BoardModel=Model
|
menu.BoardModel=Model
|
||||||
|
menu.variantchip=Chip Variant
|
||||||
menu.flash=Flash Size
|
menu.flash=Flash Size
|
||||||
menu.psram=PSRAM Size
|
|
||||||
menu.psramcs=PSRAM CS
|
menu.psramcs=PSRAM CS
|
||||||
|
menu.psram=PSRAM Size
|
||||||
menu.psramfreq=PSRAM Speed
|
menu.psramfreq=PSRAM Speed
|
||||||
menu.freq=CPU Speed
|
menu.freq=CPU Speed
|
||||||
menu.opt=Optimize
|
menu.opt=Optimize
|
||||||
|
|
@ -18335,6 +18336,333 @@ pimoroni_pga2040.menu.uploadmethod.picoprobe_cmsis_dap.upload.maximum_data_size=
|
||||||
pimoroni_pga2040.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap
|
pimoroni_pga2040.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap
|
||||||
pimoroni_pga2040.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap
|
pimoroni_pga2040.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap
|
||||||
|
|
||||||
|
# -----------------------------------
|
||||||
|
# Pimoroni PGA2350
|
||||||
|
# -----------------------------------
|
||||||
|
pimoroni_pga2350.name=Pimoroni PGA2350
|
||||||
|
pimoroni_pga2350.vid.0=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.0=0x1018
|
||||||
|
pimoroni_pga2350.vid.1=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.1=0x1118
|
||||||
|
pimoroni_pga2350.vid.2=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.2=0x5018
|
||||||
|
pimoroni_pga2350.vid.3=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.3=0x5118
|
||||||
|
pimoroni_pga2350.vid.4=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.4=0x9018
|
||||||
|
pimoroni_pga2350.vid.5=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.5=0x9118
|
||||||
|
pimoroni_pga2350.vid.6=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.6=0xd018
|
||||||
|
pimoroni_pga2350.vid.7=0x2e8a
|
||||||
|
pimoroni_pga2350.pid.7=0xd118
|
||||||
|
pimoroni_pga2350.upload_port.0.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.0.pid=0x1018
|
||||||
|
pimoroni_pga2350.upload_port.1.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.1.pid=0x1118
|
||||||
|
pimoroni_pga2350.upload_port.2.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.2.pid=0x5018
|
||||||
|
pimoroni_pga2350.upload_port.3.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.3.pid=0x5118
|
||||||
|
pimoroni_pga2350.upload_port.4.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.4.pid=0x9018
|
||||||
|
pimoroni_pga2350.upload_port.5.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.5.pid=0x9118
|
||||||
|
pimoroni_pga2350.upload_port.6.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.6.pid=0xd018
|
||||||
|
pimoroni_pga2350.upload_port.7.vid=0x2e8a
|
||||||
|
pimoroni_pga2350.upload_port.7.pid=0xd118
|
||||||
|
pimoroni_pga2350.build.usbvid=-DUSBD_VID=0x2e8a
|
||||||
|
pimoroni_pga2350.build.usbpid=-DUSBD_PID=0x1018
|
||||||
|
pimoroni_pga2350.build.usbpwr=-DUSBD_MAX_POWER_MA=250
|
||||||
|
pimoroni_pga2350.build.board=PIMORONI_PGA2350
|
||||||
|
pimoroni_pga2350.build.chip=rp2350
|
||||||
|
pimoroni_pga2350.build.toolchain=arm-none-eabi
|
||||||
|
pimoroni_pga2350.build.toolchainopts=-mcpu=cortex-m33 -mthumb -march=armv8-m.main+fp+dsp -mfloat-abi=softfp -mcmse
|
||||||
|
pimoroni_pga2350.build.uf2family=--family rp2350-arm-s --abs-block
|
||||||
|
pimoroni_pga2350.build.variant=pimoroni_pga2350
|
||||||
|
pimoroni_pga2350.upload.maximum_size=16777216
|
||||||
|
pimoroni_pga2350.upload.wait_for_upload_port=true
|
||||||
|
pimoroni_pga2350.upload.erase_cmd=
|
||||||
|
pimoroni_pga2350.serial.disableDTR=false
|
||||||
|
pimoroni_pga2350.serial.disableRTS=false
|
||||||
|
pimoroni_pga2350.build.f_cpu=125000000
|
||||||
|
pimoroni_pga2350.build.led=
|
||||||
|
pimoroni_pga2350.build.core=rp2040
|
||||||
|
pimoroni_pga2350.build.ldscript=memmap_default.ld
|
||||||
|
pimoroni_pga2350.build.boot2=boot2_w25q080_4_padded_checksum
|
||||||
|
pimoroni_pga2350.build.usb_manufacturer="Pimoroni"
|
||||||
|
pimoroni_pga2350.build.usb_product="PGA2350"
|
||||||
|
pimoroni_pga2350.build.psram_length=0x800000
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0=16MB (no FS)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0.upload.maximum_size=16769024
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0.build.flash_length=16769024
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0.build.fs_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_0.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536=16MB (Sketch: 16320KB, FS: 64KB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536.upload.maximum_size=16703488
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536.build.flash_length=16703488
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536.build.fs_start=285138944
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_65536.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072=16MB (Sketch: 16256KB, FS: 128KB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072.upload.maximum_size=16637952
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072.build.flash_length=16637952
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072.build.fs_start=285073408
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_131072.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144=16MB (Sketch: 16128KB, FS: 256KB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144.upload.maximum_size=16506880
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144.build.flash_length=16506880
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144.build.fs_start=284942336
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_262144.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288=16MB (Sketch: 15872KB, FS: 512KB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288.upload.maximum_size=16244736
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288.build.flash_length=16244736
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288.build.fs_start=284680192
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_524288.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576=16MB (Sketch: 15MB, FS: 1MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576.upload.maximum_size=15720448
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576.build.flash_length=15720448
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576.build.fs_start=284155904
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_1048576.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152=16MB (Sketch: 14MB, FS: 2MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152.upload.maximum_size=14671872
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152.build.flash_length=14671872
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152.build.fs_start=283107328
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_2097152.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728=16MB (Sketch: 13MB, FS: 3MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728.upload.maximum_size=13623296
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728.build.flash_length=13623296
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728.build.fs_start=282058752
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_3145728.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304=16MB (Sketch: 12MB, FS: 4MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304.upload.maximum_size=12574720
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304.build.flash_length=12574720
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304.build.fs_start=281010176
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_4194304.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880=16MB (Sketch: 11MB, FS: 5MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880.upload.maximum_size=11526144
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880.build.flash_length=11526144
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880.build.fs_start=279961600
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_5242880.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456=16MB (Sketch: 10MB, FS: 6MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456.upload.maximum_size=10477568
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456.build.flash_length=10477568
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456.build.fs_start=278913024
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_6291456.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032=16MB (Sketch: 9MB, FS: 7MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032.upload.maximum_size=9428992
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032.build.flash_length=9428992
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032.build.fs_start=277864448
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_7340032.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608=16MB (Sketch: 8MB, FS: 8MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608.upload.maximum_size=8380416
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608.build.flash_length=8380416
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608.build.fs_start=276815872
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_8388608.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184=16MB (Sketch: 7MB, FS: 9MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184.upload.maximum_size=7331840
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184.build.flash_length=7331840
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184.build.fs_start=275767296
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_9437184.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760=16MB (Sketch: 6MB, FS: 10MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760.upload.maximum_size=6283264
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760.build.flash_length=6283264
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760.build.fs_start=274718720
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_10485760.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336=16MB (Sketch: 5MB, FS: 11MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336.upload.maximum_size=5234688
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336.build.flash_length=5234688
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336.build.fs_start=273670144
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_11534336.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912=16MB (Sketch: 4MB, FS: 12MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912.upload.maximum_size=4186112
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912.build.flash_length=4186112
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912.build.fs_start=272621568
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_12582912.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488=16MB (Sketch: 3MB, FS: 13MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488.upload.maximum_size=3137536
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488.build.flash_length=3137536
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488.build.fs_start=271572992
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_13631488.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064=16MB (Sketch: 2MB, FS: 14MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064.upload.maximum_size=2088960
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064.build.flash_length=2088960
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064.build.fs_start=270524416
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_14680064.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640=16MB (Sketch: 1MB, FS: 15MB)
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640.upload.maximum_size=1040384
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640.build.flash_total=16777216
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640.build.flash_length=1040384
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640.build.eeprom_start=285204480
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640.build.fs_start=269475840
|
||||||
|
pimoroni_pga2350.menu.flash.16777216_15728640.build.fs_end=285204480
|
||||||
|
pimoroni_pga2350.menu.freq.150=150 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.150.build.f_cpu=150000000L
|
||||||
|
pimoroni_pga2350.menu.freq.50=50 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.50.build.f_cpu=50000000L
|
||||||
|
pimoroni_pga2350.menu.freq.100=100 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.100.build.f_cpu=100000000L
|
||||||
|
pimoroni_pga2350.menu.freq.120=120 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.120.build.f_cpu=120000000L
|
||||||
|
pimoroni_pga2350.menu.freq.125=125 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.125.build.f_cpu=125000000L
|
||||||
|
pimoroni_pga2350.menu.freq.128=128 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.128.build.f_cpu=128000000L
|
||||||
|
pimoroni_pga2350.menu.freq.133=133 MHz
|
||||||
|
pimoroni_pga2350.menu.freq.133.build.f_cpu=133000000L
|
||||||
|
pimoroni_pga2350.menu.freq.175=175 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.175.build.f_cpu=175000000L
|
||||||
|
pimoroni_pga2350.menu.freq.200=200 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.200.build.f_cpu=200000000L
|
||||||
|
pimoroni_pga2350.menu.freq.225=225 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.225.build.f_cpu=225000000L
|
||||||
|
pimoroni_pga2350.menu.freq.240=240 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.240.build.f_cpu=240000000L
|
||||||
|
pimoroni_pga2350.menu.freq.250=250 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.250.build.f_cpu=250000000L
|
||||||
|
pimoroni_pga2350.menu.freq.275=275 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.275.build.f_cpu=275000000L
|
||||||
|
pimoroni_pga2350.menu.freq.300=300 MHz (Overclock)
|
||||||
|
pimoroni_pga2350.menu.freq.300.build.f_cpu=300000000L
|
||||||
|
pimoroni_pga2350.menu.opt.Small=Small (-Os) (standard)
|
||||||
|
pimoroni_pga2350.menu.opt.Small.build.flags.optimize=-Os
|
||||||
|
pimoroni_pga2350.menu.opt.Optimize=Optimize (-O)
|
||||||
|
pimoroni_pga2350.menu.opt.Optimize.build.flags.optimize=-O
|
||||||
|
pimoroni_pga2350.menu.opt.Optimize2=Optimize More (-O2)
|
||||||
|
pimoroni_pga2350.menu.opt.Optimize2.build.flags.optimize=-O2
|
||||||
|
pimoroni_pga2350.menu.opt.Optimize3=Optimize Even More (-O3)
|
||||||
|
pimoroni_pga2350.menu.opt.Optimize3.build.flags.optimize=-O3
|
||||||
|
pimoroni_pga2350.menu.opt.Fast=Fast (-Ofast) (maybe slower)
|
||||||
|
pimoroni_pga2350.menu.opt.Fast.build.flags.optimize=-Ofast
|
||||||
|
pimoroni_pga2350.menu.opt.Debug=Debug (-Og)
|
||||||
|
pimoroni_pga2350.menu.opt.Debug.build.flags.optimize=-Og
|
||||||
|
pimoroni_pga2350.menu.rtti.Disabled=Disabled
|
||||||
|
pimoroni_pga2350.menu.rtti.Disabled.build.flags.rtti=-fno-rtti
|
||||||
|
pimoroni_pga2350.menu.rtti.Enabled=Enabled
|
||||||
|
pimoroni_pga2350.menu.rtti.Enabled.build.flags.rtti=
|
||||||
|
pimoroni_pga2350.menu.stackprotect.Disabled=Disabled
|
||||||
|
pimoroni_pga2350.menu.stackprotect.Disabled.build.flags.stackprotect=
|
||||||
|
pimoroni_pga2350.menu.stackprotect.Enabled=Enabled
|
||||||
|
pimoroni_pga2350.menu.stackprotect.Enabled.build.flags.stackprotect=-fstack-protector
|
||||||
|
pimoroni_pga2350.menu.exceptions.Disabled=Disabled
|
||||||
|
pimoroni_pga2350.menu.exceptions.Disabled.build.flags.exceptions=-fno-exceptions
|
||||||
|
pimoroni_pga2350.menu.exceptions.Disabled.build.flags.libstdcpp=-lstdc++
|
||||||
|
pimoroni_pga2350.menu.exceptions.Enabled=Enabled
|
||||||
|
pimoroni_pga2350.menu.exceptions.Enabled.build.flags.exceptions=-fexceptions
|
||||||
|
pimoroni_pga2350.menu.exceptions.Enabled.build.flags.libstdcpp=-lstdc++-exc
|
||||||
|
pimoroni_pga2350.menu.dbgport.Disabled=Disabled
|
||||||
|
pimoroni_pga2350.menu.dbgport.Disabled.build.debug_port=
|
||||||
|
pimoroni_pga2350.menu.dbgport.Serial=Serial
|
||||||
|
pimoroni_pga2350.menu.dbgport.Serial.build.debug_port=-DDEBUG_RP2040_PORT=Serial
|
||||||
|
pimoroni_pga2350.menu.dbgport.Serial1=Serial1
|
||||||
|
pimoroni_pga2350.menu.dbgport.Serial1.build.debug_port=-DDEBUG_RP2040_PORT=Serial1
|
||||||
|
pimoroni_pga2350.menu.dbgport.Serial2=Serial2
|
||||||
|
pimoroni_pga2350.menu.dbgport.Serial2.build.debug_port=-DDEBUG_RP2040_PORT=Serial2
|
||||||
|
pimoroni_pga2350.menu.dbglvl.None=None
|
||||||
|
pimoroni_pga2350.menu.dbglvl.None.build.debug_level=
|
||||||
|
pimoroni_pga2350.menu.dbglvl.Core=Core
|
||||||
|
pimoroni_pga2350.menu.dbglvl.Core.build.debug_level=-DDEBUG_RP2040_CORE
|
||||||
|
pimoroni_pga2350.menu.dbglvl.SPI=SPI
|
||||||
|
pimoroni_pga2350.menu.dbglvl.SPI.build.debug_level=-DDEBUG_RP2040_SPI
|
||||||
|
pimoroni_pga2350.menu.dbglvl.Wire=Wire
|
||||||
|
pimoroni_pga2350.menu.dbglvl.Wire.build.debug_level=-DDEBUG_RP2040_WIRE
|
||||||
|
pimoroni_pga2350.menu.dbglvl.Bluetooth=Bluetooth
|
||||||
|
pimoroni_pga2350.menu.dbglvl.Bluetooth.build.debug_level=-DDEBUG_RP2040_BLUETOOTH
|
||||||
|
pimoroni_pga2350.menu.dbglvl.All=All
|
||||||
|
pimoroni_pga2350.menu.dbglvl.All.build.debug_level=-DDEBUG_RP2040_WIRE -DDEBUG_RP2040_SPI -DDEBUG_RP2040_CORE -DDEBUG_RP2040_BLUETOOTH
|
||||||
|
pimoroni_pga2350.menu.dbglvl.NDEBUG=NDEBUG
|
||||||
|
pimoroni_pga2350.menu.dbglvl.NDEBUG.build.debug_level=-DNDEBUG
|
||||||
|
pimoroni_pga2350.menu.usbstack.picosdk=Pico SDK
|
||||||
|
pimoroni_pga2350.menu.usbstack.picosdk.build.usbstack_flags=
|
||||||
|
pimoroni_pga2350.menu.usbstack.tinyusb=Adafruit TinyUSB
|
||||||
|
pimoroni_pga2350.menu.usbstack.tinyusb.build.usbstack_flags=-DUSE_TINYUSB "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||||
|
pimoroni_pga2350.menu.usbstack.tinyusb_host=Adafruit TinyUSB Host (native)
|
||||||
|
pimoroni_pga2350.menu.usbstack.tinyusb_host.build.usbstack_flags=-DUSE_TINYUSB -DUSE_TINYUSB_HOST "-I{runtime.platform.path}/libraries/Adafruit_TinyUSB_Arduino/src/arduino"
|
||||||
|
pimoroni_pga2350.menu.usbstack.nousb=No USB
|
||||||
|
pimoroni_pga2350.menu.usbstack.nousb.build.usbstack_flags="-DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico"
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4only=IPv4 Only
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4only.build.libpicow=libipv4.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4only.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6=IPv4 + IPv6
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6.build.libpicow=libipv4-ipv6.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4btcble=IPv4 + Bluetooth
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4btcble.build.libpicow=libipv4-bt.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4btcble.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6btcble=IPv4 + IPv6 + Bluetooth
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6btcble.build.libpicow=libipv4-ipv6-bt.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6btcble.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4onlybig=IPv4 Only - 32K
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4onlybig.build.libpicow=libipv4-big.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4onlybig.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -D__LWIP_MEMMULT=2
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6big=IPv4 + IPv6 - 32K
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6big.build.libpicow=libipv4-ipv6-big.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6big.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -D__LWIP_MEMMULT=2
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4btcblebig=IPv4 + Bluetooth - 32K
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4btcblebig.build.libpicow=libipv4-bt-big.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4btcblebig.build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 -D__LWIP_MEMMULT=2
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6btcblebig=IPv4 + IPv6 + Bluetooth - 32K
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6btcblebig.build.libpicow=libipv4-ipv6-bt-big.a
|
||||||
|
pimoroni_pga2350.menu.ipbtstack.ipv4ipv6btcblebig.build.libpicowdefs=-DLWIP_IPV6=1 -DLWIP_IPV4=1 -DENABLE_CLASSIC=1 -DENABLE_BLE=1 -D__LWIP_MEMMULT=2
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default=Default (UF2)
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default.build.ram_length=512k
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default.build.debugscript=picoprobe_cmsis_dap.tcl
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default.upload.maximum_data_size=524288
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default.upload.tool=uf2conv
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default.upload.tool.default=uf2conv
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.default.upload.tool.network=uf2conv-network
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool=Picotool
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool.build.ram_length=512k
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool.build.debugscript=picoprobe.tcl
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool.build.picodebugflags=-DENABLE_PICOTOOL_USB
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool.upload.maximum_data_size=524288
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool.upload.tool=picotool
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picotool.upload.tool.default=picotool
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picoprobe_cmsis_dap=Picoprobe/Debugprobe (CMSIS-DAP)
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picoprobe_cmsis_dap.build.ram_length=512k
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picoprobe_cmsis_dap.build.debugscript=picoprobe_cmsis_dap.tcl
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picoprobe_cmsis_dap.upload.maximum_data_size=524288
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool=picoprobe_cmsis_dap
|
||||||
|
pimoroni_pga2350.menu.uploadmethod.picoprobe_cmsis_dap.upload.tool.default=picoprobe_cmsis_dap
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Pimoroni PicoPlus2
|
# Pimoroni PicoPlus2
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
|
|
@ -27369,6 +27697,69 @@ generic_rp2350.build.ldscript=memmap_default.ld
|
||||||
generic_rp2350.build.boot2=boot2_generic_03h_4_padded_checksum
|
generic_rp2350.build.boot2=boot2_generic_03h_4_padded_checksum
|
||||||
generic_rp2350.build.usb_manufacturer="Generic"
|
generic_rp2350.build.usb_manufacturer="Generic"
|
||||||
generic_rp2350.build.usb_product="RP2350"
|
generic_rp2350.build.usb_product="RP2350"
|
||||||
|
generic_rp2350.menu.flash.2097152_0=2MB (no FS)
|
||||||
|
generic_rp2350.menu.flash.2097152_0.upload.maximum_size=2088960
|
||||||
|
generic_rp2350.menu.flash.2097152_0.build.flash_total=2097152
|
||||||
|
generic_rp2350.menu.flash.2097152_0.build.flash_length=2088960
|
||||||
|
generic_rp2350.menu.flash.2097152_0.build.eeprom_start=270524416
|
||||||
|
generic_rp2350.menu.flash.2097152_0.build.fs_start=270524416
|
||||||
|
generic_rp2350.menu.flash.2097152_0.build.fs_end=270524416
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576=2MB (Sketch: 1MB, FS: 1MB)
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576.upload.maximum_size=1040384
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576.build.flash_total=2097152
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576.build.flash_length=1040384
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576.build.eeprom_start=270524416
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576.build.fs_start=269475840
|
||||||
|
generic_rp2350.menu.flash.2097152_1048576.build.fs_end=270524416
|
||||||
|
generic_rp2350.menu.flash.4194304_0=4MB (no FS)
|
||||||
|
generic_rp2350.menu.flash.4194304_0.upload.maximum_size=4186112
|
||||||
|
generic_rp2350.menu.flash.4194304_0.build.flash_total=4194304
|
||||||
|
generic_rp2350.menu.flash.4194304_0.build.flash_length=4186112
|
||||||
|
generic_rp2350.menu.flash.4194304_0.build.eeprom_start=272621568
|
||||||
|
generic_rp2350.menu.flash.4194304_0.build.fs_start=272621568
|
||||||
|
generic_rp2350.menu.flash.4194304_0.build.fs_end=272621568
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728=4MB (Sketch: 1MB, FS: 3MB)
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728.upload.maximum_size=1040384
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728.build.flash_total=4194304
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728.build.flash_length=1040384
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728.build.eeprom_start=272621568
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728.build.fs_start=269475840
|
||||||
|
generic_rp2350.menu.flash.4194304_3145728.build.fs_end=272621568
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152=4MB (Sketch: 2MB, FS: 2MB)
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152.upload.maximum_size=2088960
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152.build.flash_total=4194304
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152.build.flash_length=2088960
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152.build.eeprom_start=272621568
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152.build.fs_start=270524416
|
||||||
|
generic_rp2350.menu.flash.4194304_2097152.build.fs_end=272621568
|
||||||
|
generic_rp2350.menu.flash.8388608_0=8MB (no FS)
|
||||||
|
generic_rp2350.menu.flash.8388608_0.upload.maximum_size=8380416
|
||||||
|
generic_rp2350.menu.flash.8388608_0.build.flash_total=8388608
|
||||||
|
generic_rp2350.menu.flash.8388608_0.build.flash_length=8380416
|
||||||
|
generic_rp2350.menu.flash.8388608_0.build.eeprom_start=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_0.build.fs_start=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_0.build.fs_end=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032=8MB (Sketch: 1MB, FS: 7MB)
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032.upload.maximum_size=1040384
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032.build.flash_total=8388608
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032.build.flash_length=1040384
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032.build.eeprom_start=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032.build.fs_start=269475840
|
||||||
|
generic_rp2350.menu.flash.8388608_7340032.build.fs_end=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304=8MB (Sketch: 4MB, FS: 4MB)
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304.upload.maximum_size=4186112
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304.build.flash_total=8388608
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304.build.flash_length=4186112
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304.build.eeprom_start=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304.build.fs_start=272621568
|
||||||
|
generic_rp2350.menu.flash.8388608_4194304.build.fs_end=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152=8MB (Sketch: 6MB, FS: 2MB)
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152.upload.maximum_size=6283264
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152.build.flash_total=8388608
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152.build.flash_length=6283264
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152.build.eeprom_start=276815872
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152.build.fs_start=274718720
|
||||||
|
generic_rp2350.menu.flash.8388608_2097152.build.fs_end=276815872
|
||||||
generic_rp2350.menu.flash.16777216_0=16MB (no FS)
|
generic_rp2350.menu.flash.16777216_0=16MB (no FS)
|
||||||
generic_rp2350.menu.flash.16777216_0.upload.maximum_size=16769024
|
generic_rp2350.menu.flash.16777216_0.upload.maximum_size=16769024
|
||||||
generic_rp2350.menu.flash.16777216_0.build.flash_total=16777216
|
generic_rp2350.menu.flash.16777216_0.build.flash_total=16777216
|
||||||
|
|
@ -27376,132 +27767,6 @@ generic_rp2350.menu.flash.16777216_0.build.flash_length=16769024
|
||||||
generic_rp2350.menu.flash.16777216_0.build.eeprom_start=285204480
|
generic_rp2350.menu.flash.16777216_0.build.eeprom_start=285204480
|
||||||
generic_rp2350.menu.flash.16777216_0.build.fs_start=285204480
|
generic_rp2350.menu.flash.16777216_0.build.fs_start=285204480
|
||||||
generic_rp2350.menu.flash.16777216_0.build.fs_end=285204480
|
generic_rp2350.menu.flash.16777216_0.build.fs_end=285204480
|
||||||
generic_rp2350.menu.flash.16777216_65536=16MB (Sketch: 16320KB, FS: 64KB)
|
|
||||||
generic_rp2350.menu.flash.16777216_65536.upload.maximum_size=16703488
|
|
||||||
generic_rp2350.menu.flash.16777216_65536.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_65536.build.flash_length=16703488
|
|
||||||
generic_rp2350.menu.flash.16777216_65536.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_65536.build.fs_start=285138944
|
|
||||||
generic_rp2350.menu.flash.16777216_65536.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_131072=16MB (Sketch: 16256KB, FS: 128KB)
|
|
||||||
generic_rp2350.menu.flash.16777216_131072.upload.maximum_size=16637952
|
|
||||||
generic_rp2350.menu.flash.16777216_131072.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_131072.build.flash_length=16637952
|
|
||||||
generic_rp2350.menu.flash.16777216_131072.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_131072.build.fs_start=285073408
|
|
||||||
generic_rp2350.menu.flash.16777216_131072.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_262144=16MB (Sketch: 16128KB, FS: 256KB)
|
|
||||||
generic_rp2350.menu.flash.16777216_262144.upload.maximum_size=16506880
|
|
||||||
generic_rp2350.menu.flash.16777216_262144.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_262144.build.flash_length=16506880
|
|
||||||
generic_rp2350.menu.flash.16777216_262144.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_262144.build.fs_start=284942336
|
|
||||||
generic_rp2350.menu.flash.16777216_262144.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_524288=16MB (Sketch: 15872KB, FS: 512KB)
|
|
||||||
generic_rp2350.menu.flash.16777216_524288.upload.maximum_size=16244736
|
|
||||||
generic_rp2350.menu.flash.16777216_524288.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_524288.build.flash_length=16244736
|
|
||||||
generic_rp2350.menu.flash.16777216_524288.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_524288.build.fs_start=284680192
|
|
||||||
generic_rp2350.menu.flash.16777216_524288.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576=16MB (Sketch: 15MB, FS: 1MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576.upload.maximum_size=15720448
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576.build.flash_length=15720448
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576.build.fs_start=284155904
|
|
||||||
generic_rp2350.menu.flash.16777216_1048576.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152=16MB (Sketch: 14MB, FS: 2MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152.upload.maximum_size=14671872
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152.build.flash_length=14671872
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152.build.fs_start=283107328
|
|
||||||
generic_rp2350.menu.flash.16777216_2097152.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728=16MB (Sketch: 13MB, FS: 3MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728.upload.maximum_size=13623296
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728.build.flash_length=13623296
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728.build.fs_start=282058752
|
|
||||||
generic_rp2350.menu.flash.16777216_3145728.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304=16MB (Sketch: 12MB, FS: 4MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304.upload.maximum_size=12574720
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304.build.flash_length=12574720
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304.build.fs_start=281010176
|
|
||||||
generic_rp2350.menu.flash.16777216_4194304.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880=16MB (Sketch: 11MB, FS: 5MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880.upload.maximum_size=11526144
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880.build.flash_length=11526144
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880.build.fs_start=279961600
|
|
||||||
generic_rp2350.menu.flash.16777216_5242880.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456=16MB (Sketch: 10MB, FS: 6MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456.upload.maximum_size=10477568
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456.build.flash_length=10477568
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456.build.fs_start=278913024
|
|
||||||
generic_rp2350.menu.flash.16777216_6291456.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032=16MB (Sketch: 9MB, FS: 7MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032.upload.maximum_size=9428992
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032.build.flash_length=9428992
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032.build.fs_start=277864448
|
|
||||||
generic_rp2350.menu.flash.16777216_7340032.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608=16MB (Sketch: 8MB, FS: 8MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608.upload.maximum_size=8380416
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608.build.flash_length=8380416
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608.build.fs_start=276815872
|
|
||||||
generic_rp2350.menu.flash.16777216_8388608.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184=16MB (Sketch: 7MB, FS: 9MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184.upload.maximum_size=7331840
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184.build.flash_length=7331840
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184.build.fs_start=275767296
|
|
||||||
generic_rp2350.menu.flash.16777216_9437184.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760=16MB (Sketch: 6MB, FS: 10MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760.upload.maximum_size=6283264
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760.build.flash_length=6283264
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760.build.fs_start=274718720
|
|
||||||
generic_rp2350.menu.flash.16777216_10485760.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336=16MB (Sketch: 5MB, FS: 11MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336.upload.maximum_size=5234688
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336.build.flash_length=5234688
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336.build.fs_start=273670144
|
|
||||||
generic_rp2350.menu.flash.16777216_11534336.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912=16MB (Sketch: 4MB, FS: 12MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912.upload.maximum_size=4186112
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912.build.flash_length=4186112
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912.build.fs_start=272621568
|
|
||||||
generic_rp2350.menu.flash.16777216_12582912.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488=16MB (Sketch: 3MB, FS: 13MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488.upload.maximum_size=3137536
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488.build.flash_length=3137536
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488.build.fs_start=271572992
|
|
||||||
generic_rp2350.menu.flash.16777216_13631488.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064=16MB (Sketch: 2MB, FS: 14MB)
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064.upload.maximum_size=2088960
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064.build.flash_total=16777216
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064.build.flash_length=2088960
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064.build.eeprom_start=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064.build.fs_start=270524416
|
|
||||||
generic_rp2350.menu.flash.16777216_14680064.build.fs_end=285204480
|
|
||||||
generic_rp2350.menu.flash.16777216_15728640=16MB (Sketch: 1MB, FS: 15MB)
|
generic_rp2350.menu.flash.16777216_15728640=16MB (Sketch: 1MB, FS: 15MB)
|
||||||
generic_rp2350.menu.flash.16777216_15728640.upload.maximum_size=1040384
|
generic_rp2350.menu.flash.16777216_15728640.upload.maximum_size=1040384
|
||||||
generic_rp2350.menu.flash.16777216_15728640.build.flash_total=16777216
|
generic_rp2350.menu.flash.16777216_15728640.build.flash_total=16777216
|
||||||
|
|
@ -27509,6 +27774,41 @@ generic_rp2350.menu.flash.16777216_15728640.build.flash_length=1040384
|
||||||
generic_rp2350.menu.flash.16777216_15728640.build.eeprom_start=285204480
|
generic_rp2350.menu.flash.16777216_15728640.build.eeprom_start=285204480
|
||||||
generic_rp2350.menu.flash.16777216_15728640.build.fs_start=269475840
|
generic_rp2350.menu.flash.16777216_15728640.build.fs_start=269475840
|
||||||
generic_rp2350.menu.flash.16777216_15728640.build.fs_end=285204480
|
generic_rp2350.menu.flash.16777216_15728640.build.fs_end=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064=16MB (Sketch: 2MB, FS: 14MB)
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064.upload.maximum_size=2088960
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064.build.flash_total=16777216
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064.build.flash_length=2088960
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064.build.eeprom_start=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064.build.fs_start=270524416
|
||||||
|
generic_rp2350.menu.flash.16777216_14680064.build.fs_end=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912=16MB (Sketch: 4MB, FS: 12MB)
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912.upload.maximum_size=4186112
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912.build.flash_total=16777216
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912.build.flash_length=4186112
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912.build.eeprom_start=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912.build.fs_start=272621568
|
||||||
|
generic_rp2350.menu.flash.16777216_12582912.build.fs_end=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608=16MB (Sketch: 8MB, FS: 8MB)
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608.upload.maximum_size=8380416
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608.build.flash_total=16777216
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608.build.flash_length=8380416
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608.build.eeprom_start=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608.build.fs_start=276815872
|
||||||
|
generic_rp2350.menu.flash.16777216_8388608.build.fs_end=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304=16MB (Sketch: 12MB, FS: 4MB)
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304.upload.maximum_size=12574720
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304.build.flash_total=16777216
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304.build.flash_length=12574720
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304.build.eeprom_start=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304.build.fs_start=281010176
|
||||||
|
generic_rp2350.menu.flash.16777216_4194304.build.fs_end=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152=16MB (Sketch: 14MB, FS: 2MB)
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152.upload.maximum_size=14671872
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152.build.flash_total=16777216
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152.build.flash_length=14671872
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152.build.eeprom_start=285204480
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152.build.fs_start=283107328
|
||||||
|
generic_rp2350.menu.flash.16777216_2097152.build.fs_end=285204480
|
||||||
generic_rp2350.menu.freq.150=150 MHz
|
generic_rp2350.menu.freq.150=150 MHz
|
||||||
generic_rp2350.menu.freq.150.build.f_cpu=150000000L
|
generic_rp2350.menu.freq.150.build.f_cpu=150000000L
|
||||||
generic_rp2350.menu.freq.50=50 MHz
|
generic_rp2350.menu.freq.50=50 MHz
|
||||||
|
|
@ -27537,14 +27837,12 @@ generic_rp2350.menu.freq.275=275 MHz (Overclock)
|
||||||
generic_rp2350.menu.freq.275.build.f_cpu=275000000L
|
generic_rp2350.menu.freq.275.build.f_cpu=275000000L
|
||||||
generic_rp2350.menu.freq.300=300 MHz (Overclock)
|
generic_rp2350.menu.freq.300=300 MHz (Overclock)
|
||||||
generic_rp2350.menu.freq.300.build.f_cpu=300000000L
|
generic_rp2350.menu.freq.300.build.f_cpu=300000000L
|
||||||
generic_rp2350.menu.psram.0mb=0MByte PSRAM
|
generic_rp2350.menu.variantchip.RP2350A=RP2350A
|
||||||
generic_rp2350.menu.psram.0mb.build.psram_length=0x000000
|
generic_rp2350.menu.variantchip.RP2350A.build.variantdefines=-DPICO_RP2350A=1
|
||||||
generic_rp2350.menu.psram.2mb=2MByte PSRAM
|
generic_rp2350.menu.variantchip.RP2530B=RP2530B
|
||||||
generic_rp2350.menu.psram.2mb.build.psram_length=0x200000
|
generic_rp2350.menu.variantchip.RP2530B.build.variantdefines=-DPICO_RP2350B=1
|
||||||
generic_rp2350.menu.psram.4mb=4MByte PSRAM
|
generic_rp2350.menu.psramcs.GPIOnone=None
|
||||||
generic_rp2350.menu.psram.4mb.build.psram_length=0x400000
|
generic_rp2350.menu.psramcs.GPIOnone.build.psram_cs=
|
||||||
generic_rp2350.menu.psram.8mb=8MByte PSRAM
|
|
||||||
generic_rp2350.menu.psram.8mb.build.psram_length=0x800000
|
|
||||||
generic_rp2350.menu.psramcs.GPIO0=GPIO 0
|
generic_rp2350.menu.psramcs.GPIO0=GPIO 0
|
||||||
generic_rp2350.menu.psramcs.GPIO0.build.psram_cs=-DRP2350_PSRAM_CS=0
|
generic_rp2350.menu.psramcs.GPIO0.build.psram_cs=-DRP2350_PSRAM_CS=0
|
||||||
generic_rp2350.menu.psramcs.GPIO1=GPIO 1
|
generic_rp2350.menu.psramcs.GPIO1=GPIO 1
|
||||||
|
|
@ -27609,6 +27907,46 @@ generic_rp2350.menu.psramcs.GPIO30=GPIO 30
|
||||||
generic_rp2350.menu.psramcs.GPIO30.build.psram_cs=-DRP2350_PSRAM_CS=30
|
generic_rp2350.menu.psramcs.GPIO30.build.psram_cs=-DRP2350_PSRAM_CS=30
|
||||||
generic_rp2350.menu.psramcs.GPIO31=GPIO 31
|
generic_rp2350.menu.psramcs.GPIO31=GPIO 31
|
||||||
generic_rp2350.menu.psramcs.GPIO31.build.psram_cs=-DRP2350_PSRAM_CS=31
|
generic_rp2350.menu.psramcs.GPIO31.build.psram_cs=-DRP2350_PSRAM_CS=31
|
||||||
|
generic_rp2350.menu.psramcs.GPIO32=GPIO 32
|
||||||
|
generic_rp2350.menu.psramcs.GPIO32.build.psram_cs=-DRP2350_PSRAM_CS=32
|
||||||
|
generic_rp2350.menu.psramcs.GPIO33=GPIO 33
|
||||||
|
generic_rp2350.menu.psramcs.GPIO33.build.psram_cs=-DRP2350_PSRAM_CS=33
|
||||||
|
generic_rp2350.menu.psramcs.GPIO34=GPIO 34
|
||||||
|
generic_rp2350.menu.psramcs.GPIO34.build.psram_cs=-DRP2350_PSRAM_CS=34
|
||||||
|
generic_rp2350.menu.psramcs.GPIO35=GPIO 35
|
||||||
|
generic_rp2350.menu.psramcs.GPIO35.build.psram_cs=-DRP2350_PSRAM_CS=35
|
||||||
|
generic_rp2350.menu.psramcs.GPIO36=GPIO 36
|
||||||
|
generic_rp2350.menu.psramcs.GPIO36.build.psram_cs=-DRP2350_PSRAM_CS=36
|
||||||
|
generic_rp2350.menu.psramcs.GPIO37=GPIO 37
|
||||||
|
generic_rp2350.menu.psramcs.GPIO37.build.psram_cs=-DRP2350_PSRAM_CS=37
|
||||||
|
generic_rp2350.menu.psramcs.GPIO38=GPIO 38
|
||||||
|
generic_rp2350.menu.psramcs.GPIO38.build.psram_cs=-DRP2350_PSRAM_CS=38
|
||||||
|
generic_rp2350.menu.psramcs.GPIO39=GPIO 39
|
||||||
|
generic_rp2350.menu.psramcs.GPIO39.build.psram_cs=-DRP2350_PSRAM_CS=39
|
||||||
|
generic_rp2350.menu.psramcs.GPIO40=GPIO 40
|
||||||
|
generic_rp2350.menu.psramcs.GPIO40.build.psram_cs=-DRP2350_PSRAM_CS=40
|
||||||
|
generic_rp2350.menu.psramcs.GPIO41=GPIO 41
|
||||||
|
generic_rp2350.menu.psramcs.GPIO41.build.psram_cs=-DRP2350_PSRAM_CS=41
|
||||||
|
generic_rp2350.menu.psramcs.GPIO42=GPIO 42
|
||||||
|
generic_rp2350.menu.psramcs.GPIO42.build.psram_cs=-DRP2350_PSRAM_CS=42
|
||||||
|
generic_rp2350.menu.psramcs.GPIO43=GPIO 43
|
||||||
|
generic_rp2350.menu.psramcs.GPIO43.build.psram_cs=-DRP2350_PSRAM_CS=43
|
||||||
|
generic_rp2350.menu.psramcs.GPIO44=GPIO 44
|
||||||
|
generic_rp2350.menu.psramcs.GPIO44.build.psram_cs=-DRP2350_PSRAM_CS=44
|
||||||
|
generic_rp2350.menu.psramcs.GPIO45=GPIO 45
|
||||||
|
generic_rp2350.menu.psramcs.GPIO45.build.psram_cs=-DRP2350_PSRAM_CS=45
|
||||||
|
generic_rp2350.menu.psramcs.GPIO46=GPIO 46
|
||||||
|
generic_rp2350.menu.psramcs.GPIO46.build.psram_cs=-DRP2350_PSRAM_CS=46
|
||||||
|
generic_rp2350.menu.psramcs.GPIO47=GPIO 47
|
||||||
|
generic_rp2350.menu.psramcs.GPIO47.build.psram_cs=-DRP2350_PSRAM_CS=47
|
||||||
|
generic_rp2350.menu.psram.0mb=0MByte PSRAM
|
||||||
|
generic_rp2350.menu.psram.0mb.build.psram_length=0x000000
|
||||||
|
generic_rp2350.menu.psram.2mb=2MByte PSRAM
|
||||||
|
generic_rp2350.menu.psram.2mb.build.psram_length=0x200000
|
||||||
|
generic_rp2350.menu.psram.4mb=4MByte PSRAM
|
||||||
|
generic_rp2350.menu.psram.4mb.build.psram_length=0x400000
|
||||||
|
generic_rp2350.menu.psram.8mb=8MByte PSRAM
|
||||||
|
generic_rp2350.menu.psram.8mb.build.psram_length=0x800000
|
||||||
generic_rp2350.menu.psramfreq.freq109=109 MHz
|
generic_rp2350.menu.psramfreq.freq109=109 MHz
|
||||||
generic_rp2350.menu.psramfreq.freq109.build.psram_freq=-DRP2350_PSRAM_MAX_SCK_HZ=109000000
|
generic_rp2350.menu.psramfreq.freq109.build.psram_freq=-DRP2350_PSRAM_MAX_SCK_HZ=109000000
|
||||||
generic_rp2350.menu.psramfreq.freq133=133 MHz
|
generic_rp2350.menu.psramfreq.freq133=133 MHz
|
||||||
|
|
|
||||||
|
|
@ -133,8 +133,8 @@ extern const String emptyString;
|
||||||
// Template which will evaluate at *compile time* to a single 32b number
|
// Template which will evaluate at *compile time* to a single 32b number
|
||||||
// with the specified bits set.
|
// with the specified bits set.
|
||||||
template <size_t N>
|
template <size_t N>
|
||||||
constexpr uint32_t __bitset(const int (&a)[N], size_t i = 0U) {
|
constexpr uint64_t __bitset(const int (&a)[N], size_t i = 0U) {
|
||||||
return i < N ? (1L << a[i]) | __bitset(a, i + 1) : 0;
|
return i < N ? (1LL << a[i]) | __bitset(a, i + 1) : 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -149,3 +149,12 @@ constexpr uint32_t __bitset(const int (&a)[N], size_t i = 0U) {
|
||||||
|
|
||||||
// PSRAM decorator
|
// PSRAM decorator
|
||||||
#define PSRAM __attribute__((section("\".psram\"")))
|
#define PSRAM __attribute__((section("\".psram\"")))
|
||||||
|
|
||||||
|
// General GPIO/ADC layout info
|
||||||
|
#ifdef PICO_RP2350B
|
||||||
|
#define __GPIOCNT 48
|
||||||
|
#define __FIRSTANALOGGPIO 40
|
||||||
|
#else
|
||||||
|
#define __GPIOCNT 30
|
||||||
|
#define __FIRSTANALOGGPIO 26
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "PIOProgram.h"
|
#include "PIOProgram.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <hardware/claim.h>
|
||||||
|
|
||||||
#if defined(PICO_RP2350)
|
#if defined(PICO_RP2350)
|
||||||
#define PIOS pio0, pio1, pio2
|
#define PIOS pio0, pio1, pio2
|
||||||
|
|
@ -31,6 +32,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static std::map<const pio_program_t *, int> __pioMap[PIOCNT];
|
static std::map<const pio_program_t *, int> __pioMap[PIOCNT];
|
||||||
|
static bool __pioAllocated[PIOCNT];
|
||||||
|
static bool __pioHighGPIO[PIOCNT];
|
||||||
auto_init_mutex(_pioMutex);
|
auto_init_mutex(_pioMutex);
|
||||||
|
|
||||||
PIOProgram::PIOProgram(const pio_program_t *pgm) {
|
PIOProgram::PIOProgram(const pio_program_t *pgm) {
|
||||||
|
|
@ -47,16 +50,30 @@ PIOProgram::~PIOProgram() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possibly load into a PIO and allocate a SM
|
// Possibly load into a PIO and allocate a SM
|
||||||
bool PIOProgram::prepare(PIO *pio, int *sm, int *offset) {
|
bool PIOProgram::prepare(PIO *pio, int *sm, int *offset, int start, int cnt) {
|
||||||
CoreMutex m(&_pioMutex);
|
CoreMutex m(&_pioMutex);
|
||||||
PIO pi[PIOCNT] = { PIOS };
|
PIO pi[PIOCNT] = { PIOS };
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
uint usm;
|
||||||
|
uint uoff;
|
||||||
|
auto ret = pio_claim_free_sm_and_add_program_for_gpio_range(_pgm, pio, &usm, &uoff, start, cnt, true);
|
||||||
|
*sm = usm;
|
||||||
|
*offset = uoff;
|
||||||
|
DEBUGV("clain %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool needsHigh = (start + cnt) >= 32;
|
||||||
|
DEBUGV("PIOProgram %p: Searching for high=%d, pins %d-%d\n", _pgm, needsHigh ? 1 : 0, start, start + cnt - 1);
|
||||||
|
|
||||||
// If it's already loaded into PIO IRAM, try and allocate in that specific PIO
|
// If it's already loaded into PIO IRAM, try and allocate in that specific PIO
|
||||||
for (int o = 0; o < PIOCNT; o++) {
|
for (int o = 0; o < PIOCNT; o++) {
|
||||||
auto p = __pioMap[o].find(_pgm);
|
auto p = __pioMap[o].find(_pgm);
|
||||||
if (p != __pioMap[o].end()) {
|
if ((p != __pioMap[o].end()) && (__pioHighGPIO[o] == needsHigh)) {
|
||||||
int idx = pio_claim_unused_sm(pi[o], false);
|
int idx = pio_claim_unused_sm(pi[o], false);
|
||||||
if (idx >= 0) {
|
if (idx >= 0) {
|
||||||
|
DEBUGV("PIOProgram %p: Reusing IMEM ON PIO %p(high=%d) for pins %d-%d\n", _pgm, pi[o], __pioHighGPIO[o] ? 1 : 0, start, start + cnt - 1);
|
||||||
_pio = pi[o];
|
_pio = pi[o];
|
||||||
_sm = idx;
|
_sm = idx;
|
||||||
*pio = pi[o];
|
*pio = pi[o];
|
||||||
|
|
@ -69,9 +86,12 @@ bool PIOProgram::prepare(PIO *pio, int *sm, int *offset) {
|
||||||
|
|
||||||
// Not in any PIO IRAM, so try and add
|
// Not in any PIO IRAM, so try and add
|
||||||
for (int o = 0; o < PIOCNT; o++) {
|
for (int o = 0; o < PIOCNT; o++) {
|
||||||
|
if (__pioAllocated[o] && (__pioHighGPIO[o] == needsHigh)) {
|
||||||
|
DEBUGV("PIOProgram: Checking PIO %p\n", pi[o]);
|
||||||
if (pio_can_add_program(pi[o], _pgm)) {
|
if (pio_can_add_program(pi[o], _pgm)) {
|
||||||
int idx = pio_claim_unused_sm(pi[o], false);
|
int idx = pio_claim_unused_sm(pi[o], false);
|
||||||
if (idx >= 0) {
|
if (idx >= 0) {
|
||||||
|
DEBUGV("PIOProgram %p: Adding IMEM ON PIO %p(high=%d) for pins %d-%d\n", _pgm, pi[o], __pioHighGPIO[o] ? 1 : 0, start, start + cnt - 1);
|
||||||
int off = pio_add_program(pi[o], _pgm);
|
int off = pio_add_program(pi[o], _pgm);
|
||||||
__pioMap[o].insert({_pgm, off});
|
__pioMap[o].insert({_pgm, off});
|
||||||
_pio = pi[o];
|
_pio = pi[o];
|
||||||
|
|
@ -80,8 +100,38 @@ bool PIOProgram::prepare(PIO *pio, int *sm, int *offset) {
|
||||||
*sm = idx;
|
*sm = idx;
|
||||||
*offset = off;
|
*offset = off;
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
DEBUGV("PIOProgram: can't claim unused SM\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DEBUGV("PIOProgram: can't add program\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DEBUGV("PIOProgram: Skipping PIO %p, wrong allocated/needhi\n", pi[o]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No existing PIOs can meet, is there an unallocated one we can allocate?
|
||||||
|
PIO p;
|
||||||
|
uint idx;
|
||||||
|
uint off;
|
||||||
|
auto rc = pio_claim_free_sm_and_add_program_for_gpio_range(_pgm, &p, &idx, &off, start, cnt, true);
|
||||||
|
if (rc) {
|
||||||
|
int o = 0;
|
||||||
|
while (p != pi[o]) {
|
||||||
|
o++;
|
||||||
|
}
|
||||||
|
assert(!__pioAllocated[o]);
|
||||||
|
__pioAllocated[o] = true;
|
||||||
|
__pioHighGPIO[o] = needsHigh;
|
||||||
|
DEBUGV("PIOProgram %p: Allocating new PIO %p(high=%d) for pins %d-%d\n", _pgm, pi[o], __pioHighGPIO[o] ? 1 : 0, start, start + cnt - 1);
|
||||||
|
__pioMap[o].insert({_pgm, off});
|
||||||
|
_pio = pi[o];
|
||||||
|
_sm = idx;
|
||||||
|
*pio = pi[o];
|
||||||
|
*sm = idx;
|
||||||
|
*offset = off;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nope, no room either for SMs or INSNs
|
// Nope, no room either for SMs or INSNs
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public:
|
||||||
PIOProgram(const pio_program_t *pgm);
|
PIOProgram(const pio_program_t *pgm);
|
||||||
~PIOProgram();
|
~PIOProgram();
|
||||||
// Possibly load into a PIO and allocate a SM
|
// Possibly load into a PIO and allocate a SM
|
||||||
bool prepare(PIO *pio, int *sm, int *offset);
|
bool prepare(PIO *pio, int *sm, int *offset, int gpio_start = 0, int gpio_cnt = 1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const pio_program_t *_pgm;
|
const pio_program_t *_pgm;
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ static std::map<int, PIOProgram*> _rxMap;
|
||||||
// Duplicate a program and replace the first insn with a "set x, repl"
|
// 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) {
|
static pio_program_t *pio_make_uart_prog(int repl, const pio_program_t *pg) {
|
||||||
pio_program_t *p = new pio_program_t;
|
pio_program_t *p = new pio_program_t;
|
||||||
|
memcpy(p, pg, sizeof(*p));
|
||||||
p->length = pg->length;
|
p->length = pg->length;
|
||||||
p->origin = pg->origin;
|
p->origin = pg->origin;
|
||||||
uint16_t *insn = (uint16_t *)malloc(p->length * 2);
|
uint16_t *insn = (uint16_t *)malloc(p->length * 2);
|
||||||
|
|
@ -193,7 +194,7 @@ void SerialPIO::begin(unsigned long baud, uint16_t config) {
|
||||||
_txBits = _bits + _stop + (_parity != UART_PARITY_NONE ? 1 : 0) + 1/*start bit*/;
|
_txBits = _bits + _stop + (_parity != UART_PARITY_NONE ? 1 : 0) + 1/*start bit*/;
|
||||||
_txPgm = _getTxProgram(_txBits);
|
_txPgm = _getTxProgram(_txBits);
|
||||||
int off;
|
int off;
|
||||||
if (!_txPgm->prepare(&_txPIO, &_txSM, &off)) {
|
if (!_txPgm->prepare(&_txPIO, &_txSM, &off, _tx, 1)) {
|
||||||
DEBUGCORE("ERROR: Unable to allocate PIO TX UART, out of PIO resources\n");
|
DEBUGCORE("ERROR: Unable to allocate PIO TX UART, out of PIO resources\n");
|
||||||
// ERROR, no free slots
|
// ERROR, no free slots
|
||||||
return;
|
return;
|
||||||
|
|
@ -221,7 +222,7 @@ void SerialPIO::begin(unsigned long baud, uint16_t config) {
|
||||||
_rxBits = 2 * (_bits + _stop + (_parity != UART_PARITY_NONE ? 1 : 0) + 1) - 1;
|
_rxBits = 2 * (_bits + _stop + (_parity != UART_PARITY_NONE ? 1 : 0) + 1) - 1;
|
||||||
_rxPgm = _getRxProgram(_rxBits);
|
_rxPgm = _getRxProgram(_rxBits);
|
||||||
int off;
|
int off;
|
||||||
if (!_rxPgm->prepare(&_rxPIO, &_rxSM, &off)) {
|
if (!_rxPgm->prepare(&_rxPIO, &_rxSM, &off, _rx, 1)) {
|
||||||
DEBUGCORE("ERROR: Unable to allocate PIO RX UART, out of PIO resources\n");
|
DEBUGCORE("ERROR: Unable to allocate PIO RX UART, out of PIO resources\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,16 @@ extern void serialEvent1() __attribute__((weak));
|
||||||
extern void serialEvent2() __attribute__((weak));
|
extern void serialEvent2() __attribute__((weak));
|
||||||
|
|
||||||
bool SerialUART::setRX(pin_size_t pin) {
|
bool SerialUART::setRX(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({1, 13, 17, 29}) /* UART0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 13, 17, 29, 33, 45}) /* UART0 */,
|
||||||
|
__bitset({5, 9, 21, 25, 37, 41}) /* UART1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 13, 17, 29}) /* UART0 */,
|
||||||
__bitset({5, 9, 21, 25}) /* UART1 */
|
__bitset({5, 9, 21, 25}) /* UART1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[uart_get_index(_uart)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[uart_get_index(_uart)])) {
|
||||||
_rx = pin;
|
_rx = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -53,10 +59,16 @@ bool SerialUART::setRX(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SerialUART::setTX(pin_size_t pin) {
|
bool SerialUART::setTX(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({0, 12, 16, 28}) /* UART0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 12, 16, 28, 32, 44}) /* UART0 */,
|
||||||
|
__bitset({4, 8, 20, 24, 36, 40}) /* UART1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 12, 16, 28}) /* UART0 */,
|
||||||
__bitset({4, 8, 20, 24}) /* UART1 */
|
__bitset({4, 8, 20, 24}) /* UART1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[uart_get_index(_uart)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[uart_get_index(_uart)])) {
|
||||||
_tx = pin;
|
_tx = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -74,10 +86,16 @@ bool SerialUART::setTX(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SerialUART::setRTS(pin_size_t pin) {
|
bool SerialUART::setRTS(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({3, 15, 19}) /* UART0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({3, 15, 19, 31, 35, 47}) /* UART0 */,
|
||||||
|
__bitset({7, 11, 23, 27, 39, 43}) /* UART1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({3, 15, 19}) /* UART0 */,
|
||||||
__bitset({7, 11, 23, 27}) /* UART1 */
|
__bitset({7, 11, 23, 27}) /* UART1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((pin == UART_PIN_NOT_DEFINED) || ((1 << pin) & valid[uart_get_index(_uart)]))) {
|
#endif
|
||||||
|
if ((!_running) && ((pin == UART_PIN_NOT_DEFINED) || ((1LL << pin) & valid[uart_get_index(_uart)]))) {
|
||||||
_rts = pin;
|
_rts = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -95,10 +113,16 @@ bool SerialUART::setRTS(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SerialUART::setCTS(pin_size_t pin) {
|
bool SerialUART::setCTS(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({2, 14, 18}) /* UART0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({2, 14, 18, 30, 34, 46}) /* UART0 */,
|
||||||
|
__bitset({6, 10, 22, 26, 38, 42}) /* UART1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({2, 14, 18}) /* UART0 */,
|
||||||
__bitset({6, 10, 22, 26}) /* UART1 */
|
__bitset({6, 10, 22, 26}) /* UART1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((pin == UART_PIN_NOT_DEFINED) || ((1 << pin) & valid[uart_get_index(_uart)]))) {
|
#endif
|
||||||
|
if ((!_running) && ((pin == UART_PIN_NOT_DEFINED) || ((1LL << pin) & valid[uart_get_index(_uart)]))) {
|
||||||
_cts = pin;
|
_cts = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ int64_t _stopTonePIO(alarm_id_t id, void *user_data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void tone(uint8_t pin, unsigned int frequency, unsigned long duration) {
|
void tone(uint8_t pin, unsigned int frequency, unsigned long duration) {
|
||||||
if (pin > 29) {
|
if (pin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal pin in tone (%d)\n", pin);
|
DEBUGCORE("ERROR: Illegal pin in tone (%d)\n", pin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ void tone(uint8_t pin, unsigned int frequency, unsigned long duration) {
|
||||||
newTone = new Tone();
|
newTone = new Tone();
|
||||||
newTone->pin = pin;
|
newTone->pin = pin;
|
||||||
pinMode(pin, OUTPUT);
|
pinMode(pin, OUTPUT);
|
||||||
if (!_tone2Pgm.prepare(&newTone->pio, &newTone->sm, &newTone->off)) {
|
if (!_tone2Pgm.prepare(&newTone->pio, &newTone->sm, &newTone->off, pin, 1)) {
|
||||||
DEBUGCORE("ERROR: tone unable to start, out of PIO resources\n");
|
DEBUGCORE("ERROR: tone unable to start, out of PIO resources\n");
|
||||||
// ERROR, no free slots
|
// ERROR, no free slots
|
||||||
delete newTone;
|
delete newTone;
|
||||||
|
|
@ -118,7 +118,7 @@ void tone(uint8_t pin, unsigned int frequency, unsigned long duration) {
|
||||||
void noTone(uint8_t pin) {
|
void noTone(uint8_t pin) {
|
||||||
CoreMutex m(&_toneMutex);
|
CoreMutex m(&_toneMutex);
|
||||||
|
|
||||||
if ((pin > 29) || !m) {
|
if ((pin > __GPIOCNT) || !m) {
|
||||||
DEBUGCORE("ERROR: Illegal pin in tone (%d)\n", pin);
|
DEBUGCORE("ERROR: Illegal pin in tone (%d)\n", pin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ wait_bit:
|
||||||
static inline void pio_tx_program_init(PIO pio, uint sm, uint offset, uint pin_tx) {
|
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
|
// Tell PIO to initially drive output-high on the selected pin, then map PIO
|
||||||
// onto that pin with the IO muxes.
|
// onto that pin with the IO muxes.
|
||||||
pio_sm_set_pins_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
pio_sm_set_set_pins(pio, sm, pin_tx, 1);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
pio_sm_set_consecutive_pindirs(pio, sm, pin_tx, 1, true);
|
||||||
pio_gpio_init(pio, pin_tx);
|
pio_gpio_init(pio, pin_tx);
|
||||||
|
|
||||||
pio_sm_config c = pio_tx_program_get_default_config(offset);
|
pio_sm_config c = pio_tx_program_get_default_config(offset);
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,8 @@ static inline pio_sm_config pio_tx_program_get_default_config(uint offset) {
|
||||||
static inline void pio_tx_program_init(PIO pio, uint sm, uint offset, uint pin_tx) {
|
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
|
// Tell PIO to initially drive output-high on the selected pin, then map PIO
|
||||||
// onto that pin with the IO muxes.
|
// onto that pin with the IO muxes.
|
||||||
pio_sm_set_pins_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
pio_sm_set_set_pins(pio, sm, pin_tx, 1);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, 1u << pin_tx, 1u << pin_tx);
|
pio_sm_set_consecutive_pindirs(pio, sm, pin_tx, 1, true);
|
||||||
pio_gpio_init(pio, pin_tx);
|
pio_gpio_init(pio, pin_tx);
|
||||||
pio_sm_config c = pio_tx_program_get_default_config(offset);
|
pio_sm_config c = pio_tx_program_get_default_config(offset);
|
||||||
// OUT shifts to right, no autopull
|
// OUT shifts to right, no autopull
|
||||||
|
|
|
||||||
|
|
@ -332,6 +332,9 @@ static bool __psram_heap_init() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!__psram_heap_size) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
_mem_heap = NULL;
|
_mem_heap = NULL;
|
||||||
_mem_psram_pool = NULL;
|
_mem_psram_pool = NULL;
|
||||||
_mem_heap = tlsf_create_with_pool((void *)&__psram_heap_start__, __psram_heap_size, 16 * 1024 * 1024);
|
_mem_heap = tlsf_create_with_pool((void *)&__psram_heap_start__, __psram_heap_size, 16 * 1024 * 1024);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ void __clearADCPin(pin_size_t p);
|
||||||
|
|
||||||
static uint32_t analogScale = 255;
|
static uint32_t analogScale = 255;
|
||||||
static uint32_t analogFreq = 1000;
|
static uint32_t analogFreq = 1000;
|
||||||
static uint32_t pwmInitted = 0;
|
static uint64_t pwmInitted = 0;
|
||||||
static bool scaleInitted = false;
|
static bool scaleInitted = false;
|
||||||
static bool adcInitted = false;
|
static bool adcInitted = false;
|
||||||
static uint16_t analogWritePseudoScale = 1;
|
static uint16_t analogWritePseudoScale = 1;
|
||||||
|
|
@ -79,7 +79,7 @@ extern "C" void analogWriteResolution(int res) {
|
||||||
extern "C" void analogWrite(pin_size_t pin, int val) {
|
extern "C" void analogWrite(pin_size_t pin, int val) {
|
||||||
CoreMutex m(&_dacMutex);
|
CoreMutex m(&_dacMutex);
|
||||||
|
|
||||||
if ((pin > 29) || !m) {
|
if ((pin >= __GPIOCNT) || !m) {
|
||||||
DEBUGCORE("ERROR: Illegal analogWrite pin (%d)\n", pin);
|
DEBUGCORE("ERROR: Illegal analogWrite pin (%d)\n", pin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -101,12 +101,12 @@ extern "C" void analogWrite(pin_size_t pin, int val) {
|
||||||
}
|
}
|
||||||
scaleInitted = true;
|
scaleInitted = true;
|
||||||
}
|
}
|
||||||
if (!(pwmInitted & (1 << pwm_gpio_to_slice_num(pin)))) {
|
if (!(pwmInitted & (1LL << pwm_gpio_to_slice_num(pin)))) {
|
||||||
pwm_config c = pwm_get_default_config();
|
pwm_config c = pwm_get_default_config();
|
||||||
pwm_config_set_clkdiv(&c, clock_get_hz(clk_sys) / ((float)analogScale * analogFreq));
|
pwm_config_set_clkdiv(&c, clock_get_hz(clk_sys) / ((float)analogScale * analogFreq));
|
||||||
pwm_config_set_wrap(&c, analogScale - 1);
|
pwm_config_set_wrap(&c, analogScale - 1);
|
||||||
pwm_init(pwm_gpio_to_slice_num(pin), &c, true);
|
pwm_init(pwm_gpio_to_slice_num(pin), &c, true);
|
||||||
pwmInitted |= 1 << pwm_gpio_to_slice_num(pin);
|
pwmInitted |= 1LL << pwm_gpio_to_slice_num(pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
val <<= analogWritePseudoScale;
|
val <<= analogWritePseudoScale;
|
||||||
|
|
@ -125,17 +125,17 @@ extern "C" void analogWrite(pin_size_t pin, int val) {
|
||||||
auto_init_mutex(_adcMutex);
|
auto_init_mutex(_adcMutex);
|
||||||
static uint8_t _readBits = 10;
|
static uint8_t _readBits = 10;
|
||||||
static uint8_t _lastADCMux = 0;
|
static uint8_t _lastADCMux = 0;
|
||||||
static uint32_t _adcGPIOInit = 0;
|
static uint64_t _adcGPIOInit = 0;
|
||||||
|
|
||||||
void __clearADCPin(pin_size_t p) {
|
void __clearADCPin(pin_size_t p) {
|
||||||
_adcGPIOInit &= ~(1 << p);
|
_adcGPIOInit &= ~(1LL << p);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int analogRead(pin_size_t pin) {
|
extern "C" int analogRead(pin_size_t pin) {
|
||||||
CoreMutex m(&_adcMutex);
|
CoreMutex m(&_adcMutex);
|
||||||
|
|
||||||
pin_size_t maxPin = max(A0, A3);
|
pin_size_t maxPin = __GPIOCNT;
|
||||||
pin_size_t minPin = min(A0, A3);
|
pin_size_t minPin = __FIRSTANALOGGPIO;
|
||||||
|
|
||||||
if ((pin < minPin) || (pin > maxPin) || !m) {
|
if ((pin < minPin) || (pin > maxPin) || !m) {
|
||||||
DEBUGCORE("ERROR: Illegal analogRead pin (%d)\n", pin);
|
DEBUGCORE("ERROR: Illegal analogRead pin (%d)\n", pin);
|
||||||
|
|
@ -145,9 +145,9 @@ extern "C" int analogRead(pin_size_t pin) {
|
||||||
adc_init();
|
adc_init();
|
||||||
adcInitted = true;
|
adcInitted = true;
|
||||||
}
|
}
|
||||||
if (!(_adcGPIOInit & (1 << pin))) {
|
if (!(_adcGPIOInit & (1LL << pin))) {
|
||||||
adc_gpio_init(pin);
|
adc_gpio_init(pin);
|
||||||
_adcGPIOInit |= 1 << pin;
|
_adcGPIOInit |= 1LL << pin;
|
||||||
}
|
}
|
||||||
if (_lastADCMux != pin) {
|
if (_lastADCMux != pin) {
|
||||||
adc_select_input(pin - minPin);
|
adc_select_input(pin - minPin);
|
||||||
|
|
@ -169,7 +169,7 @@ extern "C" float analogReadTemp(float vref) {
|
||||||
_lastADCMux = 0;
|
_lastADCMux = 0;
|
||||||
adc_set_temp_sensor_enabled(true);
|
adc_set_temp_sensor_enabled(true);
|
||||||
delay(1); // Allow things to settle. Without this, readings can be erratic
|
delay(1); // Allow things to settle. Without this, readings can be erratic
|
||||||
adc_select_input(4); // Temperature sensor
|
adc_select_input(__GPIOCNT - __FIRSTANALOGGPIO); // Temperature sensor
|
||||||
int v = adc_read();
|
int v = adc_read();
|
||||||
adc_set_temp_sensor_enabled(false);
|
adc_set_temp_sensor_enabled(false);
|
||||||
float t = 27.0f - ((v * vref / 4096.0f) - 0.706f) / 0.001721f; // From the datasheet
|
float t = 27.0f - ((v * vref / 4096.0f) - 0.706f) / 0.001721f; // From the datasheet
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,15 @@
|
||||||
|
|
||||||
extern void __clearADCPin(pin_size_t p);
|
extern void __clearADCPin(pin_size_t p);
|
||||||
|
|
||||||
static PinMode _pm[30];
|
static PinMode _pm[__GPIOCNT];
|
||||||
|
|
||||||
extern "C" void pinMode(pin_size_t ulPin, PinMode ulMode) __attribute__((weak, alias("__pinMode")));
|
extern "C" void pinMode(pin_size_t ulPin, PinMode ulMode) __attribute__((weak, alias("__pinMode")));
|
||||||
extern "C" void __pinMode(pin_size_t ulPin, PinMode ulMode) {
|
extern "C" void __pinMode(pin_size_t ulPin, PinMode ulMode) {
|
||||||
|
if (ulPin >= __GPIOCNT) {
|
||||||
|
DEBUGCORE("ERROR: Illegal pin in pinMode (%d)\n", ulPin);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (ulMode) {
|
switch (ulMode) {
|
||||||
case INPUT:
|
case INPUT:
|
||||||
gpio_init(ulPin);
|
gpio_init(ulPin);
|
||||||
|
|
@ -72,20 +77,16 @@ extern "C" void __pinMode(pin_size_t ulPin, PinMode ulMode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ulPin > 29) {
|
|
||||||
DEBUGCORE("ERROR: Illegal pin in pinMode (%d)\n", ulPin);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_pm[ulPin] = ulMode;
|
_pm[ulPin] = ulMode;
|
||||||
|
|
||||||
if ((ulPin >= std::min(A0, A3)) && (ulPin <= std::max(A0, A3))) {
|
if (ulPin >= __FIRSTANALOGGPIO) {
|
||||||
__clearADCPin(ulPin);
|
__clearADCPin(ulPin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void digitalWrite(pin_size_t ulPin, PinStatus ulVal) __attribute__((weak, alias("__digitalWrite")));
|
extern "C" void digitalWrite(pin_size_t ulPin, PinStatus ulVal) __attribute__((weak, alias("__digitalWrite")));
|
||||||
extern "C" void __digitalWrite(pin_size_t ulPin, PinStatus ulVal) {
|
extern "C" void __digitalWrite(pin_size_t ulPin, PinStatus ulVal) {
|
||||||
if (ulPin > 29) {
|
if (ulPin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal pin in pinMode (%d)\n", ulPin);
|
DEBUGCORE("ERROR: Illegal pin in pinMode (%d)\n", ulPin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +110,7 @@ extern "C" void __digitalWrite(pin_size_t ulPin, PinStatus ulVal) {
|
||||||
|
|
||||||
extern "C" PinStatus digitalRead(pin_size_t ulPin) __attribute__((weak, alias("__digitalRead")));
|
extern "C" PinStatus digitalRead(pin_size_t ulPin) __attribute__((weak, alias("__digitalRead")));
|
||||||
extern "C" PinStatus __digitalRead(pin_size_t ulPin) {
|
extern "C" PinStatus __digitalRead(pin_size_t ulPin) {
|
||||||
if (ulPin > 29) {
|
if (ulPin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal pin in digitalRead (%d)\n", ulPin);
|
DEBUGCORE("ERROR: Illegal pin in digitalRead (%d)\n", ulPin);
|
||||||
return LOW;
|
return LOW;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ extern "C" unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeo
|
||||||
uint64_t start = time_us_64();
|
uint64_t start = time_us_64();
|
||||||
uint64_t abort = start + timeout;
|
uint64_t abort = start + timeout;
|
||||||
|
|
||||||
if (pin > 29) {
|
if (pin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal pin in pulseIn (%d)\n", pin);
|
DEBUGCORE("ERROR: Illegal pin in pulseIn (%d)\n", pin);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,11 @@
|
||||||
extern "C" uint8_t shiftIn(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder) {
|
extern "C" uint8_t shiftIn(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder) {
|
||||||
uint8_t value = 0;
|
uint8_t value = 0;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
if (dataPin > 29) {
|
if (dataPin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal dataPin in shiftIn (%d)\n", dataPin);
|
DEBUGCORE("ERROR: Illegal dataPin in shiftIn (%d)\n", dataPin);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (clockPin > 29) {
|
if (clockPin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal clockPin in shiftIn (%d)\n", clockPin);
|
DEBUGCORE("ERROR: Illegal clockPin in shiftIn (%d)\n", clockPin);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -46,11 +46,11 @@ extern "C" uint8_t shiftIn(pin_size_t dataPin, pin_size_t clockPin, BitOrder bit
|
||||||
|
|
||||||
extern "C" void shiftOut(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder, uint8_t val) {
|
extern "C" void shiftOut(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder, uint8_t val) {
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
if (dataPin > 29) {
|
if (dataPin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal dataPin in shiftOut (%d)\n", dataPin);
|
DEBUGCORE("ERROR: Illegal dataPin in shiftOut (%d)\n", dataPin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (clockPin > 29) {
|
if (clockPin >= __GPIOCNT) {
|
||||||
DEBUGCORE("ERROR: Illegal clockPin in shiftOut (%d)\n", clockPin);
|
DEBUGCORE("ERROR: Illegal clockPin in shiftOut (%d)\n", clockPin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,43 @@ code that only runs on this core, use the following define.
|
||||||
~~~ your changes ~~~
|
~~~ your changes ~~~
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Identifying RP2040, RP2530A, or RP2350B
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
To check if a board is an original RP2040
|
||||||
|
|
||||||
|
.. code:: cpp
|
||||||
|
|
||||||
|
#if defined(PICO_RP2040)
|
||||||
|
...OG Pico code...
|
||||||
|
#endif
|
||||||
|
|
||||||
|
For RP2350(A or B):
|
||||||
|
|
||||||
|
.. code:: cpp
|
||||||
|
|
||||||
|
#if defined(PICO_RP2350)
|
||||||
|
...Pico 2 code...
|
||||||
|
#endif
|
||||||
|
|
||||||
|
For only RP2350A variants (using the compile options, not the onboard ID register):
|
||||||
|
|
||||||
|
.. code:: cpp
|
||||||
|
|
||||||
|
#if defined(PICO_RP2350) && !defined(PICO_RP2350B)
|
||||||
|
...RP2350A only code...
|
||||||
|
#endif
|
||||||
|
|
||||||
|
For only RP2350B variants (again, at compile time as identified by the selected board
|
||||||
|
and not the chip ID register):
|
||||||
|
|
||||||
|
.. code:: cpp
|
||||||
|
|
||||||
|
#if defined(PICO_RP2350B)
|
||||||
|
...48-GPIO version code here
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
Library Architectures
|
Library Architectures
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
@ -98,3 +135,4 @@ not know your new code is compatible here.
|
||||||
|
|
||||||
Add ``rp2040`` to ``architectures`` (in ``library.properties``) and
|
Add ``rp2040`` to ``architectures`` (in ``library.properties``) and
|
||||||
``"rp2040"`` to ``platforms[]`` (in ``library.json``) to let the tools know.
|
``"rp2040"`` to ``platforms[]`` (in ``library.json``) to let the tools know.
|
||||||
|
Note that even the RP2350 is identified as ``rp2040`` for this purpose.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// based on PICO_CONFIG_HEADER_FILES:
|
// based on PICO_CONFIG_HEADER_FILES:
|
||||||
|
|
||||||
#include "../../pico-sdk/src/boards/include/boards/pico2.h"
|
#include "../../pico-sdk/src/boards/include/boards/solderparty_rp2350_stamp_xl.h"
|
||||||
#include "../../pico-sdk/src/rp2_common/cmsis/include/cmsis/rename_exceptions.h"
|
#include "../../pico-sdk/src/rp2_common/cmsis/include/cmsis/rename_exceptions.h"
|
||||||
|
|
||||||
// based on PICO_RP2350_ARM_S_CONFIG_HEADER_FILES:
|
// based on PICO_RP2350_ARM_S_CONFIG_HEADER_FILES:
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
-iwithprefixbefore/pico-sdk/lib/tinyusb/src
|
-iwithprefixbefore/pico-sdk/lib/tinyusb/src
|
||||||
-iwithprefixbefore/pico-sdk/src/boards/include
|
-iwithprefixbefore/pico-sdk/src/boards/include
|
||||||
|
-iwithprefixbefore/pico-sdk/src/common/hardware_claim/include
|
||||||
-iwithprefixbefore/pico-sdk/src/common/pico_base/include
|
-iwithprefixbefore/pico-sdk/src/common/pico_base/include
|
||||||
-iwithprefixbefore/pico-sdk/src/common/pico_base_headers/include
|
-iwithprefixbefore/pico-sdk/src/common/pico_base_headers/include
|
||||||
-iwithprefixbefore/pico-sdk/src/common/pico_binary_info/include
|
-iwithprefixbefore/pico-sdk/src/common/pico_binary_info/include
|
||||||
|
|
@ -19,7 +20,6 @@
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_adc/include
|
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_adc/include
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_base/include
|
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_base/include
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_boot_lock/include
|
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_boot_lock/include
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_claim/include
|
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_clocks/include
|
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_clocks/include
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_divider/include
|
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_divider/include
|
||||||
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_dma/include
|
-iwithprefixbefore/pico-sdk/src/rp2_common/hardware_dma/include
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -66,23 +66,22 @@ I2S::~I2S() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool I2S::setBCLK(pin_size_t pin) {
|
bool I2S::setBCLK(pin_size_t pin) {
|
||||||
if (_running || (pin > 28)) {
|
if (_running || (pin > __GPIOCNT - 1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_pinBCLK = pin;
|
_pinBCLK = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool I2S::setMCLK(pin_size_t pin) {
|
bool I2S::setMCLK(pin_size_t pin) {
|
||||||
if (_running || (pin > 28)) {
|
if (_running || (pin >= __GPIOCNT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_pinMCLK = pin;
|
_pinMCLK = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool I2S::setDATA(pin_size_t pin) {
|
bool I2S::setDATA(pin_size_t pin) {
|
||||||
if (_running || (pin > 29)) {
|
if (_running || (pin >= __GPIOCNT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_pinDOUT = pin;
|
_pinDOUT = pin;
|
||||||
|
|
@ -198,7 +197,7 @@ void I2S::onReceive(void(*fn)(void)) {
|
||||||
void I2S::MCLKbegin() {
|
void I2S::MCLKbegin() {
|
||||||
int off = 0;
|
int off = 0;
|
||||||
_i2sMCLK = new PIOProgram(&pio_i2s_mclk_program);
|
_i2sMCLK = new PIOProgram(&pio_i2s_mclk_program);
|
||||||
_i2sMCLK->prepare(&_pioMCLK, &_smMCLK, &off); // not sure how to use the same PIO
|
_i2sMCLK->prepare(&_pioMCLK, &_smMCLK, &off, _pinMCLK, 1); // not sure how to use the same PIO
|
||||||
pio_i2s_MCLK_program_init(_pioMCLK, _smMCLK, off, _pinMCLK);
|
pio_i2s_MCLK_program_init(_pioMCLK, _smMCLK, off, _pinMCLK);
|
||||||
int mClk = _multMCLK * _freq * 2.0 /* edges per clock */;
|
int mClk = _multMCLK * _freq * 2.0 /* edges per clock */;
|
||||||
pio_sm_set_clkdiv_int_frac(_pioMCLK, _smMCLK, clock_get_hz(clk_sys) / mClk, 0);
|
pio_sm_set_clkdiv_int_frac(_pioMCLK, _smMCLK, clock_get_hz(clk_sys) / mClk, 0);
|
||||||
|
|
@ -215,7 +214,9 @@ bool I2S::begin() {
|
||||||
} else {
|
} else {
|
||||||
_i2s = new PIOProgram(_isOutput ? (_isTDM ? &pio_tdm_out_swap_program : (_isLSBJ ? &pio_lsbj_out_swap_program : &pio_i2s_out_swap_program)) : &pio_i2s_in_swap_program);
|
_i2s = new PIOProgram(_isOutput ? (_isTDM ? &pio_tdm_out_swap_program : (_isLSBJ ? &pio_lsbj_out_swap_program : &pio_i2s_out_swap_program)) : &pio_i2s_in_swap_program);
|
||||||
}
|
}
|
||||||
if (!_i2s->prepare(&_pio, &_sm, &off)) {
|
int minpin = std::min((int)_pinDOUT, (int)_pinBCLK);
|
||||||
|
int maxpin = std::max((int)_pinDOUT, (int)_pinBCLK + 1);
|
||||||
|
if (!_i2s->prepare(&_pio, &_sm, &off, minpin, maxpin - minpin + 1)) {
|
||||||
_running = false;
|
_running = false;
|
||||||
delete _i2s;
|
delete _i2s;
|
||||||
_i2s = nullptr;
|
_i2s = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -220,9 +220,13 @@ static inline void pio_i2s_out_program_init(PIO pio, uint sm, uint offset, uint
|
||||||
|
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
|
|
||||||
uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
//uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, data_pin, 1);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
|
|
||||||
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
||||||
}
|
}
|
||||||
|
|
@ -241,9 +245,13 @@ static inline void pio_tdm_out_program_init(PIO pio, uint sm, uint offset, uint
|
||||||
|
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
|
|
||||||
uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
//uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, data_pin, 1);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
|
|
||||||
// Can't set constant > 31, so push and pop/mov
|
// Can't set constant > 31, so push and pop/mov
|
||||||
pio_sm_put_blocking(pio, sm, bits * channels - 2);
|
pio_sm_put_blocking(pio, sm, bits * channels - 2);
|
||||||
|
|
@ -268,9 +276,13 @@ static inline void pio_lsbj_out_program_init(PIO pio, uint sm, uint offset, uint
|
||||||
|
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
|
|
||||||
uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
//uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, data_pin, 1);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
|
|
||||||
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
||||||
}
|
}
|
||||||
|
|
@ -289,9 +301,12 @@ static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint d
|
||||||
|
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
|
|
||||||
uint pin_mask = 3u << clock_pin_base;
|
//uint pin_mask = 3u << clock_pin_base;
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, false);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
|
|
||||||
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -369,9 +369,13 @@ static inline void pio_i2s_out_program_init(PIO pio, uint sm, uint offset, uint
|
||||||
sm_config_set_out_shift(&sm_config, false, true, (bits <= 16) ? 2 * bits : bits);
|
sm_config_set_out_shift(&sm_config, false, true, (bits <= 16) ? 2 * bits : bits);
|
||||||
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);
|
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
//uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, data_pin, 1);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
||||||
}
|
}
|
||||||
static inline void pio_tdm_out_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base, uint bits, bool swap, uint channels) {
|
static inline void pio_tdm_out_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base, uint bits, bool swap, uint channels) {
|
||||||
|
|
@ -384,9 +388,13 @@ static inline void pio_tdm_out_program_init(PIO pio, uint sm, uint offset, uint
|
||||||
sm_config_set_out_shift(&sm_config, false, true, 32);
|
sm_config_set_out_shift(&sm_config, false, true, 32);
|
||||||
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);
|
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
//uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, data_pin, 1);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
// Can't set constant > 31, so push and pop/mov
|
// Can't set constant > 31, so push and pop/mov
|
||||||
pio_sm_put_blocking(pio, sm, bits * channels - 2);
|
pio_sm_put_blocking(pio, sm, bits * channels - 2);
|
||||||
pio_sm_exec(pio, sm, pio_encode_pull(false, false));
|
pio_sm_exec(pio, sm, pio_encode_pull(false, false));
|
||||||
|
|
@ -404,9 +412,13 @@ static inline void pio_lsbj_out_program_init(PIO pio, uint sm, uint offset, uint
|
||||||
sm_config_set_out_shift(&sm_config, false, true, (bits <= 16) ? 2 * bits : bits);
|
sm_config_set_out_shift(&sm_config, false, true, (bits <= 16) ? 2 * bits : bits);
|
||||||
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);
|
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_TX);
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
//uint pin_mask = (1u << data_pin) | (3u << clock_pin_base);
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, true);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, data_pin, 1);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
||||||
}
|
}
|
||||||
static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base, uint bits, bool swap) {
|
static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base, uint bits, bool swap) {
|
||||||
|
|
@ -419,9 +431,12 @@ static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint d
|
||||||
sm_config_set_in_shift(&sm_config, false, true, (bits <= 16) ? 2 * bits : bits);
|
sm_config_set_in_shift(&sm_config, false, true, (bits <= 16) ? 2 * bits : bits);
|
||||||
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_RX);
|
sm_config_set_fifo_join(&sm_config, PIO_FIFO_JOIN_RX);
|
||||||
pio_sm_init(pio, sm, offset, &sm_config);
|
pio_sm_init(pio, sm, offset, &sm_config);
|
||||||
uint pin_mask = 3u << clock_pin_base;
|
//uint pin_mask = 3u << clock_pin_base;
|
||||||
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
//pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
|
||||||
pio_sm_set_pins(pio, sm, 0); // clear pins
|
//pio_sm_set_pins(pio, sm, 0); // clear pins
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, data_pin, 1, false);
|
||||||
|
pio_sm_set_consecutive_pindirs(pio, sm, clock_pin_base, 2, true);
|
||||||
|
pio_sm_set_set_pins(pio, sm, clock_pin_base, 2);
|
||||||
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
|
||||||
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits)); // Shift in 1st L data
|
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits)); // Shift in 1st L data
|
||||||
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits - 1)); // Shift in 1st R data modulo one bit, avoiding bit shift from #2037
|
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits - 1)); // Shift in 1st R data modulo one bit, avoiding bit shift from #2037
|
||||||
|
|
|
||||||
|
|
@ -329,10 +329,16 @@ void SPIClassRP2040::abortAsync() {
|
||||||
|
|
||||||
|
|
||||||
bool SPIClassRP2040::setRX(pin_size_t pin) {
|
bool SPIClassRP2040::setRX(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({0, 4, 16, 20}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 4, 16, 20, 32, 26}) /* SPI0 */,
|
||||||
|
__bitset({8, 12, 24, 28, 40, 44}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 4, 16, 20}) /* SPI0 */,
|
||||||
__bitset({8, 12, 24, 28}) /* SPI1 */
|
__bitset({8, 12, 24, 28}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_RX = pin;
|
_RX = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -350,10 +356,16 @@ bool SPIClassRP2040::setRX(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPIClassRP2040::setCS(pin_size_t pin) {
|
bool SPIClassRP2040::setCS(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({1, 5, 17, 21}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 5, 17, 21, 33, 37}) /* SPI0 */,
|
||||||
|
__bitset({9, 13, 25, 29, 41, 45}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 5, 17, 21}) /* SPI0 */,
|
||||||
__bitset({9, 13, 25, 29}) /* SPI1 */
|
__bitset({9, 13, 25, 29}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_CS = pin;
|
_CS = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -371,10 +383,16 @@ bool SPIClassRP2040::setCS(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPIClassRP2040::setSCK(pin_size_t pin) {
|
bool SPIClassRP2040::setSCK(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({2, 6, 18, 22}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({2, 6, 18, 22, 34, 38}) /* SPI0 */,
|
||||||
|
__bitset({10, 14, 26, 30, 42, 46}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({2, 6, 18, 22}) /* SPI0 */,
|
||||||
__bitset({10, 14, 26}) /* SPI1 */
|
__bitset({10, 14, 26}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_SCK = pin;
|
_SCK = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -392,10 +410,16 @@ bool SPIClassRP2040::setSCK(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPIClassRP2040::setTX(pin_size_t pin) {
|
bool SPIClassRP2040::setTX(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({3, 7, 19, 23}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({3, 7, 19, 23, 35, 39}) /* SPI0 */,
|
||||||
|
__bitset({11, 15, 27, 31, 43, 47}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({3, 7, 19, 23}) /* SPI0 */,
|
||||||
__bitset({11, 15, 27}) /* SPI1 */
|
__bitset({11, 15, 27}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_TX = pin;
|
_TX = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,16 @@ inline spi_cpha_t SPISlaveClass::cpha(SPISettings _spis) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPISlaveClass::setRX(pin_size_t pin) {
|
bool SPISlaveClass::setRX(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({0, 4, 16, 20}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 4, 16, 20, 32, 26}) /* SPI0 */,
|
||||||
|
__bitset({8, 12, 24, 28, 40, 44}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 4, 16, 20}) /* SPI0 */,
|
||||||
__bitset({8, 12, 24, 28}) /* SPI1 */
|
__bitset({8, 12, 24, 28}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_RX = pin;
|
_RX = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -100,10 +106,16 @@ bool SPISlaveClass::setRX(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPISlaveClass::setCS(pin_size_t pin) {
|
bool SPISlaveClass::setCS(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({1, 5, 17, 21}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 5, 17, 21, 33, 37}) /* SPI0 */,
|
||||||
|
__bitset({9, 13, 25, 29, 41, 45}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 5, 17, 21}) /* SPI0 */,
|
||||||
__bitset({9, 13, 25, 29}) /* SPI1 */
|
__bitset({9, 13, 25, 29}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_CS = pin;
|
_CS = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -121,10 +133,16 @@ bool SPISlaveClass::setCS(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPISlaveClass::setSCK(pin_size_t pin) {
|
bool SPISlaveClass::setSCK(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({2, 6, 18, 22}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({2, 6, 18, 22, 34, 38}) /* SPI0 */,
|
||||||
|
__bitset({10, 14, 26, 30, 42, 46}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({2, 6, 18, 22}) /* SPI0 */,
|
||||||
__bitset({10, 14, 26}) /* SPI1 */
|
__bitset({10, 14, 26}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_SCK = pin;
|
_SCK = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -142,10 +160,16 @@ bool SPISlaveClass::setSCK(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPISlaveClass::setTX(pin_size_t pin) {
|
bool SPISlaveClass::setTX(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({3, 7, 19, 23}) /* SPI0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({3, 7, 19, 23, 35, 39}) /* SPI0 */,
|
||||||
|
__bitset({11, 15, 27, 31, 43, 47}) /* SPI1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({3, 7, 19, 23}) /* SPI0 */,
|
||||||
__bitset({11, 15, 27}) /* SPI1 */
|
__bitset({11, 15, 27}) /* SPI1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[spi_get_index(_spi)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[spi_get_index(_spi)])) {
|
||||||
_TX = pin;
|
_TX = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ int Servo::attach(pin_size_t pin, int minUs, int maxUs, int value) {
|
||||||
digitalWrite(pin, LOW);
|
digitalWrite(pin, LOW);
|
||||||
pinMode(pin, OUTPUT);
|
pinMode(pin, OUTPUT);
|
||||||
_pin = pin;
|
_pin = pin;
|
||||||
if (!_servoPgm.prepare(&_pio, &_smIdx, &_pgmOffset)) {
|
if (!_servoPgm.prepare(&_pio, &_smIdx, &_pgmOffset, pin, 1)) {
|
||||||
// ERROR, no free slots
|
// ERROR, no free slots
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,16 @@ TwoWire::TwoWire(i2c_inst_t *i2c, pin_size_t sda, pin_size_t scl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TwoWire::setSDA(pin_size_t pin) {
|
bool TwoWire::setSDA(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({0, 4, 8, 12, 16, 20, 24, 28}) /* I2C0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44}) /* I2C0 */,
|
||||||
|
__bitset({2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46}) /* I2C1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({0, 4, 8, 12, 16, 20, 24, 28}) /* I2C0 */,
|
||||||
__bitset({2, 6, 10, 14, 18, 22, 26}) /* I2C1 */
|
__bitset({2, 6, 10, 14, 18, 22, 26}) /* I2C1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[i2c_hw_index(_i2c)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[i2c_hw_index(_i2c)])) {
|
||||||
_sda = pin;
|
_sda = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -70,10 +76,16 @@ bool TwoWire::setSDA(pin_size_t pin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TwoWire::setSCL(pin_size_t pin) {
|
bool TwoWire::setSCL(pin_size_t pin) {
|
||||||
constexpr uint32_t valid[2] = { __bitset({1, 5, 9, 13, 17, 21, 25, 29}) /* I2C0 */,
|
#ifdef RP2350B
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45}) /* I2C0 */,
|
||||||
|
__bitset({3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47}) /* I2C1 */
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
constexpr uint64_t valid[2] = { __bitset({1, 5, 9, 13, 17, 21, 25, 29}) /* I2C0 */,
|
||||||
__bitset({3, 7, 11, 15, 19, 23, 27}) /* I2C1 */
|
__bitset({3, 7, 11, 15, 19, 23, 27}) /* I2C1 */
|
||||||
};
|
};
|
||||||
if ((!_running) && ((1 << pin) & valid[i2c_hw_index(_i2c)])) {
|
#endif
|
||||||
|
if ((!_running) && ((1LL << pin) & valid[i2c_hw_index(_i2c)])) {
|
||||||
_scl = pin;
|
_scl = pin;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,9 @@
|
||||||
{
|
{
|
||||||
"name": "Pimoroni PGA2040"
|
"name": "Pimoroni PGA2040"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Pimoroni PGA2350"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Pimoroni PicoPlus2"
|
"name": "Pimoroni PicoPlus2"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ compiler.warning_flags.all=-Wall -Wextra -Werror=return-type -Wno-ignored-qualif
|
||||||
|
|
||||||
compiler.netdefines={build.libpicowdefs} -DLWIP_IGMP=1 -DLWIP_CHECKSUM_CTRL_PER_NETIF=1
|
compiler.netdefines={build.libpicowdefs} -DLWIP_IGMP=1 -DLWIP_CHECKSUM_CTRL_PER_NETIF=1
|
||||||
compiler.psramdefines={build.psram_cs} {build.psram_freq}
|
compiler.psramdefines={build.psram_cs} {build.psram_freq}
|
||||||
compiler.defines={build.led} {build.usbstack_flags} {build.usbpid} {build.usbvid} {build.usbpwr} {compiler.psramdefines} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {compiler.netdefines} -DARDUINO_VARIANT="{build.variant}" -DPICO_FLASH_SIZE_BYTES={build.flash_total} "@{runtime.platform.path}/lib/{build.chip}/platform_def.txt"
|
compiler.defines={build.led} {build.usbstack_flags} {build.usbpid} {build.usbvid} {build.usbpwr} {compiler.psramdefines} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' {compiler.netdefines} {build.variantdefines} -DARDUINO_VARIANT="{build.variant}" -DPICO_FLASH_SIZE_BYTES={build.flash_total} "@{runtime.platform.path}/lib/{build.chip}/platform_def.txt"
|
||||||
compiler.includes="-iprefix{runtime.platform.path}/" "@{runtime.platform.path}/lib/{build.chip}/platform_inc.txt" "@{runtime.platform.path}/lib/core_inc.txt" "-I{runtime.platform.path}/include"
|
compiler.includes="-iprefix{runtime.platform.path}/" "@{runtime.platform.path}/lib/{build.chip}/platform_inc.txt" "@{runtime.platform.path}/lib/core_inc.txt" "-I{runtime.platform.path}/include"
|
||||||
compiler.flags={build.toolchainopts} -ffunction-sections -fdata-sections {build.flags.exceptions} {build.flags.stackprotect} {build.picodebugflags}
|
compiler.flags={build.toolchainopts} -ffunction-sections -fdata-sections {build.flags.exceptions} {build.flags.stackprotect} {build.picodebugflags}
|
||||||
compiler.wrap="@{runtime.platform.path}/lib/{build.chip}/platform_wrap.txt" "@{runtime.platform.path}/lib/core_wrap.txt"
|
compiler.wrap="@{runtime.platform.path}/lib/{build.chip}/platform_wrap.txt" "@{runtime.platform.path}/lib/core_wrap.txt"
|
||||||
|
|
@ -110,6 +110,7 @@ build.libpicowdefs=-DLWIP_IPV6=0 -DLWIP_IPV4=1
|
||||||
build.wificc=-DWIFICC=CYW43_COUNTRY_WORLDWIDE
|
build.wificc=-DWIFICC=CYW43_COUNTRY_WORLDWIDE
|
||||||
build.debugscript=picoprobe_cmsis_dap.tcl
|
build.debugscript=picoprobe_cmsis_dap.tcl
|
||||||
build.picodebugflags=
|
build.picodebugflags=
|
||||||
|
build.variantdefines=
|
||||||
|
|
||||||
# Allow Pico boards do be auto-discovered by the IDE
|
# Allow Pico boards do be auto-discovered by the IDE
|
||||||
#discovery.rp2040.pattern={runtime.tools.pqt-python3.path}/python3 -I "{runtime.platform.path}/tools/pluggable_discovery.py"
|
#discovery.rp2040.pattern={runtime.tools.pqt-python3.path}/python3 -I "{runtime.platform.path}/tools/pluggable_discovery.py"
|
||||||
|
|
|
||||||
56
tools/json/pimoroni_pga2350.json
Normal file
56
tools/json/pimoroni_pga2350.json
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"earlephilhower": {
|
||||||
|
"boot2_source": "boot2_w25q080_4_padded_checksum.S",
|
||||||
|
"usb_vid": "0x2E8A",
|
||||||
|
"usb_pid": "0x1018"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"core": "earlephilhower",
|
||||||
|
"cpu": "cortex-m33",
|
||||||
|
"extra_flags": "-DARDUINO_PIMORONI_PGA2350 -DARDUINO_ARCH_RP2040 -DUSBD_MAX_POWER_MA=250 ",
|
||||||
|
"f_cpu": "150000000L",
|
||||||
|
"hwids": [
|
||||||
|
[
|
||||||
|
"0x2E8A",
|
||||||
|
"0x00C0"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"0x2E8A",
|
||||||
|
"0x1018"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"mcu": "rp2350",
|
||||||
|
"variant": "pimoroni_pga2350"
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"jlink_device": "RP2350_0",
|
||||||
|
"openocd_target": "rp2350.cfg",
|
||||||
|
"svd_path": "rp2350.svd"
|
||||||
|
},
|
||||||
|
"frameworks": [
|
||||||
|
"arduino"
|
||||||
|
],
|
||||||
|
"name": "PGA2350",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 524288,
|
||||||
|
"maximum_size": 16777216,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"native_usb": true,
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"wait_for_upload_port": false,
|
||||||
|
"protocol": "picotool",
|
||||||
|
"protocols": [
|
||||||
|
"blackmagic",
|
||||||
|
"cmsis-dap",
|
||||||
|
"jlink",
|
||||||
|
"raspberrypi-swd",
|
||||||
|
"picotool",
|
||||||
|
"picoprobe"
|
||||||
|
],
|
||||||
|
"psram_length": 8388608
|
||||||
|
},
|
||||||
|
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",
|
||||||
|
"vendor": "Pimoroni"
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,7 @@ if (${cpu} MATCHES "rp2040")
|
||||||
set(PICO_PLATFORM rp2040)
|
set(PICO_PLATFORM rp2040)
|
||||||
set(PICO_CYW43_SUPPORTED 1)
|
set(PICO_CYW43_SUPPORTED 1)
|
||||||
elseif(${cpu} MATCHES "rp2350")
|
elseif(${cpu} MATCHES "rp2350")
|
||||||
set(PICO_BOARD pico2)
|
set(PICO_BOARD solderparty_rp2350_stamp_xl) # Pico2 sets to RP2350A which disables all code for RP2350B
|
||||||
set(PICO_PLATFORM rp2350)
|
set(PICO_PLATFORM rp2350)
|
||||||
set(PICO_CYW43_SUPPORTED 0)
|
set(PICO_CYW43_SUPPORTED 0)
|
||||||
else()
|
else()
|
||||||
|
|
@ -31,7 +31,7 @@ add_library(common-${cpu} INTERFACE)
|
||||||
if (${cpu} MATCHES "rp2040")
|
if (${cpu} MATCHES "rp2040")
|
||||||
set(xcd PICO_RP2040_B0_SUPPORTED=1 PICO_RP2040_B1_SUPPORTED=1 PICO_RP2040_B2_SUPPORTED=1 PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 CYW43_WARN=// PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64 PICO_FLOAT_SUPPORT_ROM_V1=1 PICO_DOUBLE_SUPPORT_ROM_V1=1 PICO_RP2040=1 PICO_PLATFORM=rp2040 PICO_CYW43_SUPPORTED=1)
|
set(xcd PICO_RP2040_B0_SUPPORTED=1 PICO_RP2040_B1_SUPPORTED=1 PICO_RP2040_B2_SUPPORTED=1 PICO_CYW43_ARCH_THREADSAFE_BACKGROUND=1 CYW43_WARN=// PICO_XOSC_STARTUP_DELAY_MULTIPLIER=64 PICO_FLOAT_SUPPORT_ROM_V1=1 PICO_DOUBLE_SUPPORT_ROM_V1=1 PICO_RP2040=1 PICO_PLATFORM=rp2040 PICO_CYW43_SUPPORTED=1)
|
||||||
elseif(${cpu} MATCHES "rp2350")
|
elseif(${cpu} MATCHES "rp2350")
|
||||||
set(xcd CFG_TUSB_DEBUG=0 CFG_TUSB_MCU=OPT_MCU_RP2040 CFG_TUSB_OS=OPT_OS_PICO LIB_BOOT_STAGE2_HEADERS=1 LIB_PICO_ATOMIC=1 LIB_PICO_BIT_OPS=1 LIB_PICO_BIT_OPS_PICO=1 LIB_PICO_CLIB_INTERFACE=1 LIB_PICO_CRT0=1 LIB_PICO_CXX_OPTIONS=1 LIB_PICO_DIVIDER=1 LIB_PICO_DIVIDER_COMPILER=1 LIB_PICO_DOUBLE=1 LIB_PICO_DOUBLE_PICO=1 LIB_PICO_FIX_RP2040_USB_DEVICE_ENUMERATION=1 LIB_PICO_FLOAT=1 LIB_PICO_FLOAT_PICO=1 LIB_PICO_FLOAT_PICO_VFP=1 LIB_PICO_INT64_OPS=1 LIB_PICO_INT64_OPS_COMPILER=1 LIB_PICO_MEM_OPS=1 LIB_PICO_MEM_OPS_COMPILER=1 LIB_PICO_NEWLIB_INTERFACE=1 LIB_PICO_PLATFORM=1 LIB_PICO_PLATFORM_COMPILER=1 LIB_PICO_PLATFORM_PANIC=1 LIB_PICO_PLATFORM_SECTIONS=1 LIB_PICO_RUNTIME=1 LIB_PICO_RUNTIME_INIT=1 LIB_PICO_STANDARD_BINARY_INFO=1 LIB_PICO_STANDARD_LINK=1 LIB_PICO_SYNC=1 LIB_PICO_SYNC_CRITICAL_SECTION=1 LIB_PICO_SYNC_MUTEX=1 LIB_PICO_SYNC_SEM=1 LIB_PICO_TIME=1 LIB_PICO_TIME_ADAPTER=1 LIB_PICO_UNIQUE_ID=1 LIB_PICO_UTIL=1 LIB_TINYUSB_BOARD=1 LIB_TINYUSB_DEVICE=1 PICO_32BIT=1 PICO_BOARD=\"pico2\" PICO_BUILD=1 PICO_COPY_TO_RAM=0 PICO_CXX_ENABLE_EXCEPTIONS=0 PICO_NO_FLASH=0 PICO_NO_HARDWARE=0 PICO_ON_DEVICE=1 PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 PICO_RP2040_USB_DEVICE_UFRAME_FIX=1 PICO_RP2350=1 PICO_USE_BLOCKED_RAM=0 PICO_PLATFORM=rp2350)
|
set(xcd CFG_TUSB_DEBUG=0 CFG_TUSB_MCU=OPT_MCU_RP2040 CFG_TUSB_OS=OPT_OS_PICO LIB_BOOT_STAGE2_HEADERS=1 LIB_PICO_ATOMIC=1 LIB_PICO_BIT_OPS=1 LIB_PICO_BIT_OPS_PICO=1 LIB_PICO_CLIB_INTERFACE=1 LIB_PICO_CRT0=1 LIB_PICO_CXX_OPTIONS=1 LIB_PICO_DIVIDER=1 LIB_PICO_DIVIDER_COMPILER=1 LIB_PICO_DOUBLE=1 LIB_PICO_DOUBLE_PICO=1 LIB_PICO_FIX_RP2040_USB_DEVICE_ENUMERATION=1 LIB_PICO_FLOAT=1 LIB_PICO_FLOAT_PICO=1 LIB_PICO_FLOAT_PICO_VFP=1 LIB_PICO_INT64_OPS=1 LIB_PICO_INT64_OPS_COMPILER=1 LIB_PICO_MEM_OPS=1 LIB_PICO_MEM_OPS_COMPILER=1 LIB_PICO_NEWLIB_INTERFACE=1 LIB_PICO_PLATFORM=1 LIB_PICO_PLATFORM_COMPILER=1 LIB_PICO_PLATFORM_PANIC=1 LIB_PICO_PLATFORM_SECTIONS=1 LIB_PICO_RUNTIME=1 LIB_PICO_RUNTIME_INIT=1 LIB_PICO_STANDARD_BINARY_INFO=1 LIB_PICO_STANDARD_LINK=1 LIB_PICO_SYNC=1 LIB_PICO_SYNC_CRITICAL_SECTION=1 LIB_PICO_SYNC_MUTEX=1 LIB_PICO_SYNC_SEM=1 LIB_PICO_TIME=1 LIB_PICO_TIME_ADAPTER=1 LIB_PICO_UNIQUE_ID=1 LIB_PICO_UTIL=1 LIB_TINYUSB_BOARD=1 LIB_TINYUSB_DEVICE=1 PICO_32BIT=1 PICO_BOARD=\"solderparty_rp2350_stamp_xl\" PICO_BUILD=1 PICO_COPY_TO_RAM=0 PICO_CXX_ENABLE_EXCEPTIONS=0 PICO_NO_FLASH=0 PICO_NO_HARDWARE=0 PICO_ON_DEVICE=1 PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1 PICO_RP2040_USB_DEVICE_UFRAME_FIX=1 PICO_RP2350=1 PICO_USE_BLOCKED_RAM=0 PICO_PLATFORM=rp2350)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use a longer XOSC startup time, to accommodate Adafruit and other boards that may need it.
|
# Use a longer XOSC startup time, to accommodate Adafruit and other boards that may need it.
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,9 @@ def BuildPSRAM(name):
|
||||||
print("%s.menu.psram.%dmb.build.psram_length=0x%d00000" % (name, s, s))
|
print("%s.menu.psram.%dmb.build.psram_length=0x%d00000" % (name, s, s))
|
||||||
|
|
||||||
def BuildPSRAMCS(name):
|
def BuildPSRAMCS(name):
|
||||||
for s in range(0, 32):
|
print("%s.menu.psramcs.GPIOnone=None" % (name))
|
||||||
|
print("%s.menu.psramcs.GPIOnone.build.psram_cs=" % (name))
|
||||||
|
for s in range(0, 48):
|
||||||
print("%s.menu.psramcs.GPIO%d=GPIO %d" % (name, s, s))
|
print("%s.menu.psramcs.GPIO%d=GPIO %d" % (name, s, s))
|
||||||
print("%s.menu.psramcs.GPIO%d.build.psram_cs=-DRP2350_PSRAM_CS=%d" % (name, s, s))
|
print("%s.menu.psramcs.GPIO%d.build.psram_cs=-DRP2350_PSRAM_CS=%d" % (name, s, s))
|
||||||
|
|
||||||
|
|
@ -63,6 +65,11 @@ def BuildPSRAMFreq(name):
|
||||||
print("%s.menu.psramfreq.freq%d=%d MHz" % (name, s, s))
|
print("%s.menu.psramfreq.freq%d=%d MHz" % (name, s, s))
|
||||||
print("%s.menu.psramfreq.freq%d.build.psram_freq=-DRP2350_PSRAM_MAX_SCK_HZ=%d" % (name, s, s * 1000000))
|
print("%s.menu.psramfreq.freq%d.build.psram_freq=-DRP2350_PSRAM_MAX_SCK_HZ=%d" % (name, s, s * 1000000))
|
||||||
|
|
||||||
|
def BuildRP2350Variant(name):
|
||||||
|
for l in [ ("RP2350A", "-DPICO_RP2350A=1"), ("RP2530B", "-DPICO_RP2350B=1") ]:
|
||||||
|
print("%s.menu.variantchip.%s=%s" % (name, l[0], l[0]))
|
||||||
|
print("%s.menu.variantchip.%s.build.variantdefines=%s" % (name, l[0], l[1]))
|
||||||
|
|
||||||
def BuildOptimize(name):
|
def BuildOptimize(name):
|
||||||
for l in [ ("Small", "Small", "-Os", " (standard)"), ("Optimize", "Optimize", "-O", ""), ("Optimize2", "Optimize More", "-O2", ""),
|
for l in [ ("Small", "Small", "-Os", " (standard)"), ("Optimize", "Optimize", "-O", ""), ("Optimize2", "Optimize More", "-O2", ""),
|
||||||
("Optimize3", "Optimize Even More", "-O3", ""), ("Fast", "Fast", "-Ofast", " (maybe slower)"), ("Debug", "Debug", "-Og", "") ]:
|
("Optimize3", "Optimize Even More", "-O3", ""), ("Fast", "Fast", "-Ofast", " (maybe slower)"), ("Debug", "Debug", "-Og", "") ]:
|
||||||
|
|
@ -252,9 +259,10 @@ def WriteWarning():
|
||||||
|
|
||||||
def BuildGlobalMenuList():
|
def BuildGlobalMenuList():
|
||||||
print("menu.BoardModel=Model")
|
print("menu.BoardModel=Model")
|
||||||
|
print("menu.variantchip=Chip Variant")
|
||||||
print("menu.flash=Flash Size")
|
print("menu.flash=Flash Size")
|
||||||
print("menu.psram=PSRAM Size")
|
|
||||||
print("menu.psramcs=PSRAM CS")
|
print("menu.psramcs=PSRAM CS")
|
||||||
|
print("menu.psram=PSRAM Size")
|
||||||
print("menu.psramfreq=PSRAM Speed")
|
print("menu.psramfreq=PSRAM Speed")
|
||||||
print("menu.freq=CPU Speed")
|
print("menu.freq=CPU Speed")
|
||||||
print("menu.opt=Optimize")
|
print("menu.opt=Optimize")
|
||||||
|
|
@ -285,7 +293,7 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown board type " + str(chip));
|
raise Exception("Unknown board type " + str(chip));
|
||||||
BuildHeader(name, chip, tup, opts, vendor_name, product_name, vid, pid, pwr, boarddefine, name, flashsizemb * 1024 * 1024, psramsize, boot2, extra)
|
BuildHeader(name, chip, tup, opts, vendor_name, product_name, vid, pid, pwr, boarddefine, name, flashsizemb * 1024 * 1024, psramsize, boot2, extra)
|
||||||
if (name == "generic") or (name == "vccgnd_yd_rp2040"):
|
if (name == "generic") or (name == "generic_rp2350") or (name == "vccgnd_yd_rp2040"):
|
||||||
BuildFlashMenu(name, chip, 2*1024*1024, [0, 1*1024*1024])
|
BuildFlashMenu(name, chip, 2*1024*1024, [0, 1*1024*1024])
|
||||||
BuildFlashMenu(name, chip, 4*1024*1024, [0, 3*1024*1024, 2*1024*1024])
|
BuildFlashMenu(name, chip, 4*1024*1024, [0, 3*1024*1024, 2*1024*1024])
|
||||||
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
|
BuildFlashMenu(name, chip, 8*1024*1024, [0, 7*1024*1024, 4*1024*1024, 2*1024*1024])
|
||||||
|
|
@ -302,8 +310,9 @@ def MakeBoard(name, chip, vendor_name, product_name, vid, pid, pwr, boarddefine,
|
||||||
if chip == "rp2350":
|
if chip == "rp2350":
|
||||||
BuildFreq(name, 150)
|
BuildFreq(name, 150)
|
||||||
if name == "generic_rp2350":
|
if name == "generic_rp2350":
|
||||||
BuildPSRAM(name)
|
BuildRP2350Variant(name)
|
||||||
BuildPSRAMCS(name)
|
BuildPSRAMCS(name)
|
||||||
|
BuildPSRAM(name)
|
||||||
BuildPSRAMFreq(name)
|
BuildPSRAMFreq(name)
|
||||||
else:
|
else:
|
||||||
BuildFreq(name, 133)
|
BuildFreq(name, 133)
|
||||||
|
|
@ -543,6 +552,7 @@ MakeBoard("olimex_rp2040pico30_16mb", "rp2040", "Olimex", "RP2040-Pico30 16MB",
|
||||||
|
|
||||||
# Pimoroni
|
# Pimoroni
|
||||||
MakeBoard("pimoroni_pga2040", "rp2040", "Pimoroni", "PGA2040", "0x2e8a", "0x1008", 250, "PIMORONI_PGA2040", 8, 0, "boot2_w25q64jv_4_padded_checksum")
|
MakeBoard("pimoroni_pga2040", "rp2040", "Pimoroni", "PGA2040", "0x2e8a", "0x1008", 250, "PIMORONI_PGA2040", 8, 0, "boot2_w25q64jv_4_padded_checksum")
|
||||||
|
MakeBoard("pimoroni_pga2350", "rp2350", "Pimoroni", "PGA2350", "0x2e8a", "0x1018", 250, "PIMORONI_PGA2350", 16, 8, "boot2_w25q080_4_padded_checksum")
|
||||||
MakeBoard("pimoroni_pico_plus_2", "rp2350", "Pimoroni", "PicoPlus2", "0x2e8a", "0x100a", 500, "PIMORONI_PICO_PLUS_2", 16, 8, "boot2_generic_03h_4_padded_checksum")
|
MakeBoard("pimoroni_pico_plus_2", "rp2350", "Pimoroni", "PicoPlus2", "0x2e8a", "0x100a", 500, "PIMORONI_PICO_PLUS_2", 16, 8, "boot2_generic_03h_4_padded_checksum")
|
||||||
MakeBoard("pimoroni_plasma2040", "rp2040", "Pimoroni", "Plasma2040", "0x2e8a", "0x100a", 500, "PIMORONI_PLASMA2040", 2, 0, "boot2_w25q080_2_padded_checksum")
|
MakeBoard("pimoroni_plasma2040", "rp2040", "Pimoroni", "Plasma2040", "0x2e8a", "0x100a", 500, "PIMORONI_PLASMA2040", 2, 0, "boot2_w25q080_2_padded_checksum")
|
||||||
MakeBoard("pimoroni_tiny2040", "rp2040", "Pimoroni", "Tiny2040", "0x2e8a", "0x100a", 500, "PIMORONI_TINY2040", 2, 0, "boot2_w25q64jv_4_padded_checksum")
|
MakeBoard("pimoroni_tiny2040", "rp2040", "Pimoroni", "Tiny2040", "0x2e8a", "0x100a", 500, "PIMORONI_TINY2040", 2, 0, "boot2_w25q64jv_4_padded_checksum")
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
//Accelerometer
|
//Accelerometer
|
||||||
#define PIN_LIS_CS (1u)
|
#define PIN_LIS_CS (1u)
|
||||||
#define PIN_LIS_INTERRUPT1 (23u)
|
//#define PIN_LIS_INTERRUPT1 (23u)
|
||||||
#define PIN_LIS_INTERRUPT1 (25u)
|
#define PIN_LIS_INTERRUPT1 (25u)
|
||||||
|
|
||||||
//MAX31865
|
//MAX31865
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
// Pin definitions taken from:
|
// Pin definitions taken from:
|
||||||
// https://github.com/Breadstick-Innovations/Raspberry-Breadstick
|
// https://github.com/Breadstick-Innovations/Raspberry-Breadstick
|
||||||
|
|
||||||
|
|
||||||
// Serial
|
// Serial
|
||||||
#define PIN_SERIAL1_TX (20u)
|
#define PIN_SERIAL1_TX (20u)
|
||||||
#define PIN_SERIAL1_RX (21u)
|
#define PIN_SERIAL1_RX (21u)
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,8 @@ static const uint8_t D29 = __PIN_D29;
|
||||||
static const uint8_t D29 = (29u);
|
static const uint8_t D29 = (29u);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(PICO_RP2350B)
|
||||||
|
|
||||||
#ifdef __PIN_A0
|
#ifdef __PIN_A0
|
||||||
static const uint8_t A0 = __PIN_A0;
|
static const uint8_t A0 = __PIN_A0;
|
||||||
#else
|
#else
|
||||||
|
|
@ -188,6 +190,150 @@ static const uint8_t A3 = __PIN_A3;
|
||||||
static const uint8_t A3 = (29u);
|
static const uint8_t A3 = (29u);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#elif defined(PICO_RP2350B)
|
||||||
|
|
||||||
|
#ifdef __PIN_D30
|
||||||
|
static const uint8_t D30 = __PIN_D30;
|
||||||
|
#else
|
||||||
|
static const uint8_t D30 = (30u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D31
|
||||||
|
static const uint8_t D31 = __PIN_D31;
|
||||||
|
#else
|
||||||
|
static const uint8_t D31 = (31u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D32
|
||||||
|
static const uint8_t D32 = __PIN_D32;
|
||||||
|
#else
|
||||||
|
static const uint8_t D32 = (32u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D33
|
||||||
|
static const uint8_t D33 = __PIN_D33;
|
||||||
|
#else
|
||||||
|
static const uint8_t D33 = (33u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D34
|
||||||
|
static const uint8_t D34 = __PIN_D34;
|
||||||
|
#else
|
||||||
|
static const uint8_t D34 = (34u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D35
|
||||||
|
static const uint8_t D35 = __PIN_D35;
|
||||||
|
#else
|
||||||
|
static const uint8_t D35 = (35u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D36
|
||||||
|
static const uint8_t D36 = __PIN_D36;
|
||||||
|
#else
|
||||||
|
static const uint8_t D36 = (36u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D37
|
||||||
|
static const uint8_t D37 = __PIN_D37;
|
||||||
|
#else
|
||||||
|
static const uint8_t D37 = (37u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D38
|
||||||
|
static const uint8_t D38 = __PIN_D38;
|
||||||
|
#else
|
||||||
|
static const uint8_t D38 = (38u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D39
|
||||||
|
static const uint8_t D39 = __PIN_D39;
|
||||||
|
#else
|
||||||
|
static const uint8_t D39 = (39u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D40
|
||||||
|
static const uint8_t D40 = __PIN_D40;
|
||||||
|
#else
|
||||||
|
static const uint8_t D40 = (40u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D41
|
||||||
|
static const uint8_t D41 = __PIN_D41;
|
||||||
|
#else
|
||||||
|
static const uint8_t D41 = (41u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D42
|
||||||
|
static const uint8_t D42 = __PIN_D42;
|
||||||
|
#else
|
||||||
|
static const uint8_t D42 = (42u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D43
|
||||||
|
static const uint8_t D43 = __PIN_D43;
|
||||||
|
#else
|
||||||
|
static const uint8_t D43 = (43u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D44
|
||||||
|
static const uint8_t D44 = __PIN_D44;
|
||||||
|
#else
|
||||||
|
static const uint8_t D44 = (44u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D45
|
||||||
|
static const uint8_t D45 = __PIN_D45;
|
||||||
|
#else
|
||||||
|
static const uint8_t D45 = (45u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D46
|
||||||
|
static const uint8_t D46 = __PIN_D46;
|
||||||
|
#else
|
||||||
|
static const uint8_t D46 = (46u);
|
||||||
|
#endif
|
||||||
|
#ifdef __PIN_D47
|
||||||
|
static const uint8_t D47 = __PIN_D47;
|
||||||
|
#else
|
||||||
|
static const uint8_t D47 = (47u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A0
|
||||||
|
static const uint8_t A0 = __PIN_A0;
|
||||||
|
#else
|
||||||
|
static const uint8_t A0 = (40u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A1
|
||||||
|
static const uint8_t A1 = __PIN_A1;
|
||||||
|
#else
|
||||||
|
static const uint8_t A1 = (41u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A2
|
||||||
|
static const uint8_t A2 = __PIN_A2;
|
||||||
|
#else
|
||||||
|
static const uint8_t A2 = (42u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A3
|
||||||
|
static const uint8_t A3 = __PIN_A3;
|
||||||
|
#else
|
||||||
|
static const uint8_t A3 = (43u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A4
|
||||||
|
static const uint8_t A4 = __PIN_A4;
|
||||||
|
#else
|
||||||
|
static const uint8_t A4 = (44u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A5
|
||||||
|
static const uint8_t A5 = __PIN_A5;
|
||||||
|
#else
|
||||||
|
static const uint8_t A5 = (45u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A6
|
||||||
|
static const uint8_t A6 = __PIN_A6;
|
||||||
|
#else
|
||||||
|
static const uint8_t A6 = (46u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __PIN_A7
|
||||||
|
static const uint8_t A7 = __PIN_A7;
|
||||||
|
#else
|
||||||
|
static const uint8_t A7 = (47u);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const uint8_t SS = PIN_SPI0_SS;
|
static const uint8_t SS = PIN_SPI0_SS;
|
||||||
static const uint8_t MOSI = PIN_SPI0_MOSI;
|
static const uint8_t MOSI = PIN_SPI0_MOSI;
|
||||||
static const uint8_t MISO = PIN_SPI0_MISO;
|
static const uint8_t MISO = PIN_SPI0_MISO;
|
||||||
|
|
|
||||||
8
variants/pimoroni_pga2350/pins_arduino.h
Normal file
8
variants/pimoroni_pga2350/pins_arduino.h
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Enables external PSRAM
|
||||||
|
#define RP2350_PSRAM_CS 47
|
||||||
|
#define PICO_RP2350B 1
|
||||||
|
|
||||||
|
// This is a bare board with no real predefined pins, so use generic
|
||||||
|
#include "../generic/pins_arduino.h"
|
||||||
Loading…
Reference in a new issue