HIT Project #3 https://community.freescale.com/docs/DOC-99621

Dependencies:   EthernetInterface WebSocketClient mbed-rtos mbed

MonkeyDo!

/media/uploads/emh203/monkey-20plug2.png

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

Committer:
emh203
Date:
Thu Jul 17 00:18:36 2014 +0000
Revision:
1:d87a428e88ee
Parent:
0:29f58b9daa2c
Version for 1st project release

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emh203 0:29f58b9daa2c 1 #include <stdio.h>
emh203 0:29f58b9daa2c 2 #include <stdarg.h>
emh203 0:29f58b9daa2c 3 #include <stdint.h>
emh203 0:29f58b9daa2c 4
emh203 0:29f58b9daa2c 5 #ifndef QUEUE_H_
emh203 0:29f58b9daa2c 6 #define QUEUE_H_
emh203 0:29f58b9daa2c 7
emh203 0:29f58b9daa2c 8
emh203 0:29f58b9daa2c 9 typedef struct {
emh203 0:29f58b9daa2c 10
emh203 0:29f58b9daa2c 11 uint16_t ReadPtr;
emh203 0:29f58b9daa2c 12 uint16_t WritePtr;
emh203 0:29f58b9daa2c 13 uint16_t QueueSize;
emh203 0:29f58b9daa2c 14 uint8_t *QueueStorage;
emh203 0:29f58b9daa2c 15
emh203 0:29f58b9daa2c 16 } ByteQueue;
emh203 0:29f58b9daa2c 17
emh203 0:29f58b9daa2c 18 #define QUEUE_FULL -1
emh203 0:29f58b9daa2c 19 #define QUEUE_EMPTY -2
emh203 0:29f58b9daa2c 20 #define QUEUE_OK 0
emh203 0:29f58b9daa2c 21
emh203 0:29f58b9daa2c 22
emh203 0:29f58b9daa2c 23 void InitByteQueue(ByteQueue *BQ,uint16_t Size,uint8_t * Storage);
emh203 0:29f58b9daa2c 24 uint16_t BytesInQueue(ByteQueue *BQ);
emh203 0:29f58b9daa2c 25 int16_t ByteEnqueue(ByteQueue *BQ,uint8_t Val);
emh203 0:29f58b9daa2c 26 int16_t ByteArrayEnqueue(ByteQueue *BQ,uint8_t *Buf,uint16_t);
emh203 0:29f58b9daa2c 27 int16_t ByteDequeue(ByteQueue *BQ,uint8_t *Val);
emh203 0:29f58b9daa2c 28 uint8_t ForcedByteDequeue(ByteQueue *BQ);
emh203 0:29f58b9daa2c 29 int16_t Qprintf(ByteQueue *BQ, const char *FormatString,...);
emh203 0:29f58b9daa2c 30
emh203 0:29f58b9daa2c 31
emh203 0:29f58b9daa2c 32
emh203 0:29f58b9daa2c 33
emh203 0:29f58b9daa2c 34 #endif /* TFC_QUEUE_H_ */