projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Move appconfig to cfg dir.
[bertos.git]
/
bertos
/
mware
/
fifobuf.h
diff --git
a/bertos/mware/fifobuf.h
b/bertos/mware/fifobuf.h
index cb634ee32ffe14e004c97a6645260380d333ba81..7fb06b63fc25f718cb7d3f62a61d2389f60f53d1 100644
(file)
--- a/
bertos/mware/fifobuf.h
+++ b/
bertos/mware/fifobuf.h
@@
-291,6
+291,14
@@
INLINE void fifo_init(FIFOBuffer *fb, unsigned char *buf, size_t size)
fb->end = buf + size - 1;
}
+/**
+ * \return Lenght of the FIFOBuffer \a fb.
+ */
+INLINE size_t fifo_len(FIFOBuffer *fb)
+{
+ return fb->end - fb->begin;
+}
+
#if 0