simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
1.94k stars 510 forks source link

[FEATURE] Allowing to choose SPI pins #375

Closed sylque closed 5 months ago

sylque commented 5 months ago

Is your feature request related to a problem? Please describe. On my ESP32, I can choose any GPIO pins for SPI. Unfortunately, it seems SimpleFOC only allows for the two sets of default SPI pins (HSPI and VSPI), like this:

static SPIClass spi(HSPI);
sensor.init(&spi);

Describe the solution you'd like

sensor.init(int8_t sck=-1, int8_t miso=-1, int8_t mosi=-1, int8_t ss=-1);
runger1101001 commented 5 months ago

This bug is being handled here: https://github.com/simplefoc/Arduino-FOC-drivers/issues/37

So I will close this issue now.