this is using the mbed os version 5-13-1

Dependencies:   mbed-http

Committer:
ocomeni
Date:
Sat Mar 16 13:05:52 2019 +0000
Revision:
78:07bb86e3ce14
Child:
79:a2187bbfa407
Main Manager class constructors and configuration structures implemented.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ocomeni 78:07bb86e3ce14 1 #ifndef __COMMON_TYPES_H__
ocomeni 78:07bb86e3ce14 2 #define __COMMON_TYPES_H__
ocomeni 78:07bb86e3ce14 3 #include <mbed.h>
ocomeni 78:07bb86e3ce14 4 #define BLE_MAX_DEVICE_NAME_LEN 10
ocomeni 78:07bb86e3ce14 5 #define MAX_SSID_LEN 32
ocomeni 78:07bb86e3ce14 6 #define MAX_PASSKEY_LEN 32
ocomeni 78:07bb86e3ce14 7
ocomeni 78:07bb86e3ce14 8 /** ble configuration structure
ocomeni 78:07bb86e3ce14 9 */
ocomeni 78:07bb86e3ce14 10 typedef struct ble_config {
ocomeni 78:07bb86e3ce14 11 char deviceName[BLE_MAX_DEVICE_NAME_LEN]; /* BLE Device Name */
ocomeni 78:07bb86e3ce14 12 uint16_t advInterval; /* advertising interval in msecs */
ocomeni 78:07bb86e3ce14 13 uint16_t advTimeout; /* advertising timeout in secs */
ocomeni 78:07bb86e3ce14 14 } ble_config_t;
ocomeni 78:07bb86e3ce14 15
ocomeni 78:07bb86e3ce14 16 /** ble configuration structure
ocomeni 78:07bb86e3ce14 17 */
ocomeni 78:07bb86e3ce14 18 typedef struct wifi_config {
ocomeni 78:07bb86e3ce14 19 char ssid[MAX_SSID_LEN]; /* WiFi SSID */
ocomeni 78:07bb86e3ce14 20 char pass[MAX_PASSKEY_LEN]; /* WiFi Passkey */
ocomeni 78:07bb86e3ce14 21 nsapi_security_t security; /* WiFi security */
ocomeni 78:07bb86e3ce14 22 } wifi_config_t;
ocomeni 78:07bb86e3ce14 23
ocomeni 78:07bb86e3ce14 24 /** ble configuration structure
ocomeni 78:07bb86e3ce14 25 */
ocomeni 78:07bb86e3ce14 26 typedef struct app_config {
ocomeni 78:07bb86e3ce14 27 wifi_config_t wifi_config; /* wifi configuration */
ocomeni 78:07bb86e3ce14 28 ble_config_t ble_config; /* ble configuration */
ocomeni 78:07bb86e3ce14 29 } app_config_t;
ocomeni 78:07bb86e3ce14 30
ocomeni 78:07bb86e3ce14 31
ocomeni 78:07bb86e3ce14 32 #endif // __COMMON_TYPES_H__