1 #include "BayEOSBufferSD.h" 3 strncpy(_filename,f,12);
6 Serial.println(_filename);
7 Serial.println(
"open file:");
10 _f=SD.open(_filename, O_CREAT | O_RDWR | O_APPEND);
11 _max_length=max_length;
13 Serial.println(_f.size());
15 if(append)
set(_f.size());
21 void BayEOSBufferSD::resetStorage(
void){
24 _f=SD.open(_filename,O_CREAT | O_RDWR | O_TRUNC);
28 uint8_t BayEOSBufferSD::write(
const uint8_t b){
32 uint8_t BayEOSBufferSD::write(
const uint8_t *b,uint8_t length){
35 return _f.write(b,length);
38 uint8_t BayEOSBufferSD::seek(
unsigned long pos){
42 int BayEOSBufferSD::read(
void){
46 int BayEOSBufferSD::read(uint8_t *dest,
int length){
47 return _f.read(dest,length);
50 void BayEOSBufferSD::flush(
void){