Add CMakeLists.txt.

Fix compilation in strict enviroments.
Fix compliation in IDF v4.0.
This commit is contained in:
h2zero
2020-03-31 20:16:27 -06:00
parent a77f33e251
commit 74ba03e3a8
12 changed files with 71 additions and 18 deletions

View File

@@ -261,7 +261,11 @@ void FreeRTOS::Semaphore::setName(std::string name) {
* @param [in] length The amount of storage to allocate for the ring buffer.
* @param [in] type The type of buffer. One of RINGBUF_TYPE_NOSPLIT, RINGBUF_TYPE_ALLOWSPLIT, RINGBUF_TYPE_BYTEBUF.
*/
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
Ringbuffer::Ringbuffer(size_t length, RingbufferType_t type) {
#else
Ringbuffer::Ringbuffer(size_t length, ringbuf_type_t type) {
#endif
m_handle = ::xRingbufferCreate(length, type);
} // Ringbuffer