Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DHT DS_1337 SDFileSystem USBDevice mbed
CircBuff Class Reference
The CircBuff class writes in and reads out byte arrays into a circular buffer. More...
#include <circbuff.h>
Public Member Functions | |
| void | putc (unsigned char c) |
| putc adds a single byte, c, into the array | |
| void | add (unsigned char *s) |
| add adds s into the buffer, up until the NULL byte | |
| uint16_t | read (unsigned char *s, uint16_t len) |
| read puts the current data from the buffer into s | |
Detailed Description
The CircBuff class writes in and reads out byte arrays into a circular buffer.
Definition at line 9 of file circbuff.h.
Member Function Documentation
| void add | ( | unsigned char * | s ) |
add adds s into the buffer, up until the NULL byte
- Parameters:
-
s is the byte array copied into the buffer
Definition at line 40 of file circbuff.cpp.
| void putc | ( | unsigned char | c ) |
putc adds a single byte, c, into the array
- Parameters:
-
c is the byte copied into the circular buffer.
Definition at line 22 of file circbuff.cpp.
| uint16_t read | ( | unsigned char * | s, |
| uint16_t | len | ||
| ) |
read puts the current data from the buffer into s
- Parameters:
-
s is the reference buffer to copy current data into. Caller's responsibility to make it the correct size len is the number of bytes to copy into s
- Returns:
- the number of bytes copied into s. Will be less than len if there was less data in the buffer.
Definition at line 84 of file circbuff.cpp.
Generated on Tue Jul 12 2022 23:07:44 by
1.7.2