SpenceKonde / ATTinyCore

Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8
Other
1.53k stars 301 forks source link

Compile error when using SPI library #795

Closed jagot closed 10 months ago

jagot commented 10 months ago

There is no byte result; in the reverse function anymore, preventing the compilation: https://github.com/SpenceKonde/ATTinyCore/blob/1747efb854aba023332a5808bce5dee2b901fdc4/avr/libraries/SPI/SPI.cpp#L282-L302

I am not too good with assembly, but it seems that the reverse operation is performed in-place, and the result is then stored in x. I tried deleting the return statement, and the code compiles, but with a warning for missing return statement in a non-void function.

sleemanj commented 10 months ago

I believe return(result) shoudl be return(x)

jagot commented 10 months ago

Of course! That makes total sense.