mirror of
https://github.com/DFRobot/DFRobotDFPlayerMini.git
synced 2026-02-20 01:51:20 +01:00
add function to count folders on current device
This commit is contained in:
@@ -458,6 +458,16 @@ int DFRobotDFPlayerMini::readFileCountsInFolder(int folderNumber){
|
||||
}
|
||||
}
|
||||
|
||||
int DFRobotDFPlayerMini::readFolderCounts(){
|
||||
sendStack(0x4F);
|
||||
if (waitAvailable()) {
|
||||
return read();
|
||||
}
|
||||
else{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int DFRobotDFPlayerMini::readFileCounts(){
|
||||
readFileCounts(DFPLAYER_DEVICE_SD);
|
||||
}
|
||||
|
||||
@@ -186,6 +186,8 @@ class DFRobotDFPlayerMini {
|
||||
int readFileCountsInFolder(int folderNumber);
|
||||
|
||||
int readFileCounts();
|
||||
|
||||
int readFolderCounts();
|
||||
|
||||
int readCurrentFileNumber();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user