The purpose of this application is to allow easy manipulation of the QSPI file system from a PC

Dependencies:   EALib USBDevice mbed

Embed: (wiki syntax)

« Back to documentation index

RAMFileSystem Class Reference

RAMFileSystem Class Reference

Creates a FAT file system in SDRAM. More...

#include <RAMFileSystem.h>

Public Member Functions

 RAMFileSystem (uint32_t addr, uint32_t size, const char *name)
 Create the File System in RAM.

Detailed Description

Creates a FAT file system in SDRAM.

 #include "mbed.h"
 #include "RAMFileSystem.h"

 RAMFileSystem ramfs(0xA0000000, 4*1024*1024, "ram"); // 4MB of ram starting at 0xA...
  
 int main() {
     sdram_init();

     FILE *fp = fopen("/ram/myfile.txt", "w");
     fprintf(fp, "Hello World!\n");
     fclose(fp);
 }

Definition at line 26 of file RAMFileSystem.h.


Constructor & Destructor Documentation

RAMFileSystem ( uint32_t  addr,
uint32_t  size,
const char *  name 
)

Create the File System in RAM.

Parameters:
addrStart of memory to use for file system
sizeNumber of bytes to use for file system
nameThe name used to access the virtual filesystem

Definition at line 8 of file RAMFileSystem.cpp.