-
Notifications
You must be signed in to change notification settings - Fork 72
Add Pico2 support #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
elral
wants to merge
48
commits into
MobiFlight:main
Choose a base branch
from
elral:Pico2_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Pico2 support #368
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
3e6fa13
first upload
elral 3f1f3bd
add generic RP2350B board
elral 2d32c2a
fixed wrong FirmwareBaseName
elral d65e2ec
reduce frequnecy for shifting data
elral 7d23654
fixed wrong reset file
elral e0d6204
preliminary board definition to get every board compiled
elral c7c32cd
better difines for the boards
elral c73ce6e
for testing inject branch for Pico 2 from Earle Phil Hower
elral 276eec1
Fixed wrong VID/PID for RP2350 boards
elral b354518
Merge branch 'RP2350_support' of https://github.com/elral/MobiFlight-…
elral efcab5b
RP2350 has same define as RP2040
elral 47050c8
increase message size
elral 0e64718
fixed wrong messagebuffer size
elral a58e1e6
platform is released for Pico 2 support
elral e5de049
no platform packages required, fixed wronf type definition for Pico2
elral 65ab83f
Merge branch 'main' into RP2350_support
elral 369263e
add generic B variant
elral e25cb4b
fixed wrong volumeLabel
elral dab43a7
fixed naming in comment from .ini file
elral 9994df5
add preliminary VID/PID
elral 02a7a44
fixed wrong volume label for Pico2
elral a0dd286
revert PID/VID changes
elral d76217d
add reset file for Pico2
elral 65e387d
again adding VID/PID, EEPROM clear takes them from Pico
elral d72ab1a
generic Pico2 variants moved to Template repo
elral 8658432
Merge branch 'MobiFlight:main' into RP2350_support
elral 64e8159
Merge branch 'MobiFlight:main' into RP2350_support
elral 2f830a5
UniqueID not for Pico2 for now
elral 3cfffab
Merge branch 'RP2350_support' of https://github.com/elral/MobiFlight-…
elral 9309de6
own implementation of getting UniqueID
elral 3ca6c67
don't use UniquieID only for Pico2 with PSRAM
elral d9139cb
correct PID for pico2 via setting in platformio.ini file
elral 8bba619
Merge branch 'MobiFlight:main' into RP2350_support
elral 1f5b386
Merge branch 'MobiFlight:main' into RP2350_support
elral 422d30e
Merge branch 'main' into RP2350_support
elral a3ffa1e
use board file from Pico
elral c10c921
Merge branch 'MobiFlight:main' into RP2350_support
elral bfcfa24
Merge branch 'MobiFlight:main' into RP2350_support
elral 52fdd00
Merge branch 'MobiFlight:main' into RP2350_support
elral ca0cde8
Merge branch 'MobiFlight:main' into RP2350_support
elral 886a635
Merge branch 'MobiFlight:main' into Pico2_support
elral d73663e
add Pico2 reset file, move Pico2 json file to new folder structure
elral 1dd3193
add picture for Pico2
elral 29e260f
read SN for Pico2 from chip and not flash
elral e7b92d0
Update src/MF_Modules/MFShiftData.cpp
elral a4de518
comment shortened acc. copilot
elral c61aade
Merge branch 'Pico2_support' of https://github.com/elral/MobiFlight-F…
elral e74f838
changes according copilot
elral File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,202 @@ | ||
| { | ||
| "$schema": "./mfboard.schema.json", | ||
| "UsbDriveSettings": { | ||
| "VolumeLabel": "RP2350", | ||
| "VerificationFileName": "INFO_UF2.TXT" | ||
| }, | ||
| "Connection": { | ||
| "ConnectionDelay": 1250, | ||
| "DelayAfterFirmwareUpdate": 1250, | ||
| "DtrEnable": true, | ||
| "EEPROMSize": 1496, | ||
| "ExtraConnectionRetry": false, | ||
| "ForceResetOnFirmwareUpdate": true, | ||
| "MessageSize": 96 | ||
| }, | ||
| "HardwareIds": ["^VID_2E8A&PID_F00A"], | ||
| "Info": { | ||
| "CanInstallFirmware": true, | ||
| "CanResetBoard": true, | ||
| "FirmwareBaseName": "mobiflight_raspberrypico2", | ||
| "FirmwareExtension": "uf2", | ||
| "FriendlyName": "Raspberry Pico2", | ||
| "LatestFirmwareVersion": "0.0.1", | ||
| "MobiFlightType": "MobiFlight RaspiPico2", | ||
| "ResetFirmwareFile": "reset.raspberry_pico2_1_0_2.uf2" | ||
| }, | ||
| "ModuleLimits": { | ||
| "MaxAnalogInputs": 3, | ||
| "MaxInputShifters": 6, | ||
| "MaxButtons": 26, | ||
| "MaxEncoders": 13, | ||
| "MaxLcdI2C": 2, | ||
| "MaxLedSegments": 6, | ||
| "MaxOutputs": 26, | ||
| "MaxServos": 8, | ||
| "MaxShifters": 6, | ||
| "MaxSteppers": 6, | ||
| "MaxInputMultiplexer": 6, | ||
| "MaxCustomDevices": 0 | ||
| }, | ||
| "Pins": [ | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 0 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 1 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 2 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 3 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": true, | ||
| "isPWM": true, | ||
| "Pin": 4 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": true, | ||
| "isPWM": true, | ||
| "Pin": 5 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 6 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 7 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 8 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 9 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 10 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 11 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 12 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 13 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 14 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": true, | ||
| "Pin": 15 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 16 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 17 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 18 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 19 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 20 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 21 | ||
| }, | ||
| { | ||
| "isAnalog": false, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Pin": 22 | ||
| }, | ||
| { | ||
| "isAnalog": true, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Name": "A0", | ||
| "Pin": 26 | ||
| }, | ||
| { | ||
| "isAnalog": true, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Name": "A1", | ||
| "Pin": 27 | ||
| }, | ||
| { | ||
| "isAnalog": true, | ||
| "isI2C": false, | ||
| "isPWM": false, | ||
| "Name": "A2", | ||
| "Pin": 28 | ||
| } | ||
| ] | ||
| } |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #include "MFShiftData.h" | ||
|
|
||
| uint8_t shiftInData(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) | ||
| { | ||
| uint8_t value = 0; | ||
| uint8_t i; | ||
|
|
||
| for (i = 0; i < 8; ++i) { | ||
| if (bitOrder == LSBFIRST) | ||
| value |= digitalRead(dataPin) << i; | ||
| else | ||
| value |= digitalRead(dataPin) << (7 - i); | ||
| digitalWrite(clockPin, HIGH); | ||
| digitalWrite(clockPin, LOW); | ||
| #if !defined(ARDUINO_ARCH_AVR) && !defined(ARDUINO_ARCH_RP2040) | ||
| delayMicroseconds(1); | ||
| #endif | ||
| } | ||
| return value; | ||
| } | ||
|
|
||
| void shiftOutData(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) | ||
| { | ||
| uint8_t i; | ||
|
|
||
| for (i = 0; i < 8; i++) { | ||
| if (bitOrder == LSBFIRST) { | ||
| digitalWrite(dataPin, val & 1); | ||
| val >>= 1; | ||
| } else { | ||
| digitalWrite(dataPin, (val & 128) != 0); | ||
| val <<= 1; | ||
| } | ||
|
|
||
| digitalWrite(clockPin, HIGH); | ||
| digitalWrite(clockPin, LOW); | ||
| #if !defined(ARDUINO_ARCH_AVR) && !defined(ARDUINO_ARCH_RP2040) | ||
| delayMicroseconds(1); | ||
| #endif | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #pragma once | ||
|
|
||
| #include <Arduino.h> | ||
|
|
||
| uint8_t shiftInData(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); | ||
| void shiftOutData(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.