forked from marco-pag/fred-linux-test-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_buff.h
More file actions
39 lines (28 loc) · 1 KB
/
user_buff.h
File metadata and controls
39 lines (28 loc) · 1 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
36
37
38
39
/*
* Fred for Linux. Experimental support.
*
* Copyright (C) 2018-2021, Marco Pagani, ReTiS Lab.
* <marco.pag(at)outlook.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.
*/
#ifndef USER_BUFF_H_
#define USER_BUFF_H_
#include <stddef.h>
#include "fred_parameters.h"
//---------------------------------------------------------------------------------------------
struct user_buff {
void *map_addr;
int file_d;
size_t length;
char dev_name[MAX_PATH];
};
//---------------------------------------------------------------------------------------------
void user_buff_init(struct user_buff *buff);
void *user_buff_map(struct user_buff *buff);
void user_buff_unmap(struct user_buff *buff);
size_t user_buff_get_size(const struct user_buff *buff);
//---------------------------------------------------------------------------------------------
#endif /* USER_H_ */