Skip to content
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

Add multiple SPI devices for Radio, Display, and Touchscreen #3638

Merged
merged 16 commits into from
Apr 17, 2024

Conversation

jp-bennett
Copy link
Collaborator

@jp-bennett jp-bennett commented Apr 16, 2024

This changeset gives us the ability to specify a separate SPI device for the LoRa, Display, and Touchscreen. The changes in Portduino also add support for specifying a new SPI speed for each transaction. All together, this means that we can let the Linux OS manage the CS lines, and also get much faster SPI speeds, leading to better framerates.

@jp-bennett jp-bennett marked this pull request as ready for review April 16, 2024 04:43
@mverch67
Copy link
Collaborator

mverch67 commented Apr 17, 2024

Some general comments:

  • it would be good to have detailed information about what's going on here in this PR. There is no single line of description provided (not only) to this PR
  • the entire bus_spi class from lovyanGFX was copied into the firmware folder without providing any insight why this was necessary and what has been changed. Preferably you'd derive from Bus_SPI instead of IBus and overwrite virtual methods where necessary (including comments what's changed) rather than doing copy&paste. Furthermore in C++ the filename should be identical with the class name (bus_spi.h vs class Mesh_Bus_SPI).
  • when migrating PORTDUINO to device-ui support the bus_spi changes will become superfluous anyway

@jp-bennett
Copy link
Collaborator Author

jp-bennett commented Apr 17, 2024

Some general comments:

  • it would be good to have detailed information about what's going on here in this PR. There is no single line of description provided (not only) to this PR

That's fair. Will add.

  • the entire bus_spi class from lovyanGFX was copied into the firmware folder without providing any insight why this was necessary and what has been changed. Preferably you'd derive from Bus_SPI instead of IBus and overwrite virtual methods where necessary (including comments what's changed) rather than doing copy&paste. Furthermore in C++ the filename should be identical with the class name (bus_spi.h vs class Mesh_Bus_SPI).

I don't know that the current upstream Lovyan makes enough of the class available to do this. Most notably, _cfg is private instead of protected. I'll do the rename.

  • when migrating PORTDUINO to device-ui support the bus_spi changes will become superfluous anyway

The old UI isn't completely going away, is it? I'd like to keep it accessible on Native also, as a development tool.

@jp-bennett jp-bennett merged commit d47e9be into master Apr 17, 2024
71 checks passed
@jp-bennett jp-bennett deleted the multi-SPI branch April 17, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants