mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 23:57:46 +00:00
Fix cc2538 examples. (#224)
This commit is contained in:
@@ -41,12 +41,15 @@ ot_cli_LDADD = \
|
||||
$(top_builddir)/src/core/libopenthread.a \
|
||||
$(top_builddir)/src/cli/libopenthread-cli.a \
|
||||
$(top_builddir)/third_party/mbedtls/libmbedcrypto.a \
|
||||
-lstdc++ \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_LDFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_EXAMPLES_POSIX
|
||||
ot_cli_LDADD += \
|
||||
$(top_builddir)/examples/platforms/posix/libopenthread-posix.a \
|
||||
-lstdc++ \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
@@ -54,6 +57,10 @@ if OPENTHREAD_EXAMPLES_CC2538
|
||||
ot_cli_LDADD += \
|
||||
$(top_builddir)/examples/platforms/cc2538/libopenthread-cc2538.a \
|
||||
$(NULL)
|
||||
|
||||
ot_cli_LDFLAGS += \
|
||||
-T $(top_srcdir)/examples/platforms/cc2538/cc2538.ld \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_cli_SOURCES = \
|
||||
|
||||
@@ -41,12 +41,15 @@ ot_ncp_LDADD = \
|
||||
$(top_builddir)/src/core/libopenthread.a \
|
||||
$(top_builddir)/src/ncp/libopenthread-ncp.a \
|
||||
$(top_builddir)/third_party/mbedtls/libmbedcrypto.a \
|
||||
-lstdc++ \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_LDFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
if OPENTHREAD_EXAMPLES_POSIX
|
||||
ot_ncp_LDADD += \
|
||||
$(top_builddir)/examples/platforms/posix/libopenthread-posix.a \
|
||||
-lstdc++ \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
@@ -54,6 +57,10 @@ if OPENTHREAD_EXAMPLES_CC2538
|
||||
ot_ncp_LDADD += \
|
||||
$(top_builddir)/examples/platforms/cc2538/libopenthread-cc2538.a \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_LDFLAGS += \
|
||||
-T $(top_srcdir)/examples/platforms/cc2538/cc2538.ld \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_ncp_SOURCES = \
|
||||
|
||||
@@ -49,7 +49,7 @@ static uint32_t sAlarmT0 = 0;
|
||||
static uint32_t sAlarmDt = 0;
|
||||
static bool sIsRunning = false;
|
||||
|
||||
void PlatformAlarmInit(void)
|
||||
void cc2538AlarmInit(void)
|
||||
{
|
||||
HWREG(NVIC_ST_RELOAD) = kSystemClock / kTicksPerSec;
|
||||
HWREG(NVIC_ST_CTRL) = NVIC_ST_CTRL_CLK_SRC | NVIC_ST_CTRL_INTEN | NVIC_ST_CTRL_ENABLE;
|
||||
@@ -72,7 +72,7 @@ void otPlatAlarmStop(void)
|
||||
sIsRunning = false;
|
||||
}
|
||||
|
||||
void PlatformAlarmProcess(void)
|
||||
void cc2538AlarmProcess(void)
|
||||
{
|
||||
uint32_t expires;
|
||||
bool fire = false;
|
||||
|
||||
@@ -142,7 +142,7 @@ ThreadError otPlatRadioSetShortAddress(uint16_t address)
|
||||
return kThreadError_None;
|
||||
}
|
||||
|
||||
void PlatformRadioInit(void)
|
||||
void cc2538RadioInit(void)
|
||||
{
|
||||
sTransmitFrame.mLength = 0;
|
||||
sTransmitFrame.mPsdu = sTransmitPsdu;
|
||||
@@ -368,7 +368,7 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
int PlatformRadioProcess(void)
|
||||
void cc2538RadioProcess(void)
|
||||
{
|
||||
readFrame();
|
||||
|
||||
@@ -416,8 +416,6 @@ int PlatformRadioProcess(void)
|
||||
{
|
||||
disableReceiver();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RFCoreRxTxIntHandler(void)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
static uint32_t s_state = 1;
|
||||
|
||||
void PlatformRandomInit(void)
|
||||
void cc2538RandomInit(void)
|
||||
{
|
||||
// use Extended Identifier portion of IEEE EUI-64 as the seed
|
||||
s_state = HWREG(IEEE_EUI64 + 4);
|
||||
|
||||
@@ -161,7 +161,7 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
void PlatformSerialProcess(void)
|
||||
void cc2538SerialProcess(void)
|
||||
{
|
||||
processReceive();
|
||||
processTransmit();
|
||||
|
||||
Reference in New Issue
Block a user