-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdeviceapi_filesystem.h
More file actions
35 lines (29 loc) · 1.03 KB
/
deviceapi_filesystem.h
File metadata and controls
35 lines (29 loc) · 1.03 KB
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
//*****************************************************************
// This file is part of CosmOS *
// Copyright (C) 2020-2021 Tom Everett *
// Released under the stated terms in the file LICENSE *
// See the file "LICENSE" in the source distribution for details *
// ****************************************************************
#ifndef _DEVICEAPI_FILESYSTEM_H
#define _DEVICEAPI_FILESYSTEM_H
#include <sys/collection/arraylist/arraylist.h>
#include <sys/devicemgr/devicemgr.h>
#include <types.h>
/*
* format a file system
*/
typedef void (*fs_format_function)(struct device* dev);
/*
* read file
*/
typedef void (*fs_read_function)(struct device* dev, const uint8_t* name, const uint8_t* data, uint32_t size);
/*
* write file
*/
typedef void (*fs_write_function)(struct device* dev, const uint8_t* name, const uint8_t* data, uint32_t size);
struct deviceapi_filesystem {
fs_format_function format;
fs_read_function read;
fs_write_function write;
};
#endif