Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a35d94

Browse files
feat(SDFS): Add destructor for SD card to clean up resources (#11521)
* feat(test): Enhance NVS test* fix(nvs): Remove unused Unity header and improve Serial wait loop* refactor(nvs): Extract string increment logic into a separate function* refactor(test): Format long strings in expect_exact calls for better readability* feat(SDFS): Add destructor to clean up resources
1 parent875b923 commit9a35d94

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎libraries/SD/src/SD.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ using namespace fs;
2222

2323
SDFS::SDFS(FSImplPtr impl) : FS(impl), _pdrv(0xFF) {}
2424

25+
SDFS::~SDFS() {
26+
end();
27+
}
28+
2529
boolSDFS::begin(uint8_t ssPin, SPIClass &spi,uint32_t frequency,constchar *mountpoint,uint8_t max_files,bool format_if_empty) {
2630
if (_pdrv !=0xFF) {
2731
returntrue;

‎libraries/SD/src/SD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class SDFS : public FS {
2626

2727
public:
2828
SDFS(FSImplPtr impl);
29+
~SDFS();
2930
boolbegin(
3031
uint8_t ssPin = SS, SPIClass &spi = SPI,uint32_t frequency =4000000,constchar *mountpoint ="/sd",uint8_t max_files =5,bool format_if_empty =false
3132
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp