Skip to content

In new SD library several functions are now disabled #6081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luc-github opened this issue May 13, 2019 · 2 comments · Fixed by #6092
Closed

In new SD library several functions are now disabled #6081

luc-github opened this issue May 13, 2019 · 2 comments · Fixed by #6092
Assignees
Milestone

Comments

@luc-github
Copy link
Contributor

Basic Infos

  • [ x] This issue complies with the issue POLICY doc.
  • [ x] I have read the documentation at readthedocs and the issue is not addressed there.
  • [x ] I have tested that the issue is present in current master branch (aka latest git).
  • [x ] I have searched the issue tracker for a similar issue.
  • [ x] If there is a stack dump, I have decoded it.
  • [x ] I have filled out all fields below.

Platform

  • Hardware: ESP-12
  • Core Version: latest git / 2.5.1
  • Development Env: Arduino IDE
  • Operating System: Windows

Settings in IDE

  • Module: Generic ESP8266 Module
  • Flash Mode: dio
  • Flash Size: 4MB
  • lwip Variant: v2 Lower Memory
  • Reset Method: ck
  • Flash Frequency: 40Mhz
  • CPU Frequency: 160MHz
  • Upload Using: SERIAL
  • Upload Speed: 115200

As requested in gitter here are the disabled functions:

uint8_t type() {
        return 0;//card.type();
    }
    uint8_t fatType() {
        return 0;//volume.fatType();
    }
    size_t blocksPerCluster() {
        return 0;//volume.blocksPerCluster();
    }
    size_t totalClusters() {
        return 0;//volume.clusterCount();
    }
    size_t totalBlocks() {
        return 0;//(totalClusters() / blocksPerCluster());
    }
    size_t clusterSize() {
        return 0;//blocksPerCluster() * blockSize();
    }
    size_t size() {
        return 0;//(clusterSize() * totalClusters());
    }
@earlephilhower earlephilhower added this to the 2.6.0 milestone May 13, 2019
@earlephilhower earlephilhower self-assigned this May 13, 2019
earlephilhower added a commit to earlephilhower/Arduino that referenced this issue May 14, 2019
Fixes esp8266#6081

The SD rewrite blanked out some of the internal FAT info.. Restore the
function calls and return proper values.
@earlephilhower
Copy link
Collaborator

@luc-github I did some basis sanity, and it looks good to me. Give the PR a go and chime in if you have any issues.

@luc-github
Copy link
Contributor Author

Ok thank you
I will test and feedback

earlephilhower added a commit that referenced this issue May 19, 2019
Fixes #6081

The SD rewrite blanked out some of the internal FAT info.. Restore the
function calls and return proper values.

Because size() is used in many printf()s, we can't just change its
return type to uint64.  Instead, when size is > size-max warn.

Add SD.size64 which can be used by new apps who care about >4GB cards.
Prints a warning if debugging enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants