From 776a24cbe8750f224d3117c76340304432d8ba3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 29 Nov 2015 12:46:34 +0100 Subject: [PATCH] add explanation for cbuf_find --- circbuf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circbuf.h b/circbuf.h index 6e0637e..e54d152 100644 --- a/circbuf.h +++ b/circbuf.h @@ -74,6 +74,10 @@ uint16_t cbuf_read_string_upto(CircularBuffer *inst, char *str, uint16_t max); /** * Search buffer and return position of the first occurence * of the given byte (position relative to read_pos). + * + * The returned value is zero-based, add 1 to get string + * length including the delimiter. + * * Returns -1 if not found. */ int32_t cbuf_find(CircularBuffer *inst, uint8_t b);