module:microcontroller:esp32sdcarddemo:esp32sdcarddemo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
module:microcontroller:esp32sdcarddemo:esp32sdcarddemo [2022/11/03 14:58] – omdevelop | module:microcontroller:esp32sdcarddemo:esp32sdcarddemo [2022/11/07 18:57] (current) – omdevelop | ||
---|---|---|---|
Line 2: | Line 2: | ||
[[http:// | [[http:// | ||
[[http:// | [[http:// | ||
- | [[http:// | + | [[http:// |
- | [[http:// | + | [[http:// |
===== Überblick ===== | ===== Überblick ===== | ||
- | * Esp32SDCardDemo zeigt folgende in der Klasse CSDCard gekapselten File- und Directory-Funktionen: | + | * Permanentes Schreiben von Daten auf SDCard (/ |
- | * // Instance | + | |
+ | * SubDirectories/ | ||
+ | * Esp32SDCardDemo zeigt folgende in der Klasse CSDCard gekapselten File- und Directory-Funktionen: | ||
+ | * || Instance | ||
* CSDCard(int pinss, TMessage pmessage, TError perror); | * CSDCard(int pinss, TMessage pmessage, TError perror); | ||
* bool Initialise(void); | * bool Initialise(void); | ||
- | * // Property | + | * || Property |
* bool IsEndOfFile(void); | * bool IsEndOfFile(void); | ||
* ECardType GetCardType(void); | * ECardType GetCardType(void); | ||
* uint64_t GetCardSizeMB(void); | * uint64_t GetCardSizeMB(void); | ||
- | * // WriteFile | + | * || WriteFile |
* bool OpenWrite(const char* fileentry); | * bool OpenWrite(const char* fileentry); | ||
* bool OpenAppend(const char* fileentry); | * bool OpenAppend(const char* fileentry); | ||
Line 21: | Line 24: | ||
* bool WriteLine(const char* line); | * bool WriteLine(const char* line); | ||
* bool CloseWrite(void); | * bool CloseWrite(void); | ||
- | * // ReadFile | + | * || ReadFile |
* bool OpenRead(const char* fileentry); | * bool OpenRead(const char* fileentry); | ||
* bool ReadCharacter(char & | * bool ReadCharacter(char & | ||
Line 27: | Line 30: | ||
* bool ReadLine(char* line); | * bool ReadLine(char* line); | ||
* bool CloseRead(void); | * bool CloseRead(void); | ||
- | * // File | + | * || File |
* bool RenameFile(const char* entrysource, | * bool RenameFile(const char* entrysource, | ||
* bool RemoveFile(const char * entry); | * bool RemoveFile(const char * entry); | ||
- | * // Directory | + | * || Directory |
* bool ListDirectory(const char* entry); | * bool ListDirectory(const char* entry); | ||
* bool CreateDirectory(const char* entry); | * bool CreateDirectory(const char* entry); | ||
Line 100: | Line 103: | ||
#endif // SDCard_h | #endif // SDCard_h | ||
</ | </ | ||
+ | |||
+ | * Geschachteltes Anlegen von geschachtelten Verzeichnissen: | ||
+ | * (SubDirectories müssen Ebene für Ebene einzeln angelegt werden) | ||
+ | * (SubDirectories/ | ||
+ | < | ||
+ | const char* DIRECTORY_MAIN | ||
+ | const char* DIRECTORY_SUBYY | ||
+ | const char* DIRECTORY_SUBMM | ||
+ | const char* DIRECTORY_SUBDD | ||
+ | </ | ||
+ | | ||
+ | < | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.CreateDirectory(DIRECTORY_SUBYY); | ||
+ | // | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.CreateDirectory(DIRECTORY_SUBMM); | ||
+ | // | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.CreateDirectory(DIRECTORY_SUBDD); | ||
+ | </ | ||
+ | * Geschachteltes Listing der SubDirectories: | ||
+ | < | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.ListDirectory(DIRECTORY_MAIN); | ||
+ | // | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.ListDirectory(DIRECTORY_SUBYY); | ||
+ | // | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.ListDirectory(DIRECTORY_SUBMM); | ||
+ | // | ||
+ | _Message(LINE_SEPARATOR); | ||
+ | sprintf(Line, | ||
+ | _Message(Line); | ||
+ | SDCard.ListDirectory(DIRECTORY_SUBDD); | ||
+ | </ | ||
+ | |||
+ | |||
===== ToDo ===== | ===== ToDo ===== | ||
===== Done ===== | ===== Done ===== | ||
+ | ==== 221104 ==== | ||
+ | * X Anlegen von geschachtelten SubDirectories | ||
+ | * X Listing von geschachtelten SubDirectories | ||
+ | * Download: {{: | ||
+ | ==== 221104 ==== | ||
+ | * Download (VSCode): {{: | ||
==== 221103 ==== | ==== 221103 ==== | ||
- | * Neuauflage von 2208211552_Esp32SDCardInfo_01V03.zip | + | * Neuauflage von {{: |
* zu 2211031450_Esp32SDCardDemo_02V01.zip | * zu 2211031450_Esp32SDCardDemo_02V01.zip | ||
- | * [[module: | ||
- | |||
- | |||
- | |||
----- | ----- | ||
[[http:// | [[http:// | ||
[[http:// | [[http:// | ||
- | [[http:// | + | [[http:// |
- | [[http:// | + | [[http:// |
module/microcontroller/esp32sdcarddemo/esp32sdcarddemo.1667483907.txt.gz · Last modified: 2022/11/03 14:58 by omdevelop