copy from libscpi/inc/scpi/fifo.h
copy to libscpi/src/parser_private.h
File was copied from libscpi/inc/scpi/fifo.h |
| | |
| | | */ |
| | | |
| | | /** |
| | | * @file scpi_fifo.h |
| | | * @date Thu Nov 15 10:58:45 UTC 2012 |
| | | * @file parser_private.h |
| | | * |
| | | * @brief basic FIFO implementation |
| | | * @brief SCPI Parser private definitions |
| | | * |
| | | * |
| | | */ |
| | | |
| | | #ifndef SCPI_FIFO_H |
| | | #define SCPI_FIFO_H |
| | | #ifndef SCPI_PARSER_PRIVATE_H |
| | | #define SCPI_PARSER_PRIVATE_H |
| | | |
| | | #include "scpi/types.h" |
| | | #include "utils_private.h" |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | |
| | | #define FIFO_SIZE 16 |
| | | |
| | | struct _fifo_t { |
| | | int16_t wr; |
| | | int16_t rd; |
| | | int16_t size; |
| | | int16_t data[FIFO_SIZE]; |
| | | }; |
| | | typedef struct _fifo_t fifo_t; |
| | | |
| | | void fifo_init(fifo_t * fifo); |
| | | void fifo_clear(fifo_t * fifo); |
| | | bool_t fifo_add(fifo_t * fifo, int16_t value); |
| | | bool_t fifo_remove(fifo_t * fifo, int16_t * value); |
| | | bool_t fifo_count(fifo_t * fifo, int16_t * value); |
| | | int parseProgramData(lex_state_t * state, token_t * token) LOCAL; |
| | | int parseAllProgramData(lex_state_t * state, token_t * token, int * numberOfParameters) LOCAL; |
| | | int detectProgramMessageUnit(scpi_parser_state_t * state, const char * buffer, int len) LOCAL; |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif |
| | | |
| | | #endif /* SCPI_FIFO_H */ |
| | | #endif /* SCPI_PARSER_PRIVATE_H */ |
| | | |