mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-05 08:30:40 +08:00

Add support of dos shortname for sharedSD (mainly for Marlin) Add SDFat version in report for reference
36 lines
693 B
C++
36 lines
693 B
C++
/*
|
|
* Program to compare size of SdFat with Arduino SD library.
|
|
* See SD_Size.ino for Arduino SD program.
|
|
*
|
|
*/
|
|
#include <SPI.h>
|
|
#include "SdFat.h"
|
|
|
|
using namespace sdfat;
|
|
|
|
SdFat sd;
|
|
|
|
SdFile file;
|
|
//------------------------------------------------------------------------------
|
|
void setup() {
|
|
Serial.begin(9600);
|
|
|
|
// Wait for USB Serial
|
|
while (!Serial) {
|
|
SysCall::yield();
|
|
}
|
|
|
|
if (!sd.begin()) {
|
|
Serial.println("begin failed");
|
|
return;
|
|
}
|
|
file.open("SizeTest.txt", O_RDWR | O_CREAT | O_AT_END);
|
|
|
|
file.println("Hello");
|
|
|
|
file.close();
|
|
Serial.println("Done");
|
|
}
|
|
//------------------------------------------------------------------------------
|
|
void loop() {}
|