mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 05:49:54 +00:00
[nexus] use Ip6::SetReceiveCallback() directly (#12865)
This commit updates the Nexus platform to use the internal core C++ API `Ip6::SetReceiveCallback()` instead of the public C API `otIp6SetReceiveCallback()`.
This commit is contained in:
@@ -370,7 +370,7 @@ Node &Core::CreateNode(void)
|
|||||||
|
|
||||||
node->GetInstance().AfterInit();
|
node->GetInstance().AfterInit();
|
||||||
|
|
||||||
otIp6SetReceiveCallback(&node->GetInstance(), Node::HandleIp6Receive, node);
|
node->Get<Ip6::Ip6>().SetReceiveCallback(Node::HandleIp6Receive, node);
|
||||||
|
|
||||||
return *node;
|
return *node;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ void Node::Reset(void)
|
|||||||
instance->SetId(id);
|
instance->SetId(id);
|
||||||
instance->AfterInit();
|
instance->AfterInit();
|
||||||
|
|
||||||
otIp6SetReceiveCallback(instance, Node::HandleIp6Receive, this);
|
instance->Get<Ip6::Ip6>().SetReceiveCallback(Node::HandleIp6Receive, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::Form(void)
|
void Node::Form(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user