8 PROCESS(example_coffee_process,
"Node Reset");
9 AUTOSTART_PROCESSES(&example_coffee_process);
13 #ifndef NEED_FORMATTING
14 #define NEED_FORMATTING 1
21 struct cfs_dirent dirent;
25 printf(
"failed to open the root directory\n");
30 printf(
"Available files:\n");
32 printf(
" %s (%lu bytes)\n", dirent.name, (
unsigned long)dirent.size);
44 printf(
"\n\nNode Setup\n");
47 printf(
"Formatting flash... ");
55 printf(
"dir test failed\n");
59 printf(
"Reseting reboot counter... ");
63 printf(
"\nNode setup complete\n");
int cfs_opendir(struct cfs_dir *dir, const char *name)
Open a directory for reading directory entries.
#define PROCESS_END()
Define the end of a process.
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
int cfs_coffee_format(void)
Format the storage area assigned to Coffee.
int cfs_readdir(struct cfs_dir *dir, struct cfs_dirent *record)
Read a directory entry.
Header for the Coffee file system.
void cfs_closedir(struct cfs_dir *dir)
Close a directory opened with cfs_opendir().
#define PROCESS_PAUSE()
Yield the process for a short while.
#define PROCESS_BEGIN()
Define the beginning of a process.