zephyr/subsys/net/lib/openthread/platform/spi.c
Kamil Sroka 83b2218ab5 subsys: net: lib: Add OpenThread platform
OpenThread requires platform definition with standarized API
so we have to add wrappers to make it compatible with Zephyr.
OpenThread is based on autoconf, this requires
more specific CMakeLists.txt which allows to clone specific
commit or point to local copy of openthread.

Signed-off-by: Kamil Sroka <kamil.sroka@nordicsemi.no>
2018-01-29 22:42:03 -05:00

50 lines
994 B
C

/*
* Copyright (c) 2018 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <stdio.h>
#include <stdlib.h>
#include <openthread/platform/uart.h>
#include <openthread/platform/spi-slave.h>
#include "platform-zephyr.h"
/* Spi-slave stubs */
otError otPlatSpiSlaveEnable(
otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
otPlatSpiSlaveTransactionProcessCallback aProcessCallback,
void *aContext)
{
ARG_UNUSED(aCompleteCallback);
ARG_UNUSED(aProcessCallback);
ARG_UNUSED(aContext);
return OT_ERROR_NOT_IMPLEMENTED;
}
void otPlatSpiSlaveDisable(void)
{
/* Intentionally empty */
}
otError otPlatSpiSlavePrepareTransaction(
u8_t *anOutputBuf,
u16_t anOutputBufLen,
u8_t *anInputBuf,
u16_t anInputBufLen,
bool aRequestTransactionFlag
)
{
ARG_UNUSED(anOutputBuf);
ARG_UNUSED(anOutputBufLen);
ARG_UNUSED(anInputBuf);
ARG_UNUSED(anInputBufLen);
ARG_UNUSED(aRequestTransactionFlag);
return OT_ERROR_NOT_IMPLEMENTED;
}