Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2020-03-25 12:33:53 +01:00
34 changed files with 788 additions and 497 deletions
+12
View File
@@ -21,6 +21,7 @@
#ifndef _OPENTX_HELPERS_H_
#define _OPENTX_HELPERS_H_
#include <string.h>
#include "thirdparty/libopenui/src/libopenui_helpers.h"
template<class T>
@@ -37,4 +38,15 @@ inline void SWAP(T & a, T & b)
a = tmp;
}
inline void memclear(void * p, size_t size)
{
memset(p, 0, size);
}
inline bool is_memclear(void * p, size_t size)
{
uint8_t * buf = (uint8_t *)p;
return buf[0] == 0 && memcmp(buf, buf + 1, size - 1) == 0;
}
#endif