Skip to content

Conversation

@Intubun
Copy link
Contributor

@Intubun Intubun commented Oct 1, 2022

Added the the Option to choose the 2nd SPI Bus on the RP2040 with the RP2040. Added also the specific commands to change the Bus pins on the RP2040. Added some documentation as well. The Addition is intended for the arduino-pico library by earlephilhower https://github.com/earlephilhower/arduino-pico

(At the moment the edits are validated on the original Pico board and the MCP4822)

Added the SPI1 as selection option, for useing both cores to write to an MCP DAC
@Intubun
Copy link
Contributor Author

Intubun commented Oct 1, 2022

Btw. I also added the current version in the pull request for a possible release...

@RobTillaart RobTillaart self-assigned this Oct 1, 2022
@RobTillaart RobTillaart added the enhancement New feature or request label Oct 1, 2022
@RobTillaart
Copy link
Owner

Thanks for the addition
Will check it later this weekend.
(Might be usefull for other SPI based libs too)

@Intubun
Copy link
Contributor Author

Intubun commented Oct 1, 2022

Yeah, I think so too... I also (if this one will pass) am planning to add this capability to some other libs, which I need for a upcoming project...

@RobTillaart
Copy link
Owner

  • If you comment the RP2040 from the - .arduino-ci.yml file at the specific example, build will succeed
  • I will update all the version strings etc in the lib / meta files after the merge of this one
    • .cpp, library.json, library.properties.

@RobTillaart
Copy link
Owner

Had a quick look, and I could not find any RPI pico / RP2040 workflow to test the library.
I you find one it should be added to the workflows folder.

@RobTillaart
Copy link
Owner

RobTillaart commented Oct 1, 2022

@Intubun

Found how to add a platform to the build-CI.

Edit .arduino-ci.yml

Had to install the boards support for the pico (packages part) - https://github.com/earlephilhower/arduino-pico
Found the board and package definition in the boards.txt file of the installed package
The define might not be needed..

platforms:
  rpipico:
    board: rp2040:rp2040:rpipico
    package: rp2040:rp2040
    gcc:
      features:
      defines:
        - ARDUINO_ARCH_RP2040
      warnings:
      flags:

packages:
  rp2040:rp2040:
    url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json


compile:
  # Choosing to run compilation tests on 2 different Arduino platforms
  platforms:
    - uno
    # - due
    # - zero
    # - leonardo
    # - m4
    # - esp32
    # - esp8266
    # - mega2560
    - rpipico

@Intubun
Copy link
Contributor Author

Intubun commented Oct 1, 2022

So, it was only an Issue with the check not knowing the RP2040, right?

@Intubun
Copy link
Contributor Author

Intubun commented Oct 2, 2022

Soo... Ive changed the code slightly... Should work now... It uses now only one variable for the bus selection, like the ESP32...

@Intubun
Copy link
Contributor Author

Intubun commented Oct 2, 2022

Sorry forgot to change the .arduino-ci.yml for the test...

@RobTillaart
Copy link
Owner

So, it was only an Issue with the check not knowing the RP2040, right?

Yes, the changes themselves looked good (few minor things).

Now I know how to add RP2040 testing I plan to add it to all my other 150++ libraries, see if they are portable.
(will take some time..)

... add this capability to some other libs, which I need for a upcoming project...

Can you tell which libraries?
And what your project is about? (if it is confidential, I understand)

@RobTillaart
Copy link
Owner

Build succeeds 😎 well done!

@RobTillaart RobTillaart merged commit c12185e into RobTillaart:master Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants