22 lines
457 B
C
22 lines
457 B
C
#ifndef FILE_H
|
|
#define FILE_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define STATUS_ERROR 1
|
|
#define STATUS_EOF 2
|
|
#define STATUS_READY 4
|
|
|
|
#define COMMAND_OPEN_R 1
|
|
#define COMMAND_OPEN_W 2
|
|
#define COMMAND_OPEN_A 3
|
|
#define COMMAND_CLOSE 4
|
|
#define COMMAND_READ 5
|
|
#define COMMAND_WRITE 6
|
|
|
|
int openFile(int fd, const char *path, const char *mode);
|
|
int closeFile(int fd);
|
|
int readByte(const int fd, uint8_t *data);
|
|
int writeByte(const int fd, const uint8_t data);
|
|
|
|
#endif // FILE_H
|