mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
[Thread] Add socket interface support in thread chip
Bug: 313425570 Test: build pass & manual test Change-Id: Ie1b0c687cf529659521f1dd1457fcda35af1bf49
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <utils/Log.h>
|
||||
|
||||
#include "hdlc_interface.hpp"
|
||||
#include "socket_interface.hpp"
|
||||
#include "spi_interface.hpp"
|
||||
|
||||
namespace aidl {
|
||||
@@ -43,6 +44,8 @@ ThreadChip::ThreadChip(char* url) : mUrl(), mRxFrameBuffer(), mCallback(nullptr)
|
||||
mSpinelInterface = std::make_shared<ot::Posix::SpiInterface>(mUrl);
|
||||
} else if (ot::Posix::HdlcInterface::IsInterfaceNameMatch(interfaceName)) {
|
||||
mSpinelInterface = std::make_shared<ot::Posix::HdlcInterface>(mUrl);
|
||||
} else if (SocketInterface::IsInterfaceNameMatch(interfaceName)) {
|
||||
mSpinelInterface = std::make_shared<SocketInterface>(mUrl);
|
||||
} else {
|
||||
ALOGE("The interface \"%s\" is not supported", interfaceName);
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user