module:microcontroller:esp32sdcarddemo:esp32sdcarddemo
This is an old revision of the document!
Esp32SDCardDemo
Überblick
- Esp32SDCardDemo zeigt folgende in der Klasse CSDCard gekapselten File- und Directory-Funktionen:
- || Instance
- CSDCard(int pinss, TMessage pmessage, TError perror);
- bool Initialise(void);
- || Property
- bool IsEndOfFile(void);
- ECardType GetCardType(void);
- uint64_t GetCardSizeMB(void);
- || WriteFile
- bool OpenWrite(const char* fileentry);
- bool OpenAppend(const char* fileentry);
- bool WriteCharacter(const char character);
- bool WriteText(const char* text);
- bool WriteLine(const char* line);
- bool CloseWrite(void);
- || ReadFile
- bool OpenRead(const char* fileentry);
- bool ReadCharacter(char &character);
- bool ReadText(char* text, unsigned &size);
- bool ReadLine(char* line);
- bool CloseRead(void);
- || File
- bool RenameFile(const char* entrysource, const char* entrytarget);
- bool RemoveFile(const char * entry);
- || Directory
- bool ListDirectory(const char* entry);
- bool CreateDirectory(const char* entry);
- bool RemoveDirectory(const char* entry);
// #ifndef SDCard_h #define SDCard_h // //---------------------- // Include //---------------------- #include "Define.h" // #include <Arduino.h> #include "FS.h" #include "SD.h" #include "SPI.h" // enum ECardType { ctNone = 0, ctMMC = 1, ctSD = 2, ctSDHC = 3, ctUnknown = 4 }; // const char* CardTypeText(ECardType cardtype); // class CSDCard { private: int FPinSS; File FFile; TMessage FPMessage; TError FPError; // public: // Instance CSDCard(int pinss, TMessage pmessage, TError perror); bool Initialise(void); // Property bool IsEndOfFile(void); ECardType GetCardType(void); uint64_t GetCardSizeMB(void); // WriteFile bool OpenWrite(const char* fileentry); bool OpenAppend(const char* fileentry); bool WriteCharacter(const char character); bool WriteText(const char* text); bool WriteLine(const char* line); bool CloseWrite(void); // ReadFile bool OpenRead(const char* fileentry); bool ReadCharacter(char &character); bool ReadText(char* text, unsigned &size); bool ReadLine(char* line); bool CloseRead(void); // File bool RenameFile(const char* entrysource, const char* entrytarget); bool RemoveFile(const char * entry); // Directory bool ListDirectory(const char* entry); bool CreateDirectory(const char* entry); bool RemoveDirectory(const char* entry); }; // #endif // SDCard_h
ToDo
Done
221104
- Download: 2211041209_Esp32SDCardDemo_02V02
221103
- Neuauflage von 2208211552_Esp32SDCardInfo_01V03.zip
- zu 2211031450_Esp32SDCardDemo_02V01.zip
module/microcontroller/esp32sdcarddemo/esp32sdcarddemo.1667560420.txt.gz · Last modified: 2022/11/04 12:13 by omdevelop