This library provides variable length ring buffering with software FIFO(First-in, First-out). This library overwrites when the buffer is full.
Dependents: AsyncSerial AsyncSerial AsyncSerial AsyncSerialh
Revision 3:137a7245f990, committed 2017-06-22
- Comitter:
- babylonica
- Date:
- Thu Jun 22 12:21:25 2017 +0000
- Parent:
- 2:fa27aa055777
- Commit message:
- Warning Fixed.
Changed in this revision
| FIFO.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/FIFO.cpp Sat Jun 17 09:13:12 2017 +0000
+++ b/FIFO.cpp Thu Jun 22 12:21:25 2017 +0000
@@ -65,7 +65,7 @@
DISABLE_INTERRUPTS;
if ( count <= 0 ){
- RESTORE_INTERUUPTS;
+ RESTORE_INTERUUPTS;
return 0;
}
@@ -89,7 +89,7 @@
if ( count <= 0 ){ //When the buffer is empty
RESTORE_INTERUUPTS;
- return -1;
+ return 0;
}
getdata = buffer[getindex];