Adding clearFileBuffer and clearMaxFileBufferAvail

This commit is contained in:
PaulZC
2021-03-30 10:51:28 +01:00
parent fb76790842
commit 2ec3077fa6
3 changed files with 20 additions and 2 deletions
+4 -2
View File
@@ -557,8 +557,10 @@ public:
// Support for data logging
void setFileBufferSize(uint16_t bufferSize); // Set the size of the file buffer. This must be called _before_ .begin.
uint16_t extractFileBufferData(uint8_t *destination, uint16_t numBytes); // Extract numBytes of data from the file buffer. Copy it to destination. It is the user's responsibility to ensure destination is large enough.
uint16_t fileBufferAvailable(void); // Returns the number of bytes available in file buffer which are waiting to be read
uint16_t getMaxFileBufferAvail(void); // Returns the maximum number of bytes which the file buffer has contained. Handy for checking the buffer is large enough to handle all the incoming data.
uint16_t fileBufferAvailable(void); // Returns the number of bytes available in file buffer which are waiting to be read
uint16_t getMaxFileBufferAvail(void); // Returns the maximum number of bytes which the file buffer has contained. Handy for checking the buffer is large enough to handle all the incoming data.
void clearFileBuffer(void); // Empty the file buffer - discard all contents
void clearMaxFileBufferAvail(void); // Reset fileBufferMaxAvail
// Specific commands