Plant Monitoring CS

Dependencies:   HTS221

Files at this revision

API Documentation at this revision

Comitter:
adustm adustm@gmail.com
Date:
Thu Feb 15 10:34:31 2018 +0100
Parent:
54:b9963ccc0c2d
Child:
56:0bfadb4cb15e
Commit message:
Update main.cpp / mbed_app.json and Readme for DISCO_L475VG_IOT01A wifi module
Add mbed_app_ism43362.json + wifi-ism43362.lib

Changed in this revision

Jenkinsfile Show annotated file Show diff for this revision Revisions of this file
README.md Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
mbed_app_ism43362.json Show annotated file Show diff for this revision Revisions of this file
wifi-ism43362.lib Show annotated file Show diff for this revision Revisions of this file
--- a/Jenkinsfile	Wed Jan 31 10:00:03 2018 +0000
+++ b/Jenkinsfile	Thu Feb 15 10:34:31 2018 +0100
@@ -17,7 +17,8 @@
   "REALTEK_RTL8195AM": ["builtin"],
   "K64F": ["WIFI_ESP8266"],
   "NUCLEO_F401RE": ["WIFI_IDW0XX1"],
-  "NUCLEO_F429ZI": ["WIFI_ESP8266"]
+  "NUCLEO_F429ZI": ["WIFI_ESP8266"],
+  "DISCO_L475VG_IOT01A": ["WIFI_ISM43362"]
   ]
 
 // Map toolchains to compilers
--- a/README.md	Wed Jan 31 10:00:03 2018 +0000
+++ b/README.md	Thu Feb 15 10:34:31 2018 +0100
@@ -18,6 +18,7 @@
 * [NUCLEO-F401RE](https://os.mbed.com/platforms/ST-Nucleo-F401RE/) with [X-NUCLEO-IDW01M1](https://os.mbed.com/components/X-NUCLEO-IDW01M1/) Wi-Fi expansion board using pins PA_9 and PA_10 _(of the Morpho connector)_.
 * [NUCLEO-F429ZI](https://os.mbed.com/platforms/ST-Nucleo-F429ZI/) with ESP8266-01 module using pins D1 and D0.
 * [NUCLEO-L476RG](https://os.mbed.com/platforms/ST-Nucleo-L476RG/) with ESP8266-01 module using pins D8 and D2.
+* [DISCO_L475VG_IOT01A](https://os.mbed.com/platforms/ST-Discovery-L475E-IOT01A/) with ISM43362 built-in module
 * Other Mbed targets with an ESP8266 module, [X-NUCLEO-IDW04A1](http://www.st.com/content/st_com/en/products/ecosystems/stm32-open-development-environment/stm32-nucleo-expansion-boards/stm32-ode-connect-hw/x-nucleo-idw04a1.html) or [X-NUCLEO-IDW01M1](https://os.mbed.com/components/X-NUCLEO-IDW01M1/) expansion board.
   *(The Mbed target board the Wi-Fi shield connects to shouldn't have any other network interface, for example Ethernet.)*
 
@@ -63,7 +64,7 @@
        },
    ```
 
-   Sample ```mbed_app.json``` files are provided for ESP8266 (```mbed_app_esp8266.json```), X-NUCLEO-IDW04A1 (```mbed_app_idw04a1.json```) and X-NUCLEO-IDW01M1 (```mbed_app_idw01m1```).
+   Sample ```mbed_app.json``` files are provided for ESP8266 (```mbed_app_esp8266.json```), X-NUCLEO-IDW04A1 (```mbed_app_idw04a1.json```),  X-NUCLEO-IDW01M1 (```mbed_app_idw01m1```) and DISCO_L475VG_IOT01A/ISM43362 (```mbed_app_ism43362.json```)
    
    For built-in Wi-Fi, ignore the value of `wifi-shield`.
 
--- a/main.cpp	Wed Jan 31 10:00:03 2018 +0000
+++ b/main.cpp	Thu Feb 15 10:34:31 2018 +0100
@@ -28,6 +28,10 @@
 #include "RTWInterface.h"
 RTWInterface wifi;
 
+#elif TARGET_DISCO_L475VG_IOT01A
+#include "ISM43362Interface.h"
+ISM43362Interface wifi(MBED_CONF_APP_WIFI_SPI_MOSI, MBED_CONF_APP_WIFI_SPI_MISO, MBED_CONF_APP_WIFI_SPI_SCLK, MBED_CONF_APP_WIFI_SPI_NSS, MBED_CONF_APP_WIFI_RESET, MBED_CONF_APP_WIFI_DATAREADY, MBED_CONF_APP_WIFI_WAKEUP, false);
+
 #else // External WiFi modules
 
 #if MBED_CONF_APP_WIFI_SHIELD == WIFI_ESP8266
@@ -66,6 +70,7 @@
     printf("Scan:\n");
 
     int count = wifi->scan(NULL,0);
+    printf("%d networks available.\n", count);
 
     /* Limit number of network arbitrary to 15 */
     count = count < 15 ? count : 15;
@@ -78,7 +83,6 @@
                sec2str(ap[i].get_security()), ap[i].get_bssid()[0], ap[i].get_bssid()[1], ap[i].get_bssid()[2],
                ap[i].get_bssid()[3], ap[i].get_bssid()[4], ap[i].get_bssid()[5], ap[i].get_rssi(), ap[i].get_channel());
     }
-    printf("%d networks available.\n", count);
 
     delete[] ap;
     return count;
--- a/mbed_app.json	Wed Jan 31 10:00:03 2018 +0000
+++ b/mbed_app.json	Thu Feb 15 10:34:31 2018 +0100
@@ -1,9 +1,9 @@
 {
     "config": {
-	"wifi-shield": {
+        "wifi-shield": {
             "help": "Options are internal, WIFI_ESP8266, WIFI_IDW0XX1",
             "value": "internal"
-	},
+        },
         "wifi-ssid": {
             "help": "WiFi SSID",
             "value": "\"SSID\""
@@ -19,6 +19,34 @@
         "wifi-rx": {
             "help": "RX pin for serial connection to external device",
             "value": "D0"
+        },
+        "wifi-spi_miso": {
+            "help": "SPI-MISO connection to external device",
+            "value": "PC_11"
+        },
+        "wifi-spi_mosi": {
+            "help": "SPI-MOSI connection to external device",
+            "value": "PC_12"
+        },
+        "wifi-spi_sclk": {
+            "help": "SPI-CLOCK connection to external device",
+            "value": "PC_10"
+        },
+        "wifi-spi_nss": {
+            "help": "SPI chip select of external device",
+            "value": "PE_0"
+        },
+        "wifi-reset": {
+            "help": "WIFI module reset pin",
+            "value": "PE_8"
+        },
+        "wifi-dataready": {
+            "help": "WIFI module data ready pin",
+            "value": "PE_1"
+        },
+        "wifi-wakeup": {
+            "help": "WIFI module wakeup pin",
+            "value": "PB_12"
         }
     },
     "target_overrides": {
@@ -35,6 +63,24 @@
         "NUCLEO_F401RE": {
             "wifi-tx": "D8",
             "wifi-rx": "D2"
+        },
+        "DISCO_L475VG_IOT1A": {
+            "wifi-spi_miso": "PC_11",
+            "wifi-spi_mosi": "PC_12",
+            "wifi-spi_sclk": "PC_10",
+            "wifi-spi_nss": "PE_0",
+            "wifi-reset": "PE_8",
+            "wifi-dataready": "PE_1",
+            "wifi-wakeup": "PB_12"
+        },
+        "DISCO_F413ZH": {
+            "wifi-spi_miso": "PB_4",
+            "wifi-spi_mosi": "PB_5",
+            "wifi-spi_sclk": "PB_12",
+            "wifi-spi_nss": "PG_11",
+            "wifi-reset": "PH_1",
+            "wifi-dataready": "PG_12",
+            "wifi-wakeup": "PB_15"
         }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed_app_ism43362.json	Thu Feb 15 10:34:31 2018 +0100
@@ -0,0 +1,86 @@
+{
+    "config": {
+        "wifi-shield": {
+            "help": "Options are internal, WIFI_ESP8266, WIFI_IDW0XX1",
+            "value": "internal"
+        },
+        "wifi-ssid": {
+            "help": "WiFi SSID",
+            "value": "\"SSID\""
+        },
+        "wifi-password": {
+            "help": "WiFi Password",
+            "value": "\"PASSWORD\""
+        },
+        "wifi-tx": {
+            "help": "TX pin for serial connection to external device",
+            "value": "D1"
+        },
+        "wifi-rx": {
+            "help": "RX pin for serial connection to external device",
+            "value": "D0"
+        },
+        "wifi-spi_miso": {
+            "help": "SPI-MISO connection to external device",
+            "value": "PC_11"
+        },
+        "wifi-spi_mosi": {
+            "help": "SPI-MOSI connection to external device",
+            "value": "PC_12"
+        },
+        "wifi-spi_sclk": {
+            "help": "SPI-CLOCK connection to external device",
+            "value": "PC_10"
+        },
+        "wifi-spi_nss": {
+            "help": "SPI chip select of external device",
+            "value": "PE_0"
+        },
+        "wifi-reset": {
+            "help": "WIFI module reset pin",
+            "value": "PE_8"
+        },
+        "wifi-dataready": {
+            "help": "WIFI module data ready pin",
+            "value": "PE_1"
+        },
+        "wifi-wakeup": {
+            "help": "WIFI module wakeup pin",
+            "value": "PB_12"
+        }
+    },
+    "target_overrides": {
+        "*": {
+            "platform.stdio-convert-newlines": true
+        },
+        "UBLOX_EVK_ODIN_W2": {
+            "target.device_has": ["EMAC"]
+        },
+        "NUCLEO_L476RG": {
+            "wifi-tx": "D8",
+            "wifi-rx": "D2"
+        },
+        "NUCLEO_F401RE": {
+            "wifi-tx": "D8",
+            "wifi-rx": "D2"
+        },
+        "DISCO_L475VG_IOT1A": {
+            "wifi-spi_miso": "PC_11",
+            "wifi-spi_mosi": "PC_12",
+            "wifi-spi_sclk": "PC_10",
+            "wifi-spi_nss": "PE_0",
+            "wifi-reset": "PE_8",
+            "wifi-dataready": "PE_1",
+            "wifi-wakeup": "PB_12"
+        },
+        "DISCO_F413ZH": {
+            "wifi-spi_miso": "PB_4",
+            "wifi-spi_mosi": "PB_5",
+            "wifi-spi_sclk": "PB_12",
+            "wifi-spi_nss": "PG_11",
+            "wifi-reset": "PH_1",
+            "wifi-dataready": "PG_12",
+            "wifi-wakeup": "PB_15"
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wifi-ism43362.lib	Thu Feb 15 10:34:31 2018 +0100
@@ -0,0 +1,2 @@
+https://github.com/ARMmbed/wifi-ism43362/#e4ecc27e87d96072f7df62a25ef007986dc95c4e
+