File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -371,14 +371,23 @@ namespace SDLib {
371
371
372
372
@return Returns the volume size in kB of the first volume/partition
373
373
*/
374
- uint32_t SDClass::getvolumesize ()
374
+ uint32_t SDClass::getVolumeSize ()
375
375
{
376
376
uint32_t volumesize = volume.blocksPerCluster (); // clusters are collections of blocks
377
- volumesize *= volume.clusterCount (); // we'll have a lot of clusters
378
- volumesize /= 2 ;
377
+ volumesize *= volume.clusterCount (); // we'll have a lot of clusters
378
+ volumesize /= 2 ;
379
379
return (volumesize); // 2 blocks make 1kB
380
380
}
381
-
381
+
382
+ /* *
383
+ Get card type
384
+ @return 0:none, 1:SDv1, 2:SDv2, 3:SDHC
385
+ */
386
+ uint8_t SDClass::getCardType ()
387
+ {
388
+ return card.type ();
389
+ }
390
+
382
391
// call this when a card is removed. It will allow you to insert and initialise a new card.
383
392
void SDClass::end () {
384
393
root.close ();
Original file line number Diff line number Diff line change @@ -106,8 +106,10 @@ namespace SDLib {
106
106
return rmdir (filepath.c_str ());
107
107
}
108
108
109
- uint32_t getvolumesize ();
109
+ uint32_t getVolumeSize ();
110
110
111
+ uint8_t getCardType ();
112
+
111
113
private:
112
114
113
115
// This is used to determine the mode used to open a file
You can’t perform that action at this time.
0 commit comments