Flash Translation Layer  1.0
bluedbm.h
Go to the documentation of this file.
1 
8 #ifndef BLUEDBM_H
9 #define BLUEDBM_H
10 
11 #include <stdint.h>
12 #include <libmemio.h>
13 
14 #include "device.h"
15 
16 #define BLUEDBM_NR_BLOCKS \
17  (4096)
22 typedef struct {
23  uint32_t tag;
24  char *data;
25  void *d_private;
27 
31 struct bluedbm {
32  size_t size;
33  memio_t *mio;
34  int o_flags;
35 };
36 
37 int bluedbm_open(struct device *, const char *name, int flags);
38 ssize_t bluedbm_write(struct device *, struct device_request *);
39 ssize_t bluedbm_read(struct device *, struct device_request *);
40 int bluedbm_erase(struct device *, struct device_request *);
41 int bluedbm_close(struct device *);
42 
43 int bluedbm_device_init(struct device *, uint64_t flags);
44 int bluedbm_device_exit(struct device *);
45 
46 #endif
ssize_t bluedbm_read(struct device *, struct device_request *)
read from the flash board
Definition: bluedbm.c:352
int o_flags
Definition: bluedbm.h:34
memio_t * mio
Definition: bluedbm.h:33
int bluedbm_close(struct device *)
close the bluedbm
Definition: bluedbm.c:499
uint32_t tag
Definition: bluedbm.h:23
int bluedbm_device_init(struct device *, uint64_t flags)
initialize the device and bluedbm module
Definition: bluedbm.c:549
metadata of the device
Definition: device.h:163
char * data
Definition: bluedbm.h:24
size_t size
Definition: bluedbm.h:32
ssize_t bluedbm_write(struct device *, struct device_request *)
write to the flash board
Definition: bluedbm.c:260
int bluedbm_open(struct device *, const char *name, int flags)
open the bluedbm based device
Definition: bluedbm.c:134
structure for manage the bluedbm device
Definition: bluedbm.h:31
structure for manage the dma
Definition: bluedbm.h:22
contain the device information header
int bluedbm_device_exit(struct device *)
deallocate the device module
Definition: bluedbm.c:578
void * d_private
Definition: bluedbm.h:25
int bluedbm_erase(struct device *, struct device_request *)
erase a segment
Definition: bluedbm.c:441
request for device
Definition: device.h:110