this is testing

Committer:
pmallick
Date:
Thu Jan 14 19:12:57 2021 +0530
Revision:
0:e8a1ba50c46b
this is testing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmallick 0:e8a1ba50c46b 1 /*
pmallick 0:e8a1ba50c46b 2 * libtinyiiod - Tiny IIO Daemon Library
pmallick 0:e8a1ba50c46b 3 *
pmallick 0:e8a1ba50c46b 4 * Copyright (C) 2016 Analog Devices, Inc.
pmallick 0:e8a1ba50c46b 5 * Author: Paul Cercueil <paul.cercueil@analog.com>
pmallick 0:e8a1ba50c46b 6 *
pmallick 0:e8a1ba50c46b 7 * This library is free software; you can redistribute it and/or
pmallick 0:e8a1ba50c46b 8 * modify it under the terms of the GNU Lesser General Public
pmallick 0:e8a1ba50c46b 9 * License as published by the Free Software Foundation; either
pmallick 0:e8a1ba50c46b 10 * version 2.1 of the License, or (at your option) any later version.
pmallick 0:e8a1ba50c46b 11 *
pmallick 0:e8a1ba50c46b 12 * This library is distributed in the hope that it will be useful,
pmallick 0:e8a1ba50c46b 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
pmallick 0:e8a1ba50c46b 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
pmallick 0:e8a1ba50c46b 15 * Lesser General Public License for more details.
pmallick 0:e8a1ba50c46b 16 */
pmallick 0:e8a1ba50c46b 17
pmallick 0:e8a1ba50c46b 18 #ifndef TINYIIOD_PRIVATE_H
pmallick 0:e8a1ba50c46b 19 #define TINYIIOD_PRIVATE_H
pmallick 0:e8a1ba50c46b 20
pmallick 0:e8a1ba50c46b 21 #include "tinyiiod.h"
pmallick 0:e8a1ba50c46b 22
pmallick 0:e8a1ba50c46b 23 char tinyiiod_read_char(struct tinyiiod *iiod);
pmallick 0:e8a1ba50c46b 24 ssize_t tinyiiod_read(struct tinyiiod *iiod, char *buf, size_t len);
pmallick 0:e8a1ba50c46b 25 ssize_t tinyiiod_read_line(struct tinyiiod *iiod, char *buf, size_t len);
pmallick 0:e8a1ba50c46b 26
pmallick 0:e8a1ba50c46b 27 ssize_t tinyiiod_write_char(struct tinyiiod *iiod, char c);
pmallick 0:e8a1ba50c46b 28 ssize_t tinyiiod_write(struct tinyiiod *iiod, const char *data, size_t len);
pmallick 0:e8a1ba50c46b 29 ssize_t tinyiiod_write_string(struct tinyiiod *iiod, const char *str);
pmallick 0:e8a1ba50c46b 30 ssize_t tinyiiod_write_value(struct tinyiiod *iiod, int32_t value);
pmallick 0:e8a1ba50c46b 31
pmallick 0:e8a1ba50c46b 32 void tinyiiod_write_xml(struct tinyiiod *iiod);
pmallick 0:e8a1ba50c46b 33
pmallick 0:e8a1ba50c46b 34 void tinyiiod_do_read_attr(struct tinyiiod *iiod, const char *device,
pmallick 0:e8a1ba50c46b 35 const char *channel, bool ch_out, const char *attr, enum iio_attr_type type);
pmallick 0:e8a1ba50c46b 36
pmallick 0:e8a1ba50c46b 37 void tinyiiod_do_write_attr(struct tinyiiod *iiod, const char *device,
pmallick 0:e8a1ba50c46b 38 const char *channel, bool ch_out, const char *attr,
pmallick 0:e8a1ba50c46b 39 size_t bytes, enum iio_attr_type type);
pmallick 0:e8a1ba50c46b 40
pmallick 0:e8a1ba50c46b 41 void tinyiiod_do_open(struct tinyiiod *iiod, const char *device,
pmallick 0:e8a1ba50c46b 42 size_t sample_size, uint32_t mask);
pmallick 0:e8a1ba50c46b 43 void tinyiiod_do_close(struct tinyiiod *iiod, const char *device);
pmallick 0:e8a1ba50c46b 44
pmallick 0:e8a1ba50c46b 45 int32_t tinyiiod_do_open_instance(struct tinyiiod *iiod);
pmallick 0:e8a1ba50c46b 46
pmallick 0:e8a1ba50c46b 47 int32_t tinyiiod_do_close_instance(struct tinyiiod *iiod);
pmallick 0:e8a1ba50c46b 48
pmallick 0:e8a1ba50c46b 49 int32_t tinyiiod_do_readbuf(struct tinyiiod *iiod,
pmallick 0:e8a1ba50c46b 50 const char *device, size_t bytes_count);
pmallick 0:e8a1ba50c46b 51
pmallick 0:e8a1ba50c46b 52 int32_t tinyiiod_do_writebuf(struct tinyiiod *iiod, const char *device,
pmallick 0:e8a1ba50c46b 53 size_t bytes_count);
pmallick 0:e8a1ba50c46b 54
pmallick 0:e8a1ba50c46b 55 int32_t tinyiiod_parse_string(struct tinyiiod *iiod, char *str);
pmallick 0:e8a1ba50c46b 56
pmallick 0:e8a1ba50c46b 57 int32_t tinyiiod_set_timeout(struct tinyiiod *iiod, uint32_t timeout);
pmallick 0:e8a1ba50c46b 58
pmallick 0:e8a1ba50c46b 59 #endif /* TINYIIOD_PRIVATE_H */