1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Remove a receiver if the BIND failed / was stopped by user

This commit is contained in:
Bertrand Songis 2019-04-05 14:50:41 +02:00
parent 17335d5909
commit 62d12290e6
3 changed files with 29 additions and 6 deletions

View file

@ -248,7 +248,16 @@
#include "myeeprom.h"
#define memclear(p, s) memset(p, 0, s)
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);
}
void memswap(void * a, void * b, uint8_t size);