Rahix / avr-hal

embedded-hal abstractions for AVR microcontrollers
Apache License 2.0
1.33k stars 225 forks source link

Implement the SpiBus trait from embedded-hal 1.0. #503

Closed ghismary closed 8 months ago

ghismary commented 10 months ago

Here is the implementation of the embedded-hal 1.0 traits for SPI. I need to do further testing, but from what I have seen up to now, it seems to work quite well.

ghismary commented 10 months ago

Hi, thanks for your comments. I had not seen this stuff about hardware CS management, and had not taken a look to embedded-hal-bus yet. It makes sense, I'll rework on that.

ghismary commented 10 months ago

I made the changes for the problems reported in the previous comments. I also adapted an arduino example to the usage of this SpiBus trait implementation via the ExclusiveDevice from embedded-hal-bus.

Rahix commented 8 months ago

@ghismary, thanks a lot for your work on this. @rubend056 picked up your changeset and incorporated my review comments over in #517. We'll continue work there - but I'll make sure you will keep appropriate credit for your work in the merged changes.