HIT Project #3 https://community.freescale.com/docs/DOC-99621
Dependencies: EthernetInterface WebSocketClient mbed-rtos mbed
MonkeyDo!

These are the demo files for Freescale HIT project #3: Monkey Do. It uses a FRDM-AUTO + a FRDM-K64F to demo websockets for a simple IoT application.
See the main MonkeyDo page for all of the schematics, videos, GitHub links, etc for everything else!
https://community.freescale.com/docs/DOC-99621
GLUE/Queue.h
- Committer:
- emh203
- Date:
- 2014-07-17
- Revision:
- 1:d87a428e88ee
- Parent:
- 0:29f58b9daa2c
File content as of revision 1:d87a428e88ee:
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#ifndef QUEUE_H_
#define QUEUE_H_
typedef struct {
uint16_t ReadPtr;
uint16_t WritePtr;
uint16_t QueueSize;
uint8_t *QueueStorage;
} ByteQueue;
#define QUEUE_FULL -1
#define QUEUE_EMPTY -2
#define QUEUE_OK 0
void InitByteQueue(ByteQueue *BQ,uint16_t Size,uint8_t * Storage);
uint16_t BytesInQueue(ByteQueue *BQ);
int16_t ByteEnqueue(ByteQueue *BQ,uint8_t Val);
int16_t ByteArrayEnqueue(ByteQueue *BQ,uint8_t *Buf,uint16_t);
int16_t ByteDequeue(ByteQueue *BQ,uint8_t *Val);
uint8_t ForcedByteDequeue(ByteQueue *BQ);
int16_t Qprintf(ByteQueue *BQ, const char *FormatString,...);
#endif /* TFC_QUEUE_H_ */
Eli Hughes