Christopher Durand
Christopher Durand
> Off-topic discussion: In the case mentioned above the SPI clock has to be limited to 1MHz or 2MHz (ADIS16470 limitation), but for the MCP2515 a higher SPI clock would...
@rleh I have quickly hacked together a sub-optimal implementation for switching the SPI baudrate with multiple devices. This is just a rough proof of concept for STM32 only and makes...
> I don't know what that is bit I'll look into it tomorrow (after our work meeting stuff) The configuration handler is actually quite simple. If you have multiple devices...
> SpiDevice test seems to be broken? Or did I do something wrong? > > * https://github.com/modm-io/modm/runs/5065030473?check_suite_focus=true That is because of my experimental commit that was cherry-picked. It is only...
> I think it would actually make sense to force all SPI drivers to always set all "relevant" SPI options, everything else doesn't work consistently and leads to strange behavior,...
> Well I dont see why the SpiDevice is currently not a default base class with mandatory (pure virtual) overrides. I think there is no need for runtime polymorphism and...
> To enforce this I would suggest to implement these three values (with usable default values) in addition to the configurationHandler in the SpiDevice. The SpiDevice class is able to...
> static polymorph is a thing :/ Yes, but it is normally not done using `virtual` functions. A classic C++ pattern for static polymorphism is for example [CRTP](https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern). De-virtualization optimizations...
> either pure virtual or a crtp adapter, where release and acquire master is done in every spi command automatically. you mutex bus access (which is a wise thing to...
> In that case the driver cannot know this and thus setting a higher speed automatically is bad. I 100% agree, but for the SPI mode it makes sense that...