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

SPI: pin configuration is not flexible enough #2511

Closed
Tracked by #2494
bugadani opened this issue Nov 9, 2024 · 1 comment · Fixed by #2557
Closed
Tracked by #2494

SPI: pin configuration is not flexible enough #2511

bugadani opened this issue Nov 9, 2024 · 1 comment · Fixed by #2557
Labels
1.0-blocker api bug Something isn't working help wanted Extra attention is needed peripheral:spi SPI peripheral
Milestone

Comments

@bugadani
Copy link
Contributor

bugadani commented Nov 9, 2024

Currently, we take Output pins for both MOSI and MISO. This creates some problems with devices like M5CoreS3 SE which uses a full-duplex SPI for the SD card, and a 3-wire simplex SPI setup for the display, reusing the MISO pin as the DC output.

Currently we can't work with this device safely.

cc #2494

@bugadani bugadani added the bug Something isn't working label Nov 9, 2024
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Nov 9, 2024
@bugadani bugadani added help wanted Extra attention is needed api peripheral:spi SPI peripheral status:needs-attention This should be prioritized labels Nov 9, 2024
@MabezDev MabezDev added 1.0-blocker and removed status:needs-attention This should be prioritized labels Nov 22, 2024
@thepeak99
Copy link

Hi!

I'm having the same issue with the "Cheap Yellow Display" (https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display), in that board the GPIO39 (an input-only pin in the ESP32) is the MISO for the touch screen, since the .with_miso() function requires a PeripheralOutput... it doesn't work. .with_mosi() also requires a PeripheralOutput but that makes sense of course.

I made a local fork of esp_hal and changed it so that it'll take a PeripheralInput and it works.

Interestingly this is only in the master.rs file... in slave.rs it uses a PeripheralOutput for MISO and a PeripheralInput for MOSI (the input/outpit directions are reversed, which makes sense since it is from the slave's perspective).

@MabezDev MabezDev added this to the 1.0.0-beta.0 milestone Jan 7, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0-blocker api bug Something isn't working help wanted Extra attention is needed peripheral:spi SPI peripheral
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants