We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 821c9fc commit 4168b34Copy full SHA for 4168b34
platform/include/platform/CircularBuffer.h
@@ -260,6 +260,20 @@ class CircularBuffer {
260
return pop(dest, N);
261
}
262
263
+ /**
264
+ * Pop multiple elements from the buffer.
265
+ *
266
+ * @param dest The array which will receive the elements.
267
268
+ * @return The number of elements popped.
269
+ */
270
+ CounterType pop(mbed::Span<T>& dest)
271
+ {
272
+ CounterType popped = pop(dest.data(), dest.size());
273
+ dest = mbed::make_Span(dest.data(), popped);
274
+ return popped;
275
+ }
276
+
277
/** Check if the buffer is empty.
278
*
279
* @return True if the buffer is empty, false if not.
0 commit comments