Fix cc2538 examples. (#224)

This commit is contained in:
Jonathan Hui
2016-06-30 09:49:45 -07:00
committed by GitHub
parent 75358c53ec
commit dc8e7de3ad
6 changed files with 22 additions and 10 deletions
+8 -1
View File
@@ -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 = \
+8 -1
View File
@@ -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 = \
+2 -2
View File
@@ -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;
+2 -4
View File
@@ -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)
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -161,7 +161,7 @@ exit:
return;
}
void PlatformSerialProcess(void)
void cc2538SerialProcess(void)
{
processReceive();
processTransmit();