Alejandro Giraldo Martinez / qnode2
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers qnode.h Source File

qnode.h

00001 #include "mbed.h"
00002 
00003 #ifndef QNODE_H
00004 #define QNODE_H
00005 
00006 typedef struct QNode{
00007     uint8_t uid[4];
00008     struct QNode *next;
00009 } QNode;
00010 
00011 // The queue, front stores the front node of LL and rear stores ths
00012 // last node of LL
00013 struct Queue
00014 {
00015     struct QNode *front, *rear;
00016 };
00017 
00018 
00019 struct QNode* newNode(uint8_t* k);
00020 struct Queue *createQueue();
00021 void enQueue(struct Queue *q, uint8_t *k);
00022 struct QNode *deQueue(struct Queue *q);
00023 
00024 
00025 #endif