2018-01-15 18:38:21 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Nordic Semiconductor ASA
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_INCLUDE_NET_OPENTHREAD_H_
|
|
|
|
#define ZEPHYR_INCLUDE_NET_OPENTHREAD_H_
|
2018-01-15 18:38:21 +08:00
|
|
|
|
|
|
|
#include <kernel.h>
|
|
|
|
|
|
|
|
#include <net/net_if.h>
|
|
|
|
|
2018-12-18 16:55:28 +08:00
|
|
|
#include <openthread/instance.h>
|
2018-01-15 18:38:21 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct pkt_list_elem {
|
|
|
|
struct net_pkt *pkt;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct openthread_context {
|
|
|
|
otInstance *instance;
|
|
|
|
struct net_if *iface;
|
|
|
|
u16_t pkt_list_in_idx;
|
|
|
|
u16_t pkt_list_out_idx;
|
|
|
|
u8_t pkt_list_full;
|
|
|
|
struct pkt_list_elem pkt_list[CONFIG_OPENTHREAD_PKT_LIST_SIZE];
|
|
|
|
};
|
|
|
|
|
2019-10-24 19:15:30 +08:00
|
|
|
k_tid_t openthread_thread_id_get(void);
|
|
|
|
|
2020-05-05 17:50:46 +08:00
|
|
|
struct otInstance *openthread_get_default_instance(void);
|
|
|
|
|
2018-01-15 18:38:21 +08:00
|
|
|
#define OPENTHREAD_L2_CTX_TYPE struct openthread_context
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_INCLUDE_NET_OPENTHREAD_H_ */
|