kopia lustrzana https://github.com/espressif/esp-idf
ble_mesh: Fix compile error with c++ files
rodzic
dbe1164ecc
commit
326ccfca88
|
@ -440,7 +440,7 @@ struct esp_ble_mesh_model {
|
|||
/** Model ID */
|
||||
union {
|
||||
const uint16_t model_id; /*!< 16-bit model identifier */
|
||||
struct esp_ble_mesh_vnd_struct {
|
||||
struct {
|
||||
uint16_t company_id; /*!< 16-bit company identifier */
|
||||
uint16_t model_id; /*!< 16-bit model identifier */
|
||||
} vnd; /*!< Structure encapsulating a model ID with a company ID */
|
||||
|
|
|
@ -400,14 +400,17 @@ int _compare(const uint8_t *a, const uint8_t *b, size_t size);
|
|||
*/
|
||||
static inline void sys_memcpy_swap(void *dst, const void *src, size_t length)
|
||||
{
|
||||
__ASSERT(((src < dst && (src + length) <= dst) ||
|
||||
(src > dst && (dst + length) <= src)),
|
||||
"Source and destination buffers must not overlap");
|
||||
u8_t *pdst = (u8_t *)dst;
|
||||
const u8_t *psrc = (const u8_t *)src;
|
||||
|
||||
src += length - 1;
|
||||
__ASSERT(((psrc < pdst && (psrc + length) <= pdst) ||
|
||||
(psrc > pdst && (pdst + length) <= psrc)),
|
||||
"Source and destination buffers must not overlap");
|
||||
|
||||
psrc += length - 1;
|
||||
|
||||
for (; length > 0; length--) {
|
||||
*((u8_t *)dst++) = *((u8_t *)src--);
|
||||
*pdst++ = *psrc--;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue