Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of cc3100_Test_Demo by
Revision 8:bb9cccbe84d7, committed 2017-07-22
- Comitter:
- gaoyang
- Date:
- Sat Jul 22 05:04:14 2017 +0000
- Parent:
- 7:0687d16b9781
- Commit message:
- DAS
Changed in this revision
--- a/main.cpp Thu Sep 03 13:43:50 2015 +0000
+++ b/main.cpp Sat Jul 22 05:04:14 2017 +0000
@@ -72,11 +72,12 @@
#elif (THIS_BOARD == ST_MBED_NUCLEOF103)
cc3100 _cc3100(PA_9, PC_7, PB_6, SPI(PA_7, PA_6, PA_5));//nucleoF103 irq, nHib, cs, mosi, miso, sck
Serial pc(SERIAL_TX, SERIAL_RX);
-#elif (THIS_BOARD == Seeed_Arch_Max)
-cc3100 _cc3100(PD_12, PD_13, PD_11, SPI(PB_5, PB_4, PB_3));//Seeed_Arch_Max irq, nHib, cs, mosi, miso, sck
+#elif (THIS_BOARD == K64F)
+cc3100 _cc3100(PTC4, PTC3, PTD0, SPI(PTD2, PTD3, PTD1));//Seeed_Arch_Max irq, nHib, cs, mosi, miso, sck
Serial pc(USBTX, USBRX);
#else
+
#endif
#define APPLICATION_VERSION "1.2.0"
@@ -84,6 +85,7 @@
/*
* GLOBAL VARIABLES -- Start
*/
+ //ap 1 STATION 0
int32_t demo = 0;
/*
@@ -115,6 +117,7 @@
int32_t retVal = -1;
retVal = _cc3100.initializeAppVariables();
+
ASSERT_ON_ERROR(retVal);
displayBanner();
--- a/myBoardInit.h Thu Sep 03 13:43:50 2015 +0000 +++ b/myBoardInit.h Sat Jul 22 05:04:14 2017 +0000 @@ -25,7 +25,7 @@ #define Seeed_Arch_Max 60 #define UNDEFINED 70//add new board here -#define THIS_BOARD MBED_BOARD_LPC1768 +#define THIS_BOARD K64F //#define THIS_BOARD ST_MBED_NUCLEOF411 //#define THIS_BOARD EA_MBED_LPC4088 //#define THIS_BOARD ST_MBED_NUCLEOF103
--- a/simplelink/cc3100.cpp Thu Sep 03 13:43:50 2015 +0000
+++ b/simplelink/cc3100.cpp Sat Jul 22 05:04:14 2017 +0000
@@ -156,8 +156,9 @@
int32_t retVal = -1;
int32_t role = -1;
-
+ printf("role=\r\n");
role = sl_Start(0, 0, 0);
+ printf("role=%d\r\n",role);
ASSERT_ON_ERROR(role);
/* If the device is not in station-mode, try configuring it in station-mode */
@@ -984,25 +985,27 @@
{
int16_t ObjIdx = MAX_CONCURRENT_ACTIONS;
InitComplete_t AsyncRsp;
-
+ printf("SL_POOL_IS_EMPTY\r\n");
/* Perform any preprocessing before enable networking services */
sl_DeviceEnablePreamble();//stub only
-
+ printf("SL\r\n");
/* ControlBlock init */
_driver._SlDrvDriverCBInit();
-
+ printf("SL1\r\n");
/* open the interface: usually SPI or UART */
if (NULL == pIfHdl)
{
g_pCB->FD = _spi.spi_Open((int8_t *)pDevName, 0);
+ printf("SL2\r\n");
}
else
{
g_pCB->FD = (_SlFd_t)pIfHdl;
+ printf("SL3\r\n");
}
ObjIdx = _driver._SlDrvProtectAsyncRespSetting((uint8_t *)&AsyncRsp, START_STOP_ID, SL_MAX_SOCKETS);
-
+ printf("SL4\r\n");
if (MAX_CONCURRENT_ACTIONS == ObjIdx)
{
printf("SL_POOL_IS_EMPTY\r\n");
@@ -1015,21 +1018,23 @@
g_pCB->pInitCallback = pInitCallBack;
_spi.CC3100_enable();
-
+ printf("SL5\r\n");
if (NULL == pInitCallBack) {
-
+ printf("SL9=%d\r\n",pInitCallBack);
_driver._SlDrvSyncObjWaitForever(&g_pCB->ObjPool[ObjIdx].SyncObj);
-
+ printf("SL6\r\n");
/*release Pool Object*/
- _driver._SlDrvReleasePoolObj(g_pCB->FunctionParams.AsyncExt.ActionIndex);
+ _driver._SlDrvReleasePoolObj(g_pCB->FunctionParams.AsyncExt.ActionIndex);
+ printf("SL6\r\n");
return _sl_GetStartResponseConvert(AsyncRsp.Status);
}
else
{
+ printf("SL7\r\n");
return SL_RET_CODE_OK;
}
}
-
+ printf("SL8\r\n");
return SL_BAD_INTERFACE;
