arduino-libraries / SD

SD Library for Arduino
http://arduino.cc/
GNU General Public License v3.0
181 stars 154 forks source link

Protected access or getters for fields 'card', 'volume' and 'root' #133

Open F-Schmidt99 opened 1 year ago

F-Schmidt99 commented 1 year ago

Please either change the visibility of the fields in the title to protected or implement getters returning references to the according object variables. This would allow further inheritance and an efficient way to display SD card details and use the same object to also read/write to SD.

With the current implementation, one has to set up an Sd2Card object just to obtain the type (and other card information) and then an additional SD object, which has an Sd2Card field. This does not make much sense.

leftCoast commented 3 months ago

I'll do it. I want this for my stuff anyway.

-jim lee