net: openthread: added heap related otPlat methods implementation
* Added implementations of otPlatCAlloc and otPlatFree methods necessary for the OpenThread in case of using EXTERNAL_HEAP. * Added CONFIG_OPENTHREAD_DNSSD_SERVER option to allow enabling OT_DNSS_SERVER feature. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
This commit is contained in:
parent
3a8fffb9c3
commit
7b26544547
|
@ -81,6 +81,9 @@ config OPENTHREAD_DIAG
|
|||
config OPENTHREAD_DNS_CLIENT
|
||||
bool "Enable DNS client support"
|
||||
|
||||
config OPENTHREAD_DNSSD_SERVER
|
||||
bool "Enable DNS-SD server support"
|
||||
|
||||
config OPENTHREAD_DUA
|
||||
bool "Enable Domain Unicast Address support"
|
||||
help
|
||||
|
|
|
@ -14,6 +14,7 @@ zephyr_library_sources(
|
|||
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_DIAG diag.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_COPROCESSOR uart.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_SHELL shell.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_EXTERNAL_HEAP memory.c)
|
||||
zephyr_library_sources_ifndef(CONFIG_LOG_BACKEND_SPINEL logging.c)
|
||||
|
||||
zephyr_include_directories(.)
|
||||
|
|
21
subsys/net/lib/openthread/platform/memory.c
Normal file
21
subsys/net/lib/openthread/platform/memory.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
|
||||
#include <openthread/platform/memory.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void *otPlatCAlloc(size_t aNum, size_t aSize)
|
||||
{
|
||||
return calloc(aNum, aSize);
|
||||
}
|
||||
|
||||
void otPlatFree(void *aPtr)
|
||||
{
|
||||
free(aPtr);
|
||||
}
|
2
west.yml
2
west.yml
|
@ -109,7 +109,7 @@ manifest:
|
|||
revision: 3f545d76a2e6d1db83a470ccdb5bebd1f484e137
|
||||
path: modules/lib/loramac-node
|
||||
- name: openthread
|
||||
revision: 1d668284a0b897bd6d539e7c3ed8009f0028099d
|
||||
revision: d44ee763b7e8fea29b54dd064342c771161afcab
|
||||
path: modules/lib/openthread
|
||||
- name: segger
|
||||
revision: 38c79a447e4a47d413b4e8d34448316a5cece77c
|
||||
|
|
Loading…
Reference in a new issue