56 #define FAT_COOP_BUFFER_SIZE 128
57 #define FAT_COOP_QUEUE_SIZE 15
58 #define FAT_COOP_SLOT_SIZE_MS 50L
60 #define FAT_COOP_TIME_READ_BLOCK_MS 8
61 #define FAT_COOP_TIME_WRITE_BLOCK_MS 12
63 #define FAT_COOP_STACK_SIZE 192
72 typedef struct q_entry_generic_file_op {
78 typedef struct q_entry_open_file_op {
83 typedef struct q_entry_seek_file_op {
89 typedef struct q_entry_dir_op {
92 struct cfs_dirent *dirent;
109 typedef struct q_entry {
112 struct process *source_process;
114 GenericFileOp
generic;
123 typedef struct event_op_finished {
126 } Event_OperationFinished;
128 int8_t ccfs_open(
const char *name,
int flags, uint8_t *token );
129 int8_t ccfs_close(
int fd, uint8_t *token);
130 int8_t
ccfs_write(
int fd, uint8_t *buf, uint16_t length, uint8_t *token );
131 int8_t ccfs_read(
int fd, uint8_t *buf, uint16_t length, uint8_t *token );
132 int8_t ccfs_seek(
int fd, cfs_offset_t offset,
int whence, uint8_t *token);
133 int8_t ccfs_remove(
const char *name, uint8_t *token );
134 int8_t ccfs_opendir(
struct cfs_dir *dirp,
const char *name, uint8_t *token );
135 int8_t ccfs_readdir(
struct cfs_dir *dirp,
struct cfs_dirent *dirent, uint8_t *token);
136 int8_t ccfs_closedir(
struct cfs_dir *dirp, uint8_t *token);
137 uint8_t fat_op_status( uint8_t token );
138 uint16_t fat_estimate_by_token( uint8_t token );
139 uint16_t fat_estimate_by_parameter( Operation type, uint16_t length );
140 uint8_t fat_buffer_available( uint16_t length );
141 void printQueueEntry( QueueEntry *entry );
142 process_event_t get_coop_event_id();
143 uint8_t get_item_from_buffer( uint8_t *start, uint16_t index);