TI's CC3100. A test demo with very little testing done!

Dependencies:   mbed

Fork of cc3100_Test_Demo2 by 高 杨

Files at this revision

API Documentation at this revision

Comitter:
gaoyang
Date:
Sun Jul 30 06:32:08 2017 +0000
Parent:
8:bb9cccbe84d7
Commit message:
DAS

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
simplelink/cc3100_sl_common.h Show annotated file Show diff for this revision Revisions of this file
simplelink/cc3100_spi.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Jul 22 05:04:14 2017 +0000
+++ b/main.cpp	Sun Jul 30 06:32:08 2017 +0000
@@ -73,8 +73,8 @@
 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 == K64F)
-cc3100 _cc3100(PTC4, PTC3, PTD0, SPI(PTD2, PTD3, PTD1));//Seeed_Arch_Max  irq, nHib, cs, mosi, miso, sck
-Serial pc(USBTX, USBRX);
+cc3100 _cc3100(PTD5, PTD4, PTD0, SPI(PTD2, PTD3, PTD1));//K64  irq, nHib, cs, mosi, miso, sck
+Serial pc(USBTX,USBRX);
 #else
 
 
@@ -86,7 +86,7 @@
  * GLOBAL VARIABLES -- Start
  */
  //ap 1 STATION 0
-int32_t demo = 0;
+int32_t demo =1;
 
 /*
  * GLOBAL VARIABLES -- End
@@ -109,10 +109,11 @@
  * Application's entry point
  */
   
- 
+ DigitalOut led(PTA2);
 int main(void) {
-
-    pc.baud(115200);
+   led=0;
+   wait(5);
+   led=1;
 
     int32_t retVal = -1;
 
--- a/simplelink/cc3100_sl_common.h	Sat Jul 22 05:04:14 2017 +0000
+++ b/simplelink/cc3100_sl_common.h	Sun Jul 30 06:32:08 2017 +0000
@@ -65,15 +65,15 @@
  * Values for below macros shall be modified per the access-point's (AP) properties
  * SimpleLink device will connect to following AP when the application is executed
  */
-#define SSID_NAME         "**********"
+#define SSID_NAME         "wifi"
 //#define SSID_NAME       "OpenWrt"         /* Access point name to connect to. */
-#define SEC_TYPE        SL_SEC_TYPE_WPA_WPA2    /* Security type of the Access point */
-#define PASSKEY           "**********"
+#define SEC_TYPE          SL_SEC_TYPE_WPA_WPA2    /* Security type of the Access point */
+#define PASSKEY           "916754393"
 //#define PASSKEY         "**********"                  /* Password in case of secure AP */
 #define PASSKEY_LEN     strlen(PASSKEY)  /* Password length in case of secure AP */
 
 /* Configuration of the device when it comes up in AP mode */
-#define SSID_AP_MODE       "mysimplelink"       /* SSID of the CC3100 in AP mode */
+#define SSID_AP_MODE       "suc7"       /* SSID of the CC3100 in AP mode */
 #define PASSWORD_AP_MODE   ""                  /* Password of CC3100 AP */
 #define SEC_TYPE_AP_MODE   SL_SEC_TYPE_OPEN    /* Can take SL_SEC_TYPE_WEP or
 * SL_SEC_TYPE_WPA as well */
--- a/simplelink/cc3100_spi.cpp	Sat Jul 22 05:04:14 2017 +0000
+++ b/simplelink/cc3100_spi.cpp	Sun Jul 30 06:32:08 2017 +0000
@@ -48,7 +48,7 @@
 {
 
     _wlan_spi.format(8,0);
-    _wlan_spi.frequency(16000000);
+    _wlan_spi.frequency(100000);
     _wlan_irq.rise(this, &cc3100_spi::IntSpiGPIOHandler);      //_SlDrvRxIrqHandler is triggered after IntSpiGPIOHandler
     _wlan_nHIB = 0;
     _wlan_cs = 1;