mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 11:47:46 +00:00
[ncp] allow a vendor defined subclass of ncp_uart or ncp_spi to access ncp_base members (#2412)
This commit is contained in:
@@ -167,7 +167,7 @@ public:
|
||||
*/
|
||||
bool ShouldDeferHostSend(void);
|
||||
|
||||
private:
|
||||
protected:
|
||||
typedef otError (NcpBase::*PropertyHandler)(void);
|
||||
|
||||
struct PropertyHandlerEntry
|
||||
@@ -674,7 +674,6 @@ protected:
|
||||
SpinelDecoder mDecoder;
|
||||
bool mHostPowerStateInProgress;
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
kTxBufferSize = OPENTHREAD_CONFIG_NCP_TX_BUFFER_SIZE, // Tx Buffer size (used by mTxFrameBuffer).
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
namespace ot {
|
||||
namespace Ncp {
|
||||
|
||||
#if OPENTHREAD_ENABLE_SPINEL_VENDOR_SUPPORT == 0
|
||||
|
||||
static otDEFINE_ALIGNED_VAR(sNcpRaw, sizeof(NcpSpi), uint64_t);
|
||||
|
||||
extern "C" void otNcpInit(otInstance *aInstance)
|
||||
@@ -68,6 +70,8 @@ extern "C" void otNcpInit(otInstance *aInstance)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_SPINEL_VENDOR_SUPPORT == 0
|
||||
|
||||
static void spi_header_set_flag_byte(uint8_t *header, uint8_t value)
|
||||
{
|
||||
header[0] = value;
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
namespace ot {
|
||||
namespace Ncp {
|
||||
|
||||
#if OPENTHREAD_ENABLE_SPINEL_VENDOR_SUPPORT == 0
|
||||
|
||||
static otDEFINE_ALIGNED_VAR(sNcpRaw, sizeof(NcpUart), uint64_t);
|
||||
|
||||
extern "C" void otNcpInit(otInstance *aInstance)
|
||||
@@ -66,6 +68,8 @@ extern "C" void otNcpInit(otInstance *aInstance)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_SPINEL_VENDOR_SUPPORT == 0
|
||||
|
||||
NcpUart::UartTxBuffer::UartTxBuffer(void)
|
||||
: Hdlc::Encoder::BufferWriteIterator()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user