Pratyush Mallick
/
nano_dac
this is testing
noos_mbed/libraries/iio/libtinyiiod/compat.h@0:e8a1ba50c46b, 2021-01-14 (annotated)
- Committer:
- pmallick
- Date:
- Thu Jan 14 19:12:57 2021 +0530
- Revision:
- 0:e8a1ba50c46b
this is testing
Who changed what in which revision?
User | Revision | Line number | New 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) 2019 Analog Devices, Inc. |
pmallick | 0:e8a1ba50c46b | 5 | * Author: Cristian Pop <cristian.pop@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 COMPAT_H |
pmallick | 0:e8a1ba50c46b | 19 | #define COMPAT_H |
pmallick | 0:e8a1ba50c46b | 20 | |
pmallick | 0:e8a1ba50c46b | 21 | #ifdef _USE_STD_INT_TYPES |
pmallick | 0:e8a1ba50c46b | 22 | #include <stdint.h> |
pmallick | 0:e8a1ba50c46b | 23 | #include <inttypes.h> |
pmallick | 0:e8a1ba50c46b | 24 | #include <stdlib.h> |
pmallick | 0:e8a1ba50c46b | 25 | #include <stdbool.h> |
pmallick | 0:e8a1ba50c46b | 26 | #include <stdio.h> |
pmallick | 0:e8a1ba50c46b | 27 | #include <inttypes.h> |
pmallick | 0:e8a1ba50c46b | 28 | #include <errno.h> |
pmallick | 0:e8a1ba50c46b | 29 | #include <string.h> |
pmallick | 0:e8a1ba50c46b | 30 | #else // _USE_STD_INT_TYPES |
pmallick | 0:e8a1ba50c46b | 31 | #if !defined(__ssize_t_defined) && !defined(_SSIZE_T_DEFINED) |
pmallick | 0:e8a1ba50c46b | 32 | typedef long int ssize_t; |
pmallick | 0:e8a1ba50c46b | 33 | typedef unsigned long int size_t; |
pmallick | 0:e8a1ba50c46b | 34 | #define __ssize_t_defined |
pmallick | 0:e8a1ba50c46b | 35 | #define _SSIZE_T_DEFINED |
pmallick | 0:e8a1ba50c46b | 36 | #endif |
pmallick | 0:e8a1ba50c46b | 37 | |
pmallick | 0:e8a1ba50c46b | 38 | typedef long int32_t; |
pmallick | 0:e8a1ba50c46b | 39 | typedef unsigned long uint32_t; |
pmallick | 0:e8a1ba50c46b | 40 | typedef int bool; |
pmallick | 0:e8a1ba50c46b | 41 | |
pmallick | 0:e8a1ba50c46b | 42 | #define true 1 |
pmallick | 0:e8a1ba50c46b | 43 | #define false 0 |
pmallick | 0:e8a1ba50c46b | 44 | |
pmallick | 0:e8a1ba50c46b | 45 | #define NULL (void*)0 |
pmallick | 0:e8a1ba50c46b | 46 | |
pmallick | 0:e8a1ba50c46b | 47 | #define ENOENT 2 /* No such file or directory */ |
pmallick | 0:e8a1ba50c46b | 48 | #define EIO 5 /* I/O error */ |
pmallick | 0:e8a1ba50c46b | 49 | #define ENODEV 19 /* No such device */ |
pmallick | 0:e8a1ba50c46b | 50 | #define EINVAL 22 /* Invalid argument */ |
pmallick | 0:e8a1ba50c46b | 51 | #define ENOSYS 38 /* Function not implemented */ |
pmallick | 0:e8a1ba50c46b | 52 | |
pmallick | 0:e8a1ba50c46b | 53 | #define PRIi32 "li" |
pmallick | 0:e8a1ba50c46b | 54 | # define PRIx32 "x" |
pmallick | 0:e8a1ba50c46b | 55 | # define PRIu16 "u" |
pmallick | 0:e8a1ba50c46b | 56 | #endif //_USE_STD_INT_TYPES |
pmallick | 0:e8a1ba50c46b | 57 | |
pmallick | 0:e8a1ba50c46b | 58 | #endif /* COMPAT_H */ |