AMU Library 3.0
C/C++ library for communicating with AMU (Aerospace Measurement Unit) devices
Loading...
Searching...
No Matches
fifo_private.h
Go to the documentation of this file.
1/*-
2 * Copyright (c) 2012-2013 Jan Breuer,
3 *
4 * All Rights Reserved
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 * 1. Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
36
37#ifndef SCPI_FIFO_H
38#define SCPI_FIFO_H
39
40#include "types.h"
41#include "utils_private.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47 void fifo_init(scpi_fifo_t * fifo, scpi_error_t * data, int16_t size) LOCAL;
48 void fifo_clear(scpi_fifo_t * fifo) LOCAL;
49 scpi_bool_t fifo_is_empty(scpi_fifo_t * fifo) LOCAL;
50 scpi_bool_t fifo_is_full(scpi_fifo_t * fifo) LOCAL;
51 scpi_bool_t fifo_add(scpi_fifo_t * fifo, const scpi_error_t * value) LOCAL;
52 scpi_bool_t fifo_remove(scpi_fifo_t * fifo, scpi_error_t * value) LOCAL;
53 scpi_bool_t fifo_remove_last(scpi_fifo_t * fifo, scpi_error_t * value) LOCAL;
54 scpi_bool_t fifo_count(scpi_fifo_t * fifo, int16_t * value) LOCAL;
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif /* SCPI_FIFO_H */
scpi_bool_t fifo_remove_last(scpi_fifo_t *fifo, scpi_error_t *value)
Definition fifo.c:94
scpi_bool_t fifo_is_empty(scpi_fifo_t *fifo)
Definition fifo.c:31
scpi_bool_t fifo_remove(scpi_fifo_t *fifo, scpi_error_t *value)
Definition fifo.c:72
scpi_bool_t fifo_is_full(scpi_fifo_t *fifo)
Definition fifo.c:40
scpi_bool_t fifo_add(scpi_fifo_t *fifo, const scpi_error_t *value)
Definition fifo.c:51
scpi_bool_t fifo_count(scpi_fifo_t *fifo, int16_t *value)
Definition fifo.c:116
void fifo_init(scpi_fifo_t *fifo, scpi_error_t *data, int16_t size)
Definition fifo.c:8
void fifo_clear(scpi_fifo_t *fifo)
Definition fifo.c:20
bool scpi_bool_t
Definition types.h:67
#define LOCAL