[ncp] allow a vendor defined subclass of ncp_uart or ncp_spi to access ncp_base members (#2412)

This commit is contained in:
pvanhorn
2017-12-13 07:11:21 +00:00
committed by Jonathan Hui
parent d9b498079b
commit c4d27e5642
3 changed files with 9 additions and 2 deletions
+1 -2
View File
@@ -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).
+4
View File
@@ -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;
+4
View File
@@ -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()
{