-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileStream.h
35 lines (32 loc) · 1004 Bytes
/
FileStream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <Arduino.h>
#include <SPI.h>
#include <SD.h>
class fstream
{
friend fstream &endl(fstream &ost);
private:
String reader(int blocks);
bool blocker(int blocks, char chr);
public:
File fu;
char *fn;
int readp, writep;
fstream(int SD_S, char *fname);
fstream &operator<<(fstream & (*op)(fstream &));
const fstream &operator<<(const char *str);
const fstream &operator<<(const String &str);
const fstream &operator<<(const int &num);
const fstream &operator<<(const char &chr);
const fstream &operator<<(const float &num);
const fstream &operator<<(const byte &b);
const fstream &operator>>(String &str);
const fstream &operator>>(int &str);
const fstream &operator>>(char &chr);
const fstream &operator>>(float &flt);
const fstream &operator>>(byte &b) ;
bool set_RP(int RP);
bool set_WP(int WP);
bool set_RL(int RL);
bool set_WL(int WL);
};
fstream &endl(fstream &ost);