Skip to content

added SPI class transmission - #48

Draft
AleksandraFomina wants to merge 3 commits into
jonas-merkle:masterfrom
VBCores:master
Draft

added SPI class transmission#48
AleksandraFomina wants to merge 3 commits into
jonas-merkle:masterfrom
VBCores:master

Conversation

@AleksandraFomina

Copy link
Copy Markdown

Added the ability to change the SPI interface pins to which MISO, MOSI and SCK are connected. First we initialize SPI class using SPIClass::SPIClass(uint8_t mosi, uint8_t miso, uint8_t sclk) constructor, more details in documentation https://github.com/stm32duino/Arduino_Core_STM32/wiki/API#built-in-library, and then pass it to SPI initialization function.

    modified:   src/AS5047P.cpp
    modified:   src/AS5047P.h
modified:   src/spi/AS5047P_SPI_Arduino.cpp
modified:   src/spi/AS5047P_SPI_Arduino.h

	modified:   src/AS5047P.h
	modified:   src/spi/AS5047P_SPI_Arduino.cpp
	modified:   src/spi/AS5047P_SPI_Arduino.h
@jonas-merkle

Copy link
Copy Markdown
Owner

Hey @AleksandraFomina 👋🏼
Thanks for your contribution! 🎉
In itself, I find your idea with the expansion of interchangeable SPI pins great. But I'm afraid that with your changes the library loses compatibility with Arduinos that are not based on a STM32 chip. That's why I can't merge your changes at the moment. You would have to separate the implementation for STM32 based chips from the other implementation and use e.g. preprocessor instructions to switch between the implementations. If you have time to come up with something like that it would be great and an enrichment for the library.

@jonas-merkle
jonas-merkle marked this pull request as draft July 13, 2023 13:46
@jonas-merkle jonas-merkle self-assigned this Jul 13, 2023
@jonas-merkle jonas-merkle added the enhancement New feature or request label Jul 13, 2023
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