Simple Mbed Cloud client application using features of K64F including Wi-Fi and SD Card
Fork of mbed-cloud-example_GR-LYCHEE by
Revision 15:a0fb0c1c32a0, committed 2018-10-08
- Comitter:
- MACRUM
- Date:
- Mon Oct 08 15:54:11 2018 +0000
- Parent:
- 14:34eab7c4e26d
- Commit message:
- Initial commit
Changed in this revision
--- a/main.cpp Tue Sep 18 07:21:42 2018 +0000 +++ b/main.cpp Mon Oct 08 15:54:11 2018 +0000 @@ -27,11 +27,14 @@ EventQueue eventQueue; // Storage implementation definition, currently using SDBlockDevice (SPI flash, DataFlash, and internal flash are also available) -SDBlockDevice sd(P5_6, P5_7, P5_4, P5_5); +SDBlockDevice sd(PTE3, PTE1, PTE2, PTE4); FATFileSystem fs("sd", &sd); -ESP32Interface net(MBED_CONF_APP_WIFI_EN, MBED_CONF_APP_WIFI_IO0, MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); -InterruptIn btn(USER_BUTTON0); +//ESP32Interface net(MBED_CONF_APP_WIFI_EN, MBED_CONF_APP_WIFI_IO0, MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); +ESP32Interface net(D2, D3, MBED_CONF_APP_WIFI_TX, MBED_CONF_APP_WIFI_RX); +//ESP32Interface net(D1, D0, true); + +InterruptIn btn(SW2); // Declaring pointers for access to Mbed Cloud Client resources outside of main() MbedCloudClientResource *button_res;
--- a/mbed_app.json Tue Sep 18 07:21:42 2018 +0000 +++ b/mbed_app.json Mon Oct 08 15:54:11 2018 +0000 @@ -18,6 +18,17 @@ "update-client.storage-locations": "1", "mbed-trace.enable": null }, + "K64F": { + "sotp-section-1-address" : "0xFE000", + "sotp-section-1-size" : "0x1000", + "sotp-section-2-address" : "0xFF000", + "sotp-section-2-size" : "0x1000", + "sotp-num-sections" : 2, + "wifi-en" : "NC", + "wifi-io0" : "NC", + "wifi-tx" : "D1", + "wifi-rx" : "D0" + }, "GR_LYCHEE": { "sotp-section-1-address" : "0x187FE000", "sotp-section-1-size" : "0x1000",
--- a/mbed_cloud_dev_credentials.c Tue Sep 18 07:21:42 2018 +0000 +++ b/mbed_cloud_dev_credentials.c Mon Oct 08 15:54:11 2018 +0000 @@ -15,39 +15,39 @@ */ #ifndef __MBED_CLOUD_DEV_CREDENTIALS_H__ #define __MBED_CLOUD_DEV_CREDENTIALS_H__ - + #if MBED_CONF_APP_DEVELOPER_MODE == 1 #error "Replace mbed_cloud_dev_credentials.c with your own developer cert." #endif - + #include <inttypes.h> - + const char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = ""; const char MBED_CLOUD_DEV_ACCOUNT_ID[] = ""; const char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = ""; - + const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] = { 0x0 }; - + const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] = { 0x0 }; - + const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] = { 0x0 }; - + const char MBED_CLOUD_DEV_MANUFACTURER[] = "dev_manufacturer"; - + const char MBED_CLOUD_DEV_MODEL_NUMBER[] = "dev_model_num"; - + const char MBED_CLOUD_DEV_SERIAL_NUMBER[] = "0"; - + const char MBED_CLOUD_DEV_DEVICE_TYPE[] = "dev_device_type"; - + const char MBED_CLOUD_DEV_HARDWARE_VERSION[] = "dev_hardware_version"; - + const uint32_t MBED_CLOUD_DEV_MEMORY_TOTAL_KB = 0; const uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE); const uint32_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE); const uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY); - + #endif //__MBED_CLOUD_DEV_CREDENTIALS_H__