
Working Thread (the wireless kind) example with DHCP Ethernet enabled. At this point, router is not a correct description. I do not know if Thread will handle routing automatically or I will need to do something to enable internet connectivity to a Thread client device. That is the goal, give a Thread client a routable connection to the internet.
Dependencies: EthernetInterface fsl_phy_mcr20a fsl_smac mbed-rtos mbed
circular_buffer.h
- Committer:
- jmulvain
- Date:
- 2016-11-03
- Revision:
- 29:241a264ebe8f
- Parent:
- 27:1eb29717bfd9
File content as of revision 29:241a264ebe8f:
#ifndef __CIRCULAR_BUFFER_H__ #define __CIRCULAR_BUFFER_H__ #include "EmbeddedTypes.h" #include "MemManager.h" #ifndef gCircularBufferSize_c #define gCircularBufferSize_c 32 #endif typedef enum bufferStatus_tag { buffer_Ok_c = 0, buffer_Empty_c, buffer_Full_c }bufferStatus_t; class CircularBuffer { public: CircularBuffer(); CircularBuffer(uint32_t sz); ~CircularBuffer(); bufferStatus_t addToBuffer (uint8_t c); bufferStatus_t getFromBuffer (uint8_t *c); uint32_t getCount(); private: uint8_t *buffer; uint32_t size; uint32_t readIndex; uint32_t writeIndex; uint32_t count; }; #endif