almusil / rfm69

A generic rust driver to support RFM69 family wireless chips.
Apache License 2.0
9 stars 9 forks source link

Work better with linux_embedded_hal #28

Closed qwandor closed 3 years ago

qwandor commented 3 years ago

Using SPI transactions for reading and writing registers prevents spidev from releasing the CS line in the middle. Also added a constructor which doesn't take a CS pin, because when using linux_embedded_hal spidev manages it automatically.

Fixes #26.

qwandor commented 3 years ago

Okay, I've added a new constructor with a wrapper struct to support SPI implementations which only implement Write and Transfer.It does make the type a little uglier unfortunately, but I couldn't see any way around that.

qwandor commented 3 years ago

Done.