Skip to content

BUG: Library is unable to share SPI device or specify custom ports #51

Description

@petrkr

Libraries should NOT initialize other hardware than for which is that library written. For example here you initialize SPI without parameters, which leads this library does not work on other than default pins defined somewhere in Arduino pinout.

Library should NOT change parameters of used interfaces like SPI, instead user must pass SPI object instead..

Also it can not change speed or SPI mode, because it may cause collisions with other hardwars on same bus (Mode must be same, but speed may broke something what does not support such fast SPI or slow down fast device like SPI ethernet or TFT screen).

I suggest to use SPI Class instead doing SPI.begin() Something like here is TwoWire used https://github.com/petrkr/SegLCDLib/blob/master/src/SegDriver_PCx85.h#L38

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions