STM32SD icon indicating copy to clipboard operation
STM32SD copied to clipboard

File inherits from Stream: proper support for print and println of al…

Open pschatzmann opened this issue 1 year ago • 0 comments

Summary

File must inherit from Stream: proper support for print and println of all supported data types. The motivation for this, was that in all other SD libraries the File impelmentation is a subclass of Stream which itself is a subclass of Print.

With this change we can now also provide the files of this library to any Arduino function which expects a Stream or a Print.

Validation

I extended the test sketch Full.ino to test the readBytes() method and the printing of an integer.

Closing issues

I did not file any issue but decided to submit a pull request directly to speed up things. see https://github.com/orgs/stm32duino/discussions/2428

pschatzmann avatar Jul 10 '24 10:07 pschatzmann