Prusa3d Marlin fork
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
CardReader Class Reference
Collaboration diagram for CardReader:
Collaboration graph
[legend]

Classes

struct  ls_param
 

Public Types

enum  LsAction : uint8_t { LS_SerialPrint , LS_Count , LS_GetFilename }
 

Public Member Functions

struct CardReader::ls_param __attribute__ ((packed))
 
void mount (bool doPresort=true)
 
void write_command (char *buf)
 
void write_command_no_newline (char *buf)
 
void checkautostart (bool x)
 
void openFileWrite (const char *name)
 
void openFileReadFilteredGcode (const char *name, bool replace_current=false)
 
void openLogFile (const char *name)
 
void removeFile (const char *name)
 
void closefile (bool store_location=false)
 
void release ()
 
void startFileprint ()
 
uint32_t getFileSize ()
 
void getStatus (bool arg_P)
 
void printingHasFinished ()
 
void getfilename (uint16_t nr, const char *const match=NULL)
 
void getfilename_simple (uint16_t entry, const char *const match=NULL)
 
void getfilename_next (uint32_t position, const char *const match=NULL)
 
uint16_t getnrfilenames ()
 
void getAbsFilename (char *t)
 
void printAbsFilenameFast ()
 
void getDirName (char *name, uint8_t level)
 
uint8_t getWorkDirDepth ()
 
void ls (ls_param params)
 
bool chdir (const char *relpath, bool doPresort)
 
void updir ()
 
void cdroot (bool doPresort)
 
void presort ()
 
void getfilename_sorted (const uint16_t nr, uint8_t sdSort)
 
void getfilename_afterMaxSorting (uint16_t entry, const char *const match=NULL)
 
FORCE_INLINE bool isFileOpen ()
 
bool eof ()
 
FORCE_INLINE int16_t getFilteredGcodeChar ()
 
void setIndex (long index)
 
FORCE_INLINE uint8_t percentDone ()
 
FORCE_INLINE char * getWorkDirName ()
 
FORCE_INLINE uint32_t get_sdpos ()
 
bool ToshibaFlashAir_isEnabled () const
 
void ToshibaFlashAir_enable (bool enable)
 
bool ToshibaFlashAir_GetIP (uint8_t *ip)
 
bool FileExists (const char *filename)
 

Public Attributes

bool saving
 
bool logging
 
bool sdprinting
 
bool mounted
 
char filename [FILENAME_LENGTH]
 
uint16_t crmodTime
 
uint16_t crmodDate
 
uint32_t position
 
char longFilename [LONG_FILENAME_LENGTH]
 
bool filenameIsDir
 
int lastnr
 
bool presort_flag
 
char dir_names [MAX_DIR_DEPTH][9]
 
Sd2Card card
 

Member Function Documentation

◆ getfilename_sorted()

void CardReader::getfilename_sorted ( const uint16_t  nr,
uint8_t  sdSort 
)

Get the name of a file in the current directory by sort-index

◆ presort()

void CardReader::presort ( )

Read all the files and produce a sort key

We can do this in 3 ways...

  • Minimal RAM: Read two filenames at a time sorting along...
  • Some RAM: Buffer the directory just for this sort
  • Most RAM: Buffer the directory and return filenames from RAM

pop the position

find proper place

place the position


The documentation for this class was generated from the following files: