forked from analogdevicesinc/libtinyiiod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tinyiiod-private.h
62 lines (46 loc) · 2.33 KB
/
tinyiiod-private.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* libtinyiiod - Tiny IIO Daemon Library
*
* Copyright (C) 2016 Analog Devices, Inc.
* Author: Paul Cercueil <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
#ifndef TINYIIOD_PRIVATE_H
#define TINYIIOD_PRIVATE_H
#include "tinyiiod.h"
char tinyiiod_read_char(struct tinyiiod *iiod);
ssize_t tinyiiod_read(struct tinyiiod *iiod, char *buf, size_t len);
ssize_t tinyiiod_read_line(struct tinyiiod *iiod, char *buf, size_t len);
ssize_t tinyiiod_write_char(struct tinyiiod *iiod, char c);
ssize_t tinyiiod_write(struct tinyiiod *iiod, const char *data, size_t len);
ssize_t tinyiiod_write_string(struct tinyiiod *iiod, const char *str);
ssize_t tinyiiod_write_value(struct tinyiiod *iiod, int32_t value);
void tinyiiod_write_xml(struct tinyiiod *iiod);
void tinyiiod_do_read_attr(struct tinyiiod *iiod, const char *device,
const char *channel, bool ch_out, const char *attr, enum iio_attr_type type);
void tinyiiod_do_write_attr(struct tinyiiod *iiod, const char *device,
const char *channel, bool ch_out, const char *attr,
size_t bytes, enum iio_attr_type type);
void tinyiiod_do_open(struct tinyiiod *iiod, const char *device,
size_t sample_size, uint32_t mask, bool cyclic);
void tinyiiod_do_close(struct tinyiiod *iiod, const char *device);
int32_t tinyiiod_do_open_instance(struct tinyiiod *iiod);
int32_t tinyiiod_do_close_instance(struct tinyiiod *iiod);
int32_t tinyiiod_do_readbuf(struct tinyiiod *iiod,
const char *device, size_t bytes_count);
int32_t tinyiiod_do_writebuf(struct tinyiiod *iiod, const char *device,
size_t bytes_count);
int32_t tinyiiod_parse_string(struct tinyiiod *iiod, char *str);
int32_t tinyiiod_set_timeout(struct tinyiiod *iiod, uint32_t timeout);
int32_t tinyiiod_set_buffers_count(struct tinyiiod *iiod, const char *device,
uint32_t buffers_count);
#endif /* TINYIIOD_PRIVATE_H */