Fork of Sam Grove's Linked list library OS6 compliant.
Diff: LinkedList2.h
- Revision:
- 0:27649dfdde4c
diff -r 000000000000 -r 27649dfdde4c LinkedList2.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LinkedList2.h Tue Dec 29 13:07:51 2020 +0000
@@ -0,0 +1,29 @@
+
+#ifndef LINKEDLIST_H_
+#define LINKEDLIST_H_
+
+#include <stdint.h>
+#include "mbed.h"
+
+struct node
+{
+ void *data;
+ struct node *next;
+};
+
+template<class retT>
+class LinkedList2
+{
+protected:
+ retT *_head;
+public:
+ LinkedList2();
+ ~LinkedList2();
+ retT *push(void *data);
+ retT *append(void *data);
+ retT *remove(uint32_t loc);
+ retT *pop(uint32_t loc);
+ uint32_t length(void);
+};
+
+#endif