adafruit / Adafruit_FRAM_SPI

Driver for Adafruit's SPI-Based FRAM Breakouts
Other
34 stars 30 forks source link

Added bool return types to the SPI functions that doesn't return anything #29

Closed alba-ado closed 9 months ago

alba-ado commented 9 months ago

Hello,

I noticed that write and read functions of this library does not return anything, even though the Adafruit_SPI instance returns a bool value. Thus, I added bool returns to the read and write functions except write8 and getStatusRegister functions because they return a uint8_t value. I didn't touch these parts not to break compatibility with anyone. If it is possible, they may need this change as well in the future. Without the bool return value, we may not understand if the SPI operation was successful or not. The changes compile but I didn't test this library on real hardware. But, the changes are minimal and it should be ok as far as I can see. If any mistakes occur, I will make another pull request.

Thanks for the library.

alba-ado commented 9 months ago

I removed the spaces on the if condition like you said. I hope this will be enough. Is there a need to update the library version as well or will it be done automatically?