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.
Dependents: GSwifiInterface_HelloWorld GSwifiInterface_HelloServo GSwifiInterface_UDPEchoServer GSwifiInterface_UDPEchoClient ... more
Fork of WiflyInterface by
Diff: GSwifi/CBuffer.h
- Revision:
- 19:d035412a7803
- Parent:
- 12:057089026a20
--- a/GSwifi/CBuffer.h Mon May 12 01:24:09 2014 +0000
+++ b/GSwifi/CBuffer.h Thu Jun 05 04:21:02 2014 +0000
@@ -22,11 +22,15 @@
template <class T>
class CircBuffer {
public:
- CircBuffer(int length) {
+ CircBuffer(int length, void *addr = NULL) {
write = 0;
read = 0;
size = length + 1;
- buf = (T *)malloc(size * sizeof(T));
+ if (addr) {
+ buf = (T *)addr;
+ } else {
+ buf = (T *)malloc(size * sizeof(T));
+ }
if (buf == NULL)
error("Can't allocate memory");
};

GainSpan Wi-Fi GS1011