Committer:
alejo5214416
Date:
Fri Jul 27 00:31:19 2018 +0000
Revision:
0:28ba51765608
Esclavo Maestro

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alejo5214416 0:28ba51765608 1 #include "mbed.h"
alejo5214416 0:28ba51765608 2
alejo5214416 0:28ba51765608 3 #ifndef QNODE_H
alejo5214416 0:28ba51765608 4 #define QNODE_H
alejo5214416 0:28ba51765608 5
alejo5214416 0:28ba51765608 6 typedef struct QNode{
alejo5214416 0:28ba51765608 7 uint8_t uid[4];
alejo5214416 0:28ba51765608 8 struct QNode *next;
alejo5214416 0:28ba51765608 9 } QNode;
alejo5214416 0:28ba51765608 10
alejo5214416 0:28ba51765608 11 // The queue, front stores the front node of LL and rear stores ths
alejo5214416 0:28ba51765608 12 // last node of LL
alejo5214416 0:28ba51765608 13 struct Queue
alejo5214416 0:28ba51765608 14 {
alejo5214416 0:28ba51765608 15 struct QNode *front, *rear;
alejo5214416 0:28ba51765608 16 };
alejo5214416 0:28ba51765608 17
alejo5214416 0:28ba51765608 18
alejo5214416 0:28ba51765608 19 struct QNode* newNode(uint8_t* k);
alejo5214416 0:28ba51765608 20 struct Queue *createQueue();
alejo5214416 0:28ba51765608 21 void enQueue(struct Queue *q, uint8_t *k);
alejo5214416 0:28ba51765608 22 struct QNode *deQueue(struct Queue *q);
alejo5214416 0:28ba51765608 23
alejo5214416 0:28ba51765608 24
alejo5214416 0:28ba51765608 25 #endif