Character stream interface. More...
#include <assert.h>#include <ring.h>#include <stdarg.h>#include <types.h>Go to the source code of this file.
Data Structures | |
| struct | stream |
| A generic byte stream. More... | |
| struct | stream_ops |
| Stream backend operations. More... | |
Functions | |
| int | stream_vprintf (struct stream *stream, const char *format, va_list ap) |
| Formatted output conversion to a stream. | |
| int | stream_printf (struct stream *stream, const char *format,...) |
| Formatted output conversion. | |
| int | stream_putstr (struct stream *stream, const char *str) |
| Write a string to a stream. | |
| int | stream_putchar (struct stream *stream, int c) |
| Write a single character to a stream. | |
| static unsigned int | stream_buf_size (struct stream *stream) |
| Return the size of the buffer associated with stream. | |
| static bool | stream_buf_has_data (struct stream *stream) |
| Return true if stream contains any data which can be extracted. | |
| static bool | stream_buf_is_full (struct stream *stream) |
| Return true if stream currently cannot accept any more data. | |
| static unsigned int | stream_buf_unused (struct stream *stream) |
| Return the number of bytes available for insertion into stream. | |
| static unsigned int | stream_buf_used (struct stream *stream) |
| Return the number of bytes available for extraction from stream. | |
| static unsigned int | stream_buf_unused_before_end (struct stream *stream) |
| Return the number of unused bytes before the buffer wraps around. | |
| static unsigned int | stream_buf_used_before_end (struct stream *stream) |
| Return the number of bytes available for extraction from stream before the buffer wraps around. | |
| static unsigned int | stream_buf_head (struct stream *stream) |
| Return the head index of stream, i.e. the index at which to insert the next byte. | |
| static unsigned int | stream_buf_tail (struct stream *stream) |
| Return the tail index of stream, i.e. the index at which to extract the next byte. | |
| static char | stream_buf_insert_char (struct stream *stream, char c) |
| Insert the character c at the head of stream. | |
| static char | stream_buf_extract_char (struct stream *stream) |
| Extract one character from the tail of stream. | |
Character stream interface.
Copyright (C) 2009 - 2010 Atmel Corporation. All rights reserved.
Definition in file stream.h.
1.6.3