Merge pull request #34 from adafruit/fix-backward-compatible-cardsize
allow cardSize() for backward compatible with v1
This commit is contained in:
commit
96a164f548
1 changed files with 3 additions and 1 deletions
|
|
@ -236,7 +236,9 @@ class SdSpiCard {
|
||||||
uint32_t sectorCount();
|
uint32_t sectorCount();
|
||||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||||
// Use sectorCount(). cardSize() will be removed in the future.
|
// Use sectorCount(). cardSize() will be removed in the future.
|
||||||
uint32_t __attribute__((error("use sectorCount()"))) cardSize();
|
uint32_t __attribute__((warning("use sectorCount()"))) cardSize() {
|
||||||
|
return sectorCount();
|
||||||
|
}
|
||||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||||
/** Set SPI sharing state
|
/** Set SPI sharing state
|
||||||
* \param[in] value desired state.
|
* \param[in] value desired state.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue