Soldered SD Card Arduino Library
1.0.0
Easily read and write files to and form the SD card breakout! A fork of the original SDFat library by Bill Greiman.
Toggle main menu visibility
Loading...
Searching...
No Matches
FsApiConstants.h
Go to the documentation of this file.
1
25
#ifndef FsApiConstants_h
26
#define FsApiConstants_h
27
#include "
../SdFatConfig.h
"
28
29
#if USE_FCNTL_H
30
#include <fcntl.h>
31
/* values for GNU Arm Embedded Toolchain.
32
* O_RDONLY: 0x0
33
* O_WRONLY: 0x1
34
* O_RDWR: 0x2
35
* O_ACCMODE: 0x3
36
* O_APPEND: 0x8
37
* O_CREAT: 0x200
38
* O_TRUNC: 0x400
39
* O_EXCL: 0x800
40
* O_SYNC: 0x2000
41
* O_NONBLOCK: 0x4000
42
*/
44
#define O_AT_END O_NONBLOCK
45
typedef
int
oflag_t
;
46
#else
// USE_FCNTL_H
47
#define O_RDONLY 0X00
48
#define O_WRONLY 0X01
49
#define O_RDWR 0X02
50
#define O_AT_END 0X04
51
#define O_APPEND 0X08
52
#define O_CREAT 0x10
53
#define O_TRUNC 0x20
54
#define O_EXCL 0x40
55
#define O_SYNC 0x80
56
57
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
58
typedef
uint8_t
oflag_t
;
59
#endif
// USE_FCNTL_H
60
61
#define O_READ O_RDONLY
62
#define O_WRITE O_WRONLY
63
64
inline
bool
isWriteMode
(
oflag_t
oflag)
65
{
66
oflag &= O_ACCMODE;
67
return
oflag == O_WRONLY || oflag == O_RDWR;
68
}
69
70
// flags for ls()
72
const
uint8_t
LS_A
= 1;
74
const
uint8_t
LS_DATE
= 2;
76
const
uint8_t
LS_SIZE
= 4;
78
const
uint8_t
LS_R
= 8;
79
80
// flags for time-stamp
82
const
uint8_t
T_ACCESS
= 1;
84
const
uint8_t
T_CREATE
= 2;
86
const
uint8_t
T_WRITE
= 4;
87
#endif
// FsApiConstants_h
T_CREATE
const uint8_t T_CREATE
Definition
FsApiConstants.h:84
oflag_t
int oflag_t
Definition
FsApiConstants.h:45
T_WRITE
const uint8_t T_WRITE
Definition
FsApiConstants.h:86
T_ACCESS
const uint8_t T_ACCESS
Definition
FsApiConstants.h:82
LS_R
const uint8_t LS_R
Definition
FsApiConstants.h:78
LS_SIZE
const uint8_t LS_SIZE
Definition
FsApiConstants.h:76
isWriteMode
bool isWriteMode(oflag_t oflag)
Definition
FsApiConstants.h:64
LS_A
const uint8_t LS_A
Definition
FsApiConstants.h:72
LS_DATE
const uint8_t LS_DATE
Definition
FsApiConstants.h:74
SdFatConfig.h
configuration definitions
src
common
FsApiConstants.h
Generated on
for Soldered SD Card Arduino Library by
1.17.0. Dark theme by
Tilen Majerle
. All rights reserved. Copyright:
Soldered