Nick Fiege

Results 57 comments of Nick Fiege

> Another addition: This driver thould use the [`SpiDevice`](https://docs.modm.io/develop/api/nucleo-f429zi/classmodm_1_1SpiDevice.html) abstraction and should make use of `void attachConfigurationHandler(Spi::ConfigurationHandler handler)`! @kikass13: We need this, because we have multiple MCP2515 and one ADIS16470...

> > 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...

> @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...

SpiDevice test seems to be broken? Or did I do something wrong? * https://github.com/modm-io/modm/runs/5065030473?check_suite_focus=true

> 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,...

> I think there is no need for runtime polymorphism and dynamic dispatch for that use case. static polymorph is a thing :/

> > 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...

> > 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...

> > The modern way would be to write a exec function and provide a lambda. > > Yes, but that does not work with resumable function macros. The resumable...

Every step in the direction of zero-copy is a good step. I am slightly annoyed by the fact the erpc still uses heap (for no reason). Nothing some static buffers...